If you have been using PHP for a while, you’re probably aware that Composer is the de facto standard for developers as it integrates others’ work and experience. Before the launch of Composer, it was an uphill battle to manage and share libraries in PHP; as a consequence, you had to develop and maintain every single code.
Today, Composer lets you freely choose libraries from different areas of expertise and empowers you to support your products on different platforms. In short, Composer offers full control of the environment to the developers.
However, in a multi-user system like the Joomla CMS environment, the use of Composer is limited due to the possibility of conflicts arising between the installed libraries.
A possible conflict could arise when a framework has a class ‘MyView,’ and another library also has a class named ‘MyView.’
Composer cannot resolve these naming conflicts, resulting in you spending days copy-pasting and testing library source code with new namespaces.
That’s where a PHP-Prefixer comes in handy.
Prefixing PHP is a common practice to avoid conflicts between libraries. Unlike any other PHP service, PHP-Prefixer makes prefixing the source code a breeze. From managing and tailoring the namespaces, it’s a service which lets you prefix Composer-installed dependencies.
PHP-Prefixer gives you the power to install any library and requires no local installation, as it’s a cloud-based service.
It’s a revolutionary way to design solutions because you only have to declare how to prefix. PHP-Prefixer does it for you!
Simple, isn’t it?
If you’re an avid Joomla user, use the How to prefix a Joomla module guide for learning more about PHP-Prefixer.
The use of Composer on Joomla is a well-known practice. Refer to the official documentation, Using Composer with Joomla, to learn more on this.
Try the Tutorial
Are you ready to learn PHP-Prefixer?
Follow the tutorial here and build your first prefixed Joomla plugin!