Codeception / Codeception/AspectMock
Parent class not found by locator
- Lenguaje dominante
- PHP
- Estrellas
- 784
- Forks
- 132
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
When using custom autoloader and try to get an instance of a class which has parent or implements an interface form the same custom namespace I have an error "PHP Fatal error: Uncaught InvalidArgumentException: Class [parent class name] was not found by locator in /workspace/projects/test/vendor/goaop/parser-reflection/src/ReflectionEngine.php:112".
I have very simple setup:
```
init([
'debug' => true,
'includePaths' => [__DIR__. '/lib'],
]);
$kernel->loadFile(__DIR__ . '/autoload.php'); // custom autoloader
$b = new \lib\B();
```
Class \lib\B:
```
namespace lib;
class B extends A {}
```
Class \lib\A:
```
namespace lib;
class A
{
public function getName()
{
return static::class;
}
}
```
Class B is loaded via my custom autoloader, but then the locator tries to load parent class A via composer autoloader and returns this error. Is this a bug, or I'm doing something wrong?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.