webfactory / WebfactoryPolyglotBundle

Symfony bundle simplifying translations in Doctrine.
MIT License
3 stars 2 forks source link

Reduce priority for Doctrine event subscriber #6

Closed xkons closed 7 years ago

xkons commented 7 years ago

This way I can be sure that objects that are to be translated are actually ready.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-1.06%) to 84.615% when pulling 5d037a9b86851eb02e1f28f8f745bd7100c16f07 on add_event_subscriber_service_priority into f227c8be27ef65f40e322cfbef36c532d166b3e4 on master.

mpdude commented 7 years ago

The use case is that if you have additional life cycle event listeners set up in Doctrine that initialize fields marked as translatable, we want Polyglot to handle these fields (injecting the value holders) somewhat later.

In result, it should be possible to use Polyglot also for fields not managed directly by Doctrine, but by additional extensions depending on the postLoad event.

mpdude commented 7 years ago

@xkons Fine!

Could you please add a short changelog entry as well ("changed priority ... to -100... to defer injection of translation objects..." or similar), and then merge this and create a release tag? I think this qualifies as a bugfix.

Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.02%) to 84.599% when pulling a56dfcf8a01ecfba250f11e12d943544495b73c4 on add_event_subscriber_service_priority into 6df74af00e55aa349f5469cfe9ef7ba32871066d on master.