EasyAdminBundle
EasyAdminBundle copied to clipboard
Use AdminUrlGeneratorInterface instead of AdminUrlGenerator directly
Short description of what this feature will allow to do:
Class AdminUrlGenerator is marked as final, so there are no possibility to override any functionality. There is a AdminUrlGeneratorInterface in code, but many places use class instead of interface in arguments declaration. This is design fault. If we have Interface, every place should referring to interface, especially when base class is final.
Example of how to use this feature
<?php
#[AsDecorator(decorates: AdminUrlGeneratorDecorator::class)]
class AdminUrlGeneratorDecorator implements AdminUrlGeneratorInterface
{
public function __construct(private AdminUrlGeneratorInterface $decorated)
{
}
// Decorate generateUrl for example
Is you ask about https://github.com/EasyCorp/EasyAdminBundle/releases/tag/v4.8.1
Hey @jakubciszak
Is it still missing use AdminUrlGeneratorInterface anywhere?