I am working on a Symfony 4 API rest application that will be used by several clients (about 20 different clients). Each client has their specific needs, so I have to fork the web application for each client in order to implement the specific needs. For example, the PriceController that manages the pricing policy will have a custom implementation for each customer. I evaluate to 80% the common code and 20% customization for each client.
My idea is to create a base application with all the base code and for each client, fork the base application and use the package / namespace concept to extend the base classes to add customization.
For example, I define a Core / Controller / PricingController.php to manage the pricing policy. For a CorporationA Client, I create a CorporationA / Controller / PricingController.php and for another CorporationB client I create a CorporationB / Controller / PricingController.php that extend the Core / Controller / PricingController.php.
If I have to implement a specific behavior only for the CorporationB client, I add the specific code in the dedicated class.
What is your opinion about that? Do I have to manage personalization in a different way?
Thanks for your help.