prawnsalad / Nexmo-PHP-lib

Nexmo SMS gateway example library
MIT License
121 stars 98 forks source link

PSR-4 Autoloading Failing #25

Open davidbarratt opened 9 years ago

davidbarratt commented 9 years ago

In composer.json it is specified that a PSR-4 Autoloader can be used: https://github.com/prawnsalad/Nexmo-PHP-lib/blob/master/composer.json#L8-L10

However, the classes in the library do not have a namespace which is required by PSR-4 http://www.php-fig.org/psr/psr-4/

Either a namespace should be added to all three classes like so:

namespace PrawnSalad\Nexmo;

or the composer.json should be updated to use a classmap instead of PSR-4 https://getcomposer.org/doc/04-schema.md#classmap

bryglen commented 9 years ago

Bumping this issue :+1: for this

arianmaykon commented 9 years ago

:+1:

northern commented 9 years ago

Yep. This library is pretty much unusable because of the lack of proper name-spacing.

giannidhooge commented 8 years ago

Solved this issue by adding the following snippet to my own composer.json. Hopes this helps!

"autoload": {
   "classmap": [
      "vendor/prawnsalad/nexmo/src/"
   ]
}