-
Notifications
You must be signed in to change notification settings - Fork 95
Support for parameterised service class #254
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
Conversation
/cc @lookyman needs to say if it's okay :) This is how the Can't we just call something in Symfony to achieve the same? |
Yeah, it would be great to use some kind of resolver and I'll look at it if needed, I just wanted to know if I hooked into right place with parameter expanding 🙂 So let me know @lookyman if that's correct, so I can work on |
Seems ok to me, go ahead. |
@lookyman Symfony resolves placeholders in I did not want to create another PS. |
7a9ecd4
to
368e737
Compare
- Explicit requirement for `symfony/dependency-injection` - Do not use `psr/log` 1.1.2 (see: symfony/symfony#44371 (comment))
368e737
to
d10d156
Compare
Sorry for the noise, but it took me while to understand why it fails on PHP 7.1. Personally I think it's wrong that packages used in actual code are added as dev dependencies, but now I know that adding them to |
Versions 1.1.0 and 1.1.2 does not work properly with Symfony DI (`Psr\Container\ContainerExceptionInterface` extends `\Throwable` there and it causes errors for DI's exception which also extends it).
4425c13
to
46e535d
Compare
@ondrejmirtes @lookyman any chance for merging this? |
Thank you. |
This created a regression if you're not using a full symfony framework. I use this project in Composer for example and I don't have the DI component installed as I only need the symfony/console type inferrence. See https://github.com/composer/composer/runs/5334439438?check_suite_focus=true#step:9:10 So I guess it would be good to detect if the class is present before running ServiceDynamicReturnTypeExtension? |
@Seldaek Sorry for the bug, here's a fix: 8ef80f5 Please test phpstan-symfony 1.1.7 with it, thank you. https://github.com/phpstan/phpstan-symfony/releases/tag/1.1.7 |
It builds again, thanks for the super quick fix! https://github.com/composer/composer/actions/runs/1900486331 |
Sorry @Seldaek for causing problems 😳 And thanks @ondrejmirtes for the fix 🍻 |
No worries, it's easy to forget these components are used without the full framework sometimes :) |
Fixes #226
It's simplest and optimistic implementation which does not support:%env()%
syntax%app.class%_decorator
mixed interpolationLet me know if we can start with this or should we work on most advanced scenarios 🙂