Closed LeandroLuccerini closed 3 years ago
Hi ! Thanks for the fix.
However the break change will need a new major version of the bundle.
I will merge this in the dev branch. This will be included in the version 4, along other new features.
Feel free to suggest features :+1:
Ok, thank you. This bundle is great! Nice job :+1:
This PR is about issue #39
I've found that if the default Notification entity is overridden, the
NotificationManager::createNotification
method still returns aMgilet\NotificationBundle\Entity\Notification
object and it throws an exception when flushing to the db due toresolve_target_entities
directive configured in doctrine orm.What i have done
ResolveTargetEntitiesPass
that adds theresolve_target_entities
without explicitly changing doctrine configuration;Point no. 4 was added due to the possibility to customize the notification entity. To me it was necessary to change the notification ID from int autoincrement to UUID so the sort didn't work.
BC breaks
Accepting this PR means that who already uses a customized notification class must remove the
resolve_target_entities
directive from the doctrine configuration and add a configuration file.Example
After adding the customized notification class as in #39 just add a configuration file
config/packages/mgilet_notification.yaml
Can it be useful?