Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #25160 [DI] Prevent a ReflectionException during cache:clear when…
… the parent class doesn't exist (dunglas) This PR was squashed before being merged into the 3.4 branch (closes #25160). Discussion ---------- [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Currently, if you just run the following commands: ``` composer create-project -s beta symfony/skeleton:^3.4 test composer req orm ``` You get the following error: ``` In UniqueEntityValidator.php line 27: [ReflectionException] Class Symfony\Component\Validator\ConstraintValidator not found ``` `UniqueEntityValidator` is in the bridge, but it's parent class is in the validator (that is not installed by default). The hot path optimization feature (enabled by default) uses reflection, and the reflection API throws an exception in this specific case. This PR fixes the error. Commits ------- 6e622c6 [DI] Prevent a ReflectionException during cache:clear when the parent class doesn't exist
- Loading branch information
Showing
4 changed files
with
22 additions
and
1 deletion.
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
7 changes: 7 additions & 0 deletions
7
src/Symfony/Component/DependencyInjection/Tests/Fixtures/ParentNotExists.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,7 @@ | ||
<?php | ||
|
||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures; | ||
|
||
class ParentNotExists extends \NotExists | ||
{ | ||
} |
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