dingo / api

A RESTful API package for the Laravel and Lumen frameworks.
BSD 3-Clause "New" or "Revised" License
9.33k stars 1.25k forks source link

Router not loading on Travis CI #1529

Open olotintemitope opened 6 years ago

olotintemitope commented 6 years ago
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.4
Package version 1.0.0-beta8
PHP version 5.6.32

Actual Behaviour

Ps: I'm using Laravel 5.4 and "dingo/api": "1.0.0-beta8", On Travis the router is not registered in the service container.

Describe the behaviour you're experiencing. Do not just copy and paste a random error message and expect help.

PHP Fatal error:  Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router].' in /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php:895
Stack trace:
#0 /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php(735): Illuminate\Container\Container->notInstantiable('Dingo\\Api\\Contr...')
#1 /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php(608): Illuminate\Container\Container->build('Dingo\\Api\\Contr...')
#2 /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php(575): Illuminate\Container\Container->resolve('Dingo\\Api\\Contr...')
#3 /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container in /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router].' in /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895
Illuminate\Contracts\Container\BindingResolutionException: Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router]. in /home/travis/build/andela-tolotin/inventory-manager/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 895

Expected Behaviour

Describe the behaviour you're expecting. The router should work in the test environment like the way it's working on the local and prod environments.

Steps to Reproduce

List all the steps needed to reproduce the issue you're having. Make sure to include code (affected models, configurations), any screenshots and/or other resources that may help us understand what's going on.

Possible Solutions

If you have any ideas on how to solve the issue, add them here, otherwise you can omit this part.