This topic contains 1 reply, has 2 voices, and was last updated by Michael 7 years ago.
- Topic
There are several ways to extend classes:
One can use the bundle class inheritance:
http://symfony.com/doc/current/bundles/inheritance.htmlor the service tags:
http://symfony.com/doc/current/reference/dic_tags.htmlThe main problem of extensibility by inheritance (like Oroplatform and Magento 1 has it) is that only one third party module can extend another class. If more than one modules tries to overwrite a class, a conflict occurs, which then has to get resolved in source code by making tight dependencies between the affected modules.
Using service tags (DI or Event/Observer) is a limited possibility to extend the system because there are/will be never enough of the entry points.
So from my point of view, the best way to get deeper into the system by not messing up the source code is to use techniques a lá Aspect-oriented programming, which has been implemented in Magento2, called “plugins”:
http://devdocs.magento.com/guides/v2.1/extension-dev-guide/plugins.htmlthere is the similar solution on a lower level:
https://github.com/AOP-PHP/AOPThis approach eliminates the risk of having conflicts at the structural level between multiple bundles.
(of course there will be still risk of conflicts on the behavioral level, but that’s not the point)So my question:
Are you interested in implementing a similar technique of extensibility like magento 2’s plugins?Or, if I’m totally wrong about the possibilities in Symfony and Oroplatform:
Are there such kind of extension possibilities?
The forum ‘OroPlatform – Feature Requests’ is closed to new topics and replies.