This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Tests/Compiler
Fabien Potencier 0a3d3d4dff bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca)
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
-------

922885c892 [DI] Fixed wrong factory method in exception
2019-01-05 10:39:43 +01:00
..
AnalyzeServiceReferencesPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
AutoAliasServicePassTest.php Merge branch '2.8' into 3.2 2017-06-02 16:37:52 +02:00
AutowireExceptionPassTest.php Adding Definition::addError() and a compiler pass to throw errors as exceptions 2017-09-25 11:28:57 +02:00
AutowirePassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
AutowireRequiredMethodsPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
CheckArgumentsValidityPassTest.php Adding Definition::addError() and a compiler pass to throw errors as exceptions 2017-09-25 11:28:57 +02:00
CheckCircularReferencesPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
CheckDefinitionValidityPassTest.php Alpha-ordering for "use" statements 2018-07-26 11:03:18 +02:00
CheckExceptionOnInvalidReferenceBehaviorPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
CheckReferenceValidityPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
DecoratorServicePassTest.php [DependencyInjection] Fix tags on multiple decorated service 2018-10-31 11:41:01 +01:00
DefinitionErrorExceptionPassTest.php Adding Definition::addError() and a compiler pass to throw errors as exceptions 2017-09-25 11:28:57 +02:00
ExtensionCompilerPassTest.php do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
FactoryReturnTypePassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
InlineServiceDefinitionsPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
IntegrationTest.php [DI] move RegisterServiceSubscribersPass before DecoratorServicePass 2018-12-12 10:27:19 -05:00
MergeExtensionConfigurationPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
OptionalServiceClass.php Merge branch '2.7' into 2.8 2017-11-19 21:05:05 +02:00
PassConfigTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
PriorityTaggedServiceTraitTest.php Updated PHPUnit namespaces 2017-02-20 14:34:33 +01:00
RegisterEnvVarProcessorsPassTest.php Merge branch '3.3' into 3.4 2017-12-20 12:08:06 +01:00
RegisterServiceSubscribersPassTest.php [DI] Add context to service-not-found exceptions thrown by service locators 2017-12-09 20:32:41 +01:00
RemoveUnusedDefinitionsPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
ReplaceAliasByActualDefinitionPassTest.php Merge branch '2.8' into 3.2 2017-02-18 18:28:00 +01:00
ResolveBindingsPassTest.php [DI] fix reporting bindings on overriden services as unused 2018-12-17 17:48:01 +01:00
ResolveChildDefinitionsPassTest.php [DI] fix reporting bindings on overriden services as unused 2018-12-17 17:48:01 +01:00
ResolveClassPassTest.php [DI] Populate class of ChildDefinition when its id matches an existing FQCN 2017-04-10 18:46:19 +02:00
ResolveDefinitionTemplatesPassTest.php Alpha-ordering for "use" statements 2018-07-26 11:03:18 +02:00
ResolveFactoryClassPassTest.php Updated to PHPUnit namespaces 2017-02-20 14:56:45 +01:00
ResolveHotPathPassTest.php [DI] Skip hot_path tag for deprecated services as their class might also be 2017-11-19 23:04:27 +01:00
ResolveInstanceofConditionalsPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
ResolveInvalidReferencesPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
ResolveNamedArgumentsPassTest.php bug #29697 [DI] Fixed wrong factory method in exception (Wojciech Gorczyca) 2019-01-05 10:39:43 +01:00
ResolveParameterPlaceHoldersPassTest.php [DI] Fix cannot bind env var 2017-11-07 09:01:11 +01:00
ResolvePrivatesPassTest.php [DI] Turn private defs to non-public ones before removing passes 2017-10-07 10:21:26 +02:00
ResolveReferencesToAliasesPassTest.php Merge branch '2.8' into 3.4 2018-07-26 11:06:28 +02:00
ResolveTaggedIteratorArgumentPassTest.php [DI] Reference tagged services in config 2017-09-28 16:10:08 +02:00