-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DependencyInjection] Wrong factory method reported in exception message during container compilation #29678
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
Comments
fabpot
added a commit
that referenced
this issue
Jan 5, 2019
…czyca) This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #29697). Discussion ---------- [DI] Fixed wrong factory method in exception | Q | A | ------------- | --- | Branch? | 4.2 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #29678 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | n/a <!-- required for new features --> When a service definition with a factory defines invalid arguments, the [resulting exception message ](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php#L70)incorrectly specifies the factory constructor instead of the factory method as not having the specified named arguments. <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 922885c [DI] Fixed wrong factory method in exception
xabbuh
pushed a commit
that referenced
this issue
Jan 5, 2019
…czyca) This PR was submitted for the 4.2 branch but it was merged into the 4.1 branch instead (closes #29697). Discussion ---------- [DI] Fixed wrong factory method in exception | Q | A | ------------- | --- | Branch? | 4.2 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #29678 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | n/a <!-- required for new features --> When a service definition with a factory defines invalid arguments, the [resulting exception message ](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Compiler/ResolveNamedArgumentsPass.php#L70)incorrectly specifies the factory constructor instead of the factory method as not having the specified named arguments. <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 922885c [DI] Fixed wrong factory method in exception
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: at least
3.4.20
,4.1.9
,4.2.1
Description
When a service definition with a factory defines invalid arguments, the resulting exception message incorrectly specifies the factory constructor instead of the factory method as not having the specified named arguments.
How to reproduce
git clone git://github.com/symfony/skeleton.git && cd skeleton
config/packages/app.yaml
andsrc/Factory/ApiClientFactory.php
(see below).composer install
Additional context
config/packages/app.yaml
src/Factory/ApiClientFactory.php
The text was updated successfully, but these errors were encountered: