Posts

Showing posts from November 26, 2018

Symfony seems to register, but not trigger my doctrine event

Image
up vote 1 down vote favorite sry if something is not so accurate, but im less experienced with Symfony I have the following orm mapping: src/app/ExampleBundle/Resources/config/doctrine/Base.orm.yml appExampleBundleEntityBase: type: mappedSuperclass fields: createdAt: type: datetime nullable: true options: default: null updatedAt: type: datetime nullable: true options: default: null This creates a entity Base which i modified to be abstract src/app/ExampleBundle/Entity/Base.php abstract class Base { ... } I have some other entities they extend this abstract class e.g. src/app/ExampleBundle/Entity/Category.php class Category extends Base { ... } Now i tried to add a listener that sets the createdAt/updatedAt