Tweaking the backend #
WARNING! In general, tweaking is not recommended; please do so at your own risk.
If you are familiar with PHP and Symfony, you can add functionality to the backend, such as:
- Custom CLI commands;
- New APIs;
- Additional handlers for domain events.
However, keep in mind that your code may break at some point due to changes in the Econumo codebase.
How to do that #
Econumo uses a modified
Symfony Kernel to load all Bundles from src
folder.
A good example is the EconumoFamilyBundle
To make it work, you must:
- Create a folder with the
Bundle
suffix, for example,MyBundle
. - Create a file named
MyBundle/MyBundle.php
, which extendsSymfony\Component\HttpKernel\Bundle\Bundle
and includes a publicisActive
method. - Create a file named
MyBundle/Resources/config/services.yaml
for dependency injection. - Mount the
MyBundle
folder in the Econumo Docker Compose to/var/www/src/MyBundle
. - Restart you Docker Compose