3 ms·
My recommendation for every PHP projects that uses external libraries is to use your own wrapper function/class to minimize contamination of the project. If yo
by tored 4y ago
My recommendation for every PHP projects that uses external libraries is to use your own wrapper function/class to minimize contamination of the project.
If you use a framework then try to write all your own code outside of the framework and pass in all needed framework data as arguments to your own classes/functions.
- n0n0n4t0r 4y agoI agree with you: this is a good practice. However, what I was speaking about is the version handling of (sometimes direct but mostly) indirect dependencies. The domain of `composer why` and `composer why-not`. One if the most speaking example I can think of is: if two libs depends on guzzle 5, then you can't update only one on a version that depends on guzzle 6: you must upgrade both at the same time. Each to an intercompatible lock on guzzle version.