lundi 29 décembre 2014

Best practice for using namespaces in my PHP libraries


I've been using a tiny and neat caching library on my projects, but I realize that "Cache" is a very generic name and it's easy to get a collision when using it in large projects.


Also, I would like to publish it in Github in order to share it with colleagues and make it easy for all of us to install using composer.


The problem is that I don't really get all this PSR-4 recommendations.


How should I structure my folders? How should I namespace the library? And how should I autoload it from within my projects?


What I need is probably a very comprehensive composer tutorial, that I wasn't able to find yet...





Aucun commentaire:

Enregistrer un commentaire