-
Notifications
You must be signed in to change notification settings - Fork 89
phpstan fixes #272
base: develop
Are you sure you want to change the base?
phpstan fixes #272
Conversation
src/ServiceManager.php
Outdated
@@ -933,7 +934,7 @@ private function validateOverrides(array $config) | |||
* service instances; if not, it returns, but otherwise, it raises an | |||
* exception indicating modification is not allowed. | |||
* | |||
* @param string[] $services | |||
* @param array $services |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd stick with string[]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, my mistake 👍
f88822a
to
fd9d19b
Compare
I've added phpstan in CI build and fixed some wrong uses of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@thomasvargiu I've just noticed that this targets |
Please rebase, don't merge :) |
My fault, I'm still working on it |
2efa798
to
fa915d9
Compare
@Ocramius
I think we should change PHPDoc of But I'm not sure about this change. We can also ignore the error at the moment. What do you think about it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noted that phpstan should only be added for Travis jobs that require it, not as a general dev dependency.
Additionally, I'll note that a large number of the changes presented here are present in other pull requests; you'll likely need to rebase and run again once those are in place.
composer.json
Outdated
@@ -29,6 +29,7 @@ | |||
"mikey179/vfsStream": "^1.6.4", | |||
"ocramius/proxy-manager": "^2.1.1", | |||
"phpbench/phpbench": "^0.13.0", | |||
"phpstan/phpstan": "^0.10.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be added programmatically in the .travis.yml
when PHPSTAN_TEST
is selected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Done.
It's not a problem, when I open it I though that it could be useful before to introduce strict type hints. We can merge other PRs and then rebase it. |
Rescheduling to 4.0.0 since it targets develop in turn targeting 4.0 |
57829d3
to
202a304
Compare
@weierophinney I rebased it, updated phpstan, done some other fixes. I also allowed |
This repository has been closed and moved to laminas/laminas-servicemanager; a new issue has been opened at laminas/laminas-servicemanager#7. |
This repository has been moved to laminas/laminas-servicemanager. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
|
This PR fixes some issues with phpdoc and types. Used phpstan to static analyse the code.
Added
phpstan
in CI build.