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

[DI] Fixed wrong factory method in exception #29697

Merged
merged 3 commits into from Jan 5, 2019

Conversation

@wgorczyca
Copy link

wgorczyca commented Dec 27, 2018

Q A
Branch? 4.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #29678
License MIT
Doc PR n/a

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.

@wgorczyca wgorczyca force-pushed the wgorczyca:bugfix/29678-dependency-injection-wrong-factory-method branch from ffd8d9d to 092098f Dec 27, 2018

@xabbuh xabbuh added this to the 3.4 milestone Dec 27, 2018

@xabbuh

xabbuh approved these changes Dec 28, 2018

@ogizanagi

This comment has been minimized.

Copy link
Member

ogizanagi commented Dec 29, 2018

This could be merged on 4.1 though.

xabbuh and others added some commits Jan 4, 2019

minor #29778 remove no longer needed PHP version checks (xabbuh)
This PR was merged into the 4.1 branch.

Discussion
----------

remove no longer needed PHP version checks

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

7a132fe remove no longer needed PHP version checks
@fabpot

fabpot approved these changes Jan 5, 2019

@fabpot fabpot changed the base branch from 4.2 to 4.1 Jan 5, 2019

@fabpot fabpot force-pushed the wgorczyca:bugfix/29678-dependency-injection-wrong-factory-method branch from 092098f to 922885c Jan 5, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Jan 5, 2019

Thank you @wgorczyca.

@fabpot fabpot merged commit 922885c into symfony:4.1 Jan 5, 2019

1 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build cancelled
Details
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Jan 5, 2019

bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gor…
…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

This comment has been minimized.

Copy link
Member

xabbuh commented Jan 5, 2019

@fabpot Doesn't this fix apply to 3.4 too?

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Jan 5, 2019

To be honest, I didn't check, just trusted @origaminal's comment to merge it on 4.1.

xabbuh added a commit that referenced this pull request Jan 5, 2019

bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gor…
…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

chalasr added a commit that referenced this pull request Jan 5, 2019

Merge branch '3.4' into 4.1
* 3.4:
  properly fix tests on PHP 5
  fix tests on PHP 5
  bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
  Changed gender choice types to color
  remove no longer needed PHP version checks
  Fixed groupBy argument value in DefaultChoiceListFactoryTest
  [HttpKernel] Correctly Render Signed URIs Containing Fragments
  [HttpFoundation] Fix request uri when it starts with double slashes

chalasr added a commit that referenced this pull request Jan 5, 2019

Merge branch '4.1' into 4.2
* 4.1:
  properly fix tests on PHP 5
  fix tests on PHP 5
  remove doubled dot from exception message
  bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
  [Intl] make type-hinted arguments nullable
  [DI] Fixed wrong factory method in exception
  Changed gender choice types to color
  remove no longer needed PHP version checks
  remove no longer needed PHP version checks
  Fixed groupBy argument value in DefaultChoiceListFactoryTest
  [HttpKernel] Correctly Render Signed URIs Containing Fragments
  [HttpFoundation] Fix request uri when it starts with double slashes

chalasr added a commit that referenced this pull request Jan 5, 2019

Merge branch '4.2'
* 4.2:
  properly fix tests on PHP 5
  fix tests on PHP 5
  remove doubled dot from exception message
  bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
  [Intl] make type-hinted arguments nullable
  [DI] Fixed wrong factory method in exception
  Changed gender choice types to color
  Fix unnecessary use
  remove no longer needed PHP version checks
  remove no longer needed PHP version checks
  Fixed groupBy argument value in DefaultChoiceListFactoryTest
  [HttpKernel] Correctly Render Signed URIs Containing Fragments
  [HttpFoundation] Fix request uri when it starts with double slashes

This was referenced Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment