Show HN: PHP-Prefixer, prefix PHP libraries and projects(php-prefixer.com) |
Show HN: PHP-Prefixer, prefix PHP libraries and projects(php-prefixer.com) |
We're Andrea and Aníbal from PHP-Prefixer (https://php-prefixer.com). Our company is building a prefixing service to help PHP developers overcome the conflicts between installed libraries.
You might have heard about Composer challenges faced by large software packages, particularly those distributing products on WordPress, Symfony, Laravel, Drupal, Joomla, or any other multi-developer system. We have been using Composer in these contexts for almost ten years and personally worked on solving Composer dependencies conflicts.
Composer conflicts are tricky to solve. In a perfect scenario, project organization is defined at the beginning. As time passes, the installed libraries evolve at different speeds either because specifications of the environment changes or new system requirements are added to the original expectations. There are various ways to solve these issues, and prefixing PHP namespaces is a featured technique that can be applied (read more about this in our presentation [1]).
Our service eases the process of prefixing PHP code - it’s an automated service. By defining what prefixes you need to use in the Composer schema, the tool parses and lexically analyzes the project's files to compile the new prefixed package. After the processing, the automated tests run in the same way as before. We recommend following the quality assurance practices on the final prefixed deliverable (read more about this in our docs [2]).
While testing our tool, we prefixed and learned from over 100 popular libraries and found automation is a computationally intensive task. PHP-Prefixer is an automated online service powered by a complex rule-based system to apply prefixes to all Composer dependencies of a project. Thus, each file is processed iteratively in several phases to take into account all cases.
Thanks to the current availability of unbounded parallel processing resources, the packages can be processed in a few minutes. PHP-Prefixer works with on-demand resources without local installation and as a cloud service without requiring complex software or hardware configurations.
If PHP prefixing has come up in your development process, we'd love to hear about how you handled it. We're always looking to improve and grow our product, and we're incredibly excited to hear feedback from the HN community!
Thanks, Andrea & Anibal
[1] https://blog.php-prefixer.com/2020/12/10/using-composer-in-a... [2] https://php-prefixer.com/docs