-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: symfony container #1
base: master
Are you sure you want to change the base?
Conversation
Hello @nunomaduro, PHPStan barks because:
What's actually wrong with this?
That's the point of the service locator. Can I safely add a phpstan-ignore directive on that one? |
77bb5ad
to
d40fb16
Compare
d40fb16
to
66fb262
Compare
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.
Hi @bpolaszek ! Great work 👏
For the nullable parameter error in phpstan, the rule come from https://github.com/ergebnis/phpstan-rules#functionsnoparameterwithnullabletypedeclarationrule
In this case, I think you can ignore them in phpstan.neon or via @phpstan-ignore-next-line
annotation.
f165414
to
ecaa133
Compare
ecaa133
to
1feb0a7
Compare
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.
Everything sounds good for me, just those small comments.
CI is green! 🎉 |
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.
Wonderful 🎉
This is good to merge? No updates needed on the docs? |
Maybe some doc entries would be cool indeed. I'll write them ASAP, and I think they should be part of the PR (unless you prefer I do a separate one). Sorry to produce code in drops, I do that in my spare time among other things (as we all do in OSS, but it's always frustrating that weeks pass and nothing lands...). |
Docs should go here: https://github.com/pestphp/docs. |
This 1st PR provides 2 helpers:
app()
giving access to the Kernelcontainer()
giving access to the container. WhenAPP_ENV
istest
, Symfony exposes a special container where all services are public. If it exists, it is picked by default.