You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
While debugging an issue with a class that is missing an interface (contao/contao#89) I was able to reduce the bug to a simple reproduction case with the ClassExistenceResource::isFresh() method.
The method autoloads a class even though it implements a missing interface. I’m not sure if this might be bug in PHP too, because loading a class without one of its interfaces should not be possible I think?
<?phprequire__DIR__.'/vendor/autoload.php';
$resource = new \Symfony\Component\Config\Resource\ClassExistenceResource('Foo', false);
// The following line autoloads the Foo class,// even though it implements a non-existent interface$resource->isFresh(1);
// The following lines would normally result in a ClassNotFoundException for the missing interface.var_dump((new \ReflectionClass('Foo'))->getInterfaces());
// array(0) {}
Foo::bar();
// string(8) "Foo::bar"
The text was updated successfully, but these errors were encountered:
Symfony version(s) affected: 4.1.6
Description
While debugging an issue with a class that is missing an interface (contao/contao#89) I was able to reduce the bug to a simple reproduction case with the
ClassExistenceResource::isFresh()
method.The method autoloads a class even though it implements a missing interface. I’m not sure if this might be bug in PHP too, because loading a class without one of its interfaces should not be possible I think?
How to reproduce
composer.json
Foo.php
test.php
The text was updated successfully, but these errors were encountered: