Getting this beautiful exception on Laravel 5.5 dev branch
[2017-07-30 04:08:38] local.ERROR: Call to undefined method Illuminate\Routing\Route::getUri() {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Call to undefined method Illuminate\\Routing\\Route::getUri() at /var/www/app.dev/vendor/dingo/api/src/Routing/Adapter/Laravel.php:98)
[stacktrace]
#0 /var/www/app.dev/vendor/dingo/api/src/Routing/Route.php(158): Dingo\\Api\\Routing\\Adapter\\Laravel->getRouteProperties(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#1 /var/www/app.dev/vendor/dingo/api/src/Routing/Route.php(148): Dingo\\Api\\Routing\\Route->setupRouteProperties(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#2 /var/www/app.dev/vendor/dingo/api/src/Routing/Router.php(696): Dingo\\Api\\Routing\\Route->__construct(Object(Dingo\\Api\\Routing\\Adapter\\Laravel), Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#3 /var/www/app.dev/vendor/dingo/api/src/Routing/Router.php(758): Dingo\\Api\\Routing\\Router->createRoute(Object(Illuminate\\Routing\\Route))
#4 /var/www/app.dev/vendor/dingo/api/src/Console/Command/Routes.php(55): Dingo\\Api\\Routing\\Router->getRoutes()
#5 [internal function]: Dingo\\Api\\Console\\Command\\Routes->__construct(Object(Dingo\\Api\\Routing\\Router))
#6 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Container/Container.php(785): ReflectionClass->newInstanceArgs(Array)
#7 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Container/Container.php(631): Illuminate\\Container\\Container->build('Dingo\\\\Api\\\\Conso...')
#8 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Container/Container.php(586): Illuminate\\Container\\Container->resolve('Dingo\\\\Api\\\\Conso...', Array)
#9 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(721): Illuminate\\Container\\Container->make('Dingo\\\\Api\\\\Conso...', Array)
#10 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Console/Application.php(192): Illuminate\\Foundation\\Application->make('Dingo\\\\Api\\\\Conso...')
#11 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Console/Application.php(206): Illuminate\\Console\\Application->resolve('Dingo\\\\Api\\\\Conso...')
#12 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(252): Illuminate\\Console\\Application->resolveCommands(Array)
#13 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Console/Application.php(111): Illuminate\\Support\\ServiceProvider->Illuminate\\Support\\{closure}(Object(Illuminate\\Console\\Application))
#14 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Console/Application.php(58): Illuminate\\Console\\Application->bootstrap()
#15 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(322): Illuminate\\Console\\Application->__construct(Object(Illuminate\\Foundation\\Application), Object(Illuminate\\Events\\Dispatcher), '5.5-dev')
#16 /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(125): Illuminate\\Foundation\\Console\\Kernel->getArtisan()
#17 /var/www/app.dev/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
#18 {main}
"}
Update: managed to fix the first error by manually dropping the latest 5.4 release into vendor (again, not working with composer). But now there's another issue when using a named route
PHP error: Call to undefined method Dingo\Api\Routing\Route::getDomain() in /var/www/app.dev/vendor/laravel/framework/src/Illuminate/Routing/RouteUrlGenerator.php on line 114
Hope this gets fixed for L. 5.5...
@alex996 why are you already using 5.5 in production? I see you like to live dangerously :D I wouldn't expect support for 5.5 anytime soon, hell support for 5.4 isn't even 100% there yet
@smtlk The stack trace is misleading; it's actually a dev setup on my Ubuntu. But I did get the package working by changing the source code manually. I thought that v1.0.0-beta8 was ready for 5.4. My gut feeling tells me that not that much is different in 5.5 in terms of request/response handling, so a few fixes here and there should do the job?
We really need to some updates on this package, not major but something on pull requests that community has created.
I have same problem
@jasonlewis
I forked the projects (api and blueprint). I use those forks in my composer.json and it works with Laravel 5.5.
Simply add
"repositories": [
{
"type": "vcs",
"url": "https://github.com/BafS/api"
},
{
"type": "vcs",
"url": "https://github.com/BafS/blueprint"
}
],
in your composer file and update.
We would appreciate upgrading this package with Laravel 5.5
@hskrasek maybe you could add a collaborator to this project ?
+1
+1
+1
same problem
+1
Thanks !
(PS: the url is https://github.com/dingo/api/tree/v2.0.0-alpha1)
@thilanga How to install it via composer? I tried this:
composer require dingo/[email protected]
But get this:
[InvalidArgumentException]
Could not find package dingo/[email protected] at any version for your
minimum-stability (stable). Check the package spelling or your minimum-
stability
@MovingGifts
composer require dingo/api:v2.0.0-alpha1
or use the alias dev-master => 2.0.x-dev
composer require dingo/api:dev-master
Thanks, I tried your first command but get this:
> composer require dingo/api:v2.0.0-alpha1
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for dingo/api v2.0.0-alpha1 -> satisfiable by dingo/api[v2.0.0-alpha1].
- Conclusion: don't install dingo/blueprint v0.2.3
- Installation request for phpdocumentor/type-resolver (installed at 0.4.0) -> satisfiable by phpdocumentor/type-resolver[0.4.0].
- Conclusion: don't install dingo/blueprint v0.2.3|remove phpdocumentor/reflection-docblock 4.1.1|install phpdocumentor/reflection-docblock 3.1.0|install phpdocumentor/reflection-docblock 3.1.1|install phpdocumentor/reflection-docblock 3.2.1|install phpdocumentor/reflection-docblock 3.2.2
- Installation request for phpdocumentor/reflection-docblock (installed at 4.1.1) -> satisfiable by phpdocumentor/reflection-docblock[4.1.1].
- Conclusion: remove laravel/framework v5.5.7
- dingo/api v2.0.0-alpha1 requires dingo/blueprint ^0.2 -> satisfiable by dingo/blueprint[0.2.2, v0.2.0, v0.2.1, v0.2.3].
- dingo/blueprint 0.2.2 requires illuminate/filesystem 5.1.* || 5.2.* || 5.3.* || 5.4.* -> satisfiable by illuminate/filesystem[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9].
- dingo/blueprint v0.2.0 requires illuminate/filesystem 5.1.* || 5.2.* || 5.3.* -> satisfiable by illuminate/filesystem[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- dingo/blueprint v0.2.1 requires illuminate/filesystem 5.1.* || 5.2.* || 5.3.* -> satisfiable by illuminate/filesystem[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.7, v5.3.0, v5.3.16, v5.3.23, v5.3.4].
- don't install illuminate/filesystem v5.4.0|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.13|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.17|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.19|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.27|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.36|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.4.9|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.1|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.13|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.16|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.2|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.20|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.22|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.25|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.28|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.30|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.31|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.41|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.6|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.1.8|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.0|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.19|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.21|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.24|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.25|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.26|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.27|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.28|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.31|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.32|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.37|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.43|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.45|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.6|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.2.7|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.3.0|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.3.16|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.3.23|don't install laravel/framework v5.5.7
- don't install illuminate/filesystem v5.3.4|don't install laravel/framework v5.5.7
- Installation request for laravel/framework (installed at v5.5.7, required as 5.5.*) -> satisfiable by laravel/framework[v5.5.7].
Installation failed, reverting ./composer.json to its original content.
The previous dingo/api version never gave me an error on install.
Not sure how to install the 5.5 compatabile version without errors.
dingo/api requires dingo/blueprint (last 0.2.3 for Laravel 5.5)
dingo/blueprint:0.2.3 requires phpdocumentor/reflection-docblock:^3.1 but you requested version 4.1.1
Could you paste your composer.json ?
@MovingGifts
Try to add "dingo/api": "v2.0.0-alpha1" line into composer.json file and run composer update.
"require": {
"php": ">=7.0.0",
"fideloper/proxy": "~3.3",
"laravel/framework": "5.5.*",
"laravel/tinker": "~1.0",
"dingo/api": "v2.0.0-alpha1"
},
that should resolve to needed dependencies.
Atm neither composer require dingo/api:dev-master nor composer require dingo/api:v2.0.0-alpha1 resolves to valid instalation.
because composer require don't change others dependencies.
@Broutard @from2day It installed perfectly now, thank you both :)
It's one of things to do. Need to update Dingo blueprint dependacies.
It'll be happening soon. 馃榿
Most helpful comment
We would appreciate upgrading this package with Laravel 5.5