Giter VIP home page Giter VIP logo

psalm-plugin-zendframework1's Introduction

psalm-plugin-zendframework1

Build Status

Psalm plugin for Zend Framework 1

Quickstart

Please refer to the full Psalm documentation for a more detailed guide on introducing Psalm into your project.

First, start by installing Psalm if you have not done so already:

composer require --dev vimeo/psalm
./vendor/bin/psalm --init

Next, install this package and enable the plugin

composer require --dev matthewbdaly/psalm-plugin-zendframework1
./vendor/bin/psalm-plugin enable matthewbdaly/psalm-plugin-zendframework1

Finally, run Psalm to analyze your codebase

./vendor/bin/psalm

DISCLAIMER

The stub files for this plugin were generated automatically, and I have noticed that the access levels for properties and methods aren't always accurate, leading to false errors when the implemented access level differs from that defined in the stub. For an example of a fix for this, see https://github.com/matthewbdaly/psalm-plugin-zendframework1/commit/1a83a78b805ad4430e04f454a819605f56efb996#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26

If you see an error along those lines, please try running Psalm with this plugin disabled. If it then no longer flags the issue, it's likely the definition of that method or property in the stub file has a different access level to the one in the code base. If this is the case, please submit a pull request to correct the access level.

psalm-plugin-zendframework1's People

Contributors

matthewbdaly avatar matthewbdaly-mission avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

psalm-plugin-zendframework1's Issues

Idea: add support for phpstan OR split this repo between Zf1 stubs and the psalm plugin

I'm using phpstan. I came to realize that I need those juicy stubs you created.

I can always install your composer module and include the stub file directly like so,

parameters:
    stubFiles:
        - vendor/matthewbdaly/psalm-plugin-zendframework1/src/Stubs/zendframework1.phpstub

But this is a workaround and I end-up with a dependency on psalm.

I suppose the solution could be to make your stubs more generally available - i.e. you create a matthewbdaly/zendframework1-stubs project and then you add a dependency on it? I dunno.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.