Open davidbarratt opened 9 years ago
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/"
]
}
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-L10However, 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:or the
composer.json
should be updated to use aclassmap
instead of PSR-4 https://getcomposer.org/doc/04-schema.md#classmap