Ajouter un commentaire

Soumis par Goz (non vérifié) le 15/02/2018 à 08:11 - Permalien

Nice as usual. Thanks for this ticket.

One thing concerning the use of hook_entity_presave(). Even if this still works, we should recommend the use of event subscribers. Commerce 2.x implements a lot of events for commerce entities manipulations, and that helps a lot.
Using event subscribers instead of hooks, you can use the powerful dependency injection. Plus code will be more readable, avoiding to put all the code in a single .module file.

At the end (drupal 9.x ?), we should not need .module anymore.