[PHP 7.4 RC6] Anonymous class used in getContainerExtension causes: ReflectionException: Class "Configuration" not found while loading "\Configuration" #34613
Labels
Good first issue
Ideal for your first contribution! (some Symfony experience may be required)
Help wanted
Issues and PRs which are looking for volunteers to complete them.
Symfony version(s) affected: 4.4.0
Description & How to reproduce
I'm running PHP 7.4 RC6 on CircleCI and discovered a weird error.
I'm using
DoctrineDataFixturesExtension
that defines it's extension using an anonymous class:https://github.com/BehatExtension/DoctrineDataFixturesExtension/blob/0304b9df7037993cde56dbe38eef31b8d2717854/src/Bundle/BehatDoctrineDataFixturesExtensionBundle.php#L21-L26
When I run a unit test that uses
KernelTestCase
I get the following error:I think the problem is here:
symfony/src/Symfony/Component/DependencyInjection/Extension/Extension.php
Lines 81 to 85 in 7719fc7
I added some
var_dump
calls:I think this must be related to the anonymous class.
Is this even supported? And if it is, how should we handle this case properly?
Possible Solution
Would an early return like this help?
The text was updated successfully, but these errors were encountered: