I have a Doctrine listener that is being detected as dead code.
#[AsDoctrineListener(event: 'postGenerateSchema')]
final readonly class FixDoctrineMigrationTableSchema
{
public function __construct(
#[Autowire(service: 'doctrine.migrations.dependency_factory')]
private DependencyFactory $dependencyFactory,
) {}
/**
* @throws SchemaException
* @throws Exception
*/
public function postGenerateSchema(GenerateSchemaEventArgs $args) : void
{
Or
#[AutoconfigureTag(name: 'doctrine.event_listener', attributes: [
'event' => 'postGenerateSchema',
])]
final readonly class FixDoctrineMigrationTableSchema
{
public function __construct(
#[Autowire(service: 'doctrine.migrations.dependency_factory')]
private DependencyFactory $dependencyFactory,
) {}
/**
* @throws SchemaException
* @throws Exception
*/
public function postGenerateSchema(GenerateSchemaEventArgs $args) : void
{
I have a Doctrine listener that is being detected as dead code.
Or