Remove doctrine entity file listener
damien-carcel opened this issue · comments
There is:
- FileListener,
- DoctrineEntityListenerPass
- EntityListenerResolver
All these classes just to inject the upload_dir
parameter into the entity.
This should be done by an independent Subscriber, that listen on a Save event. This way, all upload logic should be put outside the File and Folder entities.
The listener could also be used for the Photo entity of the KhatovarWebBundle, and allow to remove the use of __DIR__
.