That’s a very odd-looking package.
It’s not strange that it can’t find the class Amadeusclient, because there’s no such class. As the actual source code shows, despite the fact that the file is called AmadeusClient.php, the class name is SelfServiceApiClient. The namespace doesn’t match the folder either.
I have no idea why the author decided that was a good naming scheme (it’s not), but I’m pretty sure it will break Composer’s autoloader.
The easiest way to fix it would be to add the file to autoload > classmap section in your Composer file – that way, PHP will know which file to look for the class in. Then you would use the actual namespace and class in your code, not the names of the folder and file:
// In composer.json
{
"require": { ... }, // and so on
"autoload": {
"classmap": [
"vendor/dahabtours/amadeusclient/AmadeusClient.php"
]
}
}
// In your controller
use AmadeusDahabtours\SelfServiceApiClient;
class AirportController extends Controller {
public function index() {
$api = new SelfServiceApiClient;
}
}