Nexmo-PHP-lib
Nexmo-PHP-lib copied to clipboard
PSR-4 Autoloading Failing
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
Bumping this issue :+1: for this
:+1:
Yep. This library is pretty much unusable because of the lack of proper name-spacing.
Solved this issue by adding the following snippet to my own composer.json. Hopes this helps!
"autoload": {
"classmap": [
"vendor/prawnsalad/nexmo/src/"
]
}