Open beberlei opened 11 years ago
Hi beberlei! Thanks for the suggestions. I'll leave this issue open until I've had time to consider this completely.
OK, so maybe you can help me navigate this. I understand the standard (PSR-0), and I understand why it's important to the community. Here's my problem. I'm making this effort primarily so that I can utilize my client and server implementations within the WordPress community. WordPress still supports 5.2 (specifically 5.2.4 and up), so I can't use PHP namespaces, which means that I have only the class name with which to create an isolated namespace.
Is there any way that I can embrace PSR-0 without utilizing 5.3 namespaces?
@collegeman Yes, PSR-0 falls back to the "old" way defining class to directory mappings by using the underscore, so you could do "TestPHP_Application" for example for a file in lib/TentPHP/Application.php
PSR-0 support implemented. Will add composer.json in the near future. Thanks!
Please make your classes follow PSR-0 and add another vendor-namespace, like
See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
Also a composer.json file to make this library distributable through composer and packagist.org. Composer is a new package management tool that already allows to install over 2000 PHP packages and is used by many major libraries such as Drupal, Symfony2, Zend Framework2.
http://getcomposer.org/ http://www.packagist.org
If you want i could contribute both changes, i really want to see a high quality tent php library early on and this one here is much better than the other one I found.