Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #24991 [DependencyInjection] Single typed argument can be applied…
… on multiple parameters (nicolas-grekas, sroze) This PR was merged into the 3.4 branch. Discussion ---------- [DependencyInjection] Single typed argument can be applied on multiple parameters | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ø | License | MIT | Doc PR | ø I'm @nicolas-grekas' test writer today. This makes the argument resolution working when injecting the same type multiple times (sub-set of PR #24978) Commits ------- d512654 Test that named arguments are prioritized over typehinted bf7eeef Prove that change is working with tests 2176be7 [DI] Fix by-type args injection
- Loading branch information
Showing
5 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Symfony/Component/DependencyInjection/Tests/Fixtures/SimilarArgumentsDummy.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
class SimilarArgumentsDummy | ||
{ | ||
public $class1; | ||
public $class2; | ||
|
||
public function __construct(CaseSensitiveClass $class1, string $token, CaseSensitiveClass $class2) | ||
{ | ||
$this->class1 = $class1; | ||
$this->class2 = $class2; | ||
} | ||
} |