Monday, July 25, 2022

 Why I hate (PHP) Frameworks and Composer


Frameworks make development easy for everybody especially for people that do not know what they are doing. Thinks like Client and Server separation, SQL statements, deployment  are hidden for the developer unless he/she dives into the deep.


Composer is one of the tools that enables this features and it loved because it is so simple to use. In fact these tools makes the developer completely depended from the tools used and therefor ignorant what he/she is doing.


Monolog is a tool that can be used for logging and is embedded in most PHP frameworks (Laravel, symfony and more). Seems a very good reason to use the tool also iso Apache Log4PHP ( not maintained, not PHP 8 compliant). 
But when trying to use it in a DTAP environment is only possible when you use Composer on every use installation. That is absurd.

Composer  and DTAP

Composer creates on every deployed environment a so-called Autoloader. This Autoloader is deployment based dependent and can not be moved from the traditional D⇾T⇾A⇾P by using simple copy commands. The Autoloader will not understand your new environment.


Composer does one thing completely Ok, it installs a package on a system and that works. But the real complexity of the installation is within Composer.
Your developer that is using Composer is completely depended on Composer. If you are also using frameworks that uses composer the problem is only increased,

So my conclusion is: I hate Composer!

No comments: