-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: Upgrade to phpstan 0.12 #23
Conversation
Unfortunately retaining 0.11 support isn’t feasible but that seems like an acceptable tradeoff. Note that some of the type-hinting of DataLists will now be doable with phpstan’s template features - we can type hint DataList<Member> for example, and we can commit some @phpstan-return clauses to the core framework to support this.
@nglasl or any other maintainer, any chance to get this merged? It would be really nice to be able to upgrade to phpstan 0.12 |
@sminnee I noticed that the suggested version in the composer.json file is still 0.11: silverstripe-phpstan/composer.json Lines 37 to 39 in 8f92c4d
I think this should be changed to "phpstan/phpstan": "~0.12.0" .
On a sidenote, I personally think that it would be beneficial to require
Curious what you would think about this. |
@mleutenegger PHPStan is currently at version |
@marwan38 Even more reason to get this working with newer versions and keep this maintained. As far as my comment was concerned, I was referring to the target version of this PR. It would be a good idea to jump to the newest version, but this will probably require some additional work. Will have to check that and most likely add a new PR... |
@nglasl are you still using this much at Symbiote? If not, would it make sense to publish a fork? Perhaps @mleutenegger would be interested in maintaining such a fork? |
@sminnee I'm trying to develop this extension locally, but, I can't get it to run. Do you mind sharing how you set up this repo to be able to develop on it? EDIT: Going to try cloning into vendor folder and requiring it by file |
@sminnee Actually, I already thought about creating and publishing a fork under the It would take some lifting to get it to work with the newest PHPStan version (especially https://phpstan.org/developing-extensions/always-read-written-properties is not happy with properties being used as config values). |
Sorry guys, I've moved on from Silverstripe development and I'm no longer a maintainer, however as I recall we weren't actively using this outside a single project. |
@sminnee I have now created such a fork, as I was troubled with outdated dependencies & conflichts resolving them. Will start updating projects to use this fork in the near future. It is compatible with the newest version of PHPStan and installs it as a dependency (so no more suggest) and so far seems to work fine. If interested, I would be grateful if you could give it a spin! |
Unfortunately retaining 0.11 support isn’t feasible but that seems like
an acceptable tradeoff.
Note that some of the type-hinting of DataLists will now be doable with
phpstan’s template features - we can type hint DataList for
example, and we can commit some @phpstan-return clauses to the core
framework to support this.