EasyAdminBundle
EasyAdminBundle copied to clipboard
fix: get controllers fqcn for route load
fixes #6509
current behaviour: injecting tagged_iterator to AdminRouteGenerator while it only needs the controller class fqcn, make it initialize all the controllers (https://github.com/EasyCorp/EasyAdminBundle/issues/6509#issuecomment-2459872219)
example controller
class BookCrudController extends AbstractCrudController
{
public function __construct(
#[Autowire(env: 'NOT_EXISTS')]
private string $notExistsEnv,
) {
}
public static function getEntityFqcn(): string
{
return Book::class;
}
public function configureFields(string $pageName): iterable
{
return [
TextField::new('title'),
BooleanField::new('isPublished'),
];
}
}
proposed solution: use CompilerPass to get all class fqcn