Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Théo Fidry:
Managing your dependencies in PHP
Dec 04, 2017 @ 18:55:12

In a recent article Théo Fidry covers a topic that's become common with the use of Composer and various PHP packages: managing dependencies.

When you are creating a PHP application or library, you usually have 3 kinds of dependencies:
  • Hard dependencies: what your application/library needs to be able to run
  • Optional dependencies: for example a PHP library can provide a bridge for different frameworks
  • Development dependencies: debugging tools, test frameworks…

He then works through several of the issues involved with using each including having too many dependencies, untestable dependencies and conflicts. He then counters these with some helpful suggestions around them including the use of phars and using multiple repositories to break down the package and make it easier to manage their dependencies.

tagged: manage dependency composer problem solution example

Link: https://medium.com/@tfidry/managing-your-dependencies-in-php-321d584441ab


Trending Topics: