[2017-01-26 11:22:36] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined method Illuminate\Routing\Route::getUri() in /home/vagrant/Code/someline-starter-master/vendor/dingo/api/src/Routing/Adapter/Laravel.php:98
Stack trace:
#0 /home/vagrant/Code/someline-starter-master/vendor/dingo/api/src/Routing/Route.php(158): Dingo\Api\Routing\Adapter\Laravel->getRouteProperties(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#1 /home/vagrant/Code/someline-starter-master/vendor/dingo/api/src/Routing/Route.php(148): Dingo\Api\Routing\Route->setupRouteProperties(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#2 /home/vagrant/Code/someline-starter-master/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 /home/vagrant/Code/someline-starter-master/vendor/dingo/api/src/Routing/Router.php(758): Dingo\Api\Routing\Router->createRoute(Object(Illuminate\Routing\Route))
#4 /home/vagrant/Code/someline-starter-master/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 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Container/Container.php(714): ReflectionClass->newInstanceArgs(Array)
#7 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Container/Container.php(565): Illuminate\Container\Container->build('Dingo\\Api\\Conso...')
#8 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(702): Illuminate\Container\Container->make('Dingo\\Api\\Conso...')
#9 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Console/Application.php(192): Illuminate\Foundation\Application->make('Dingo\\Api\\Conso...')
#10 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Console/Application.php(206): Illuminate\Console\Application->resolve('Dingo\\Api\\Conso...')
#11 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(232): Illuminate\Console\Application->resolveCommands(Array)
#12 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Console/Application.php(111): Illuminate\Support\ServiceProvider->Illuminate\Support\{closure}(Object(Illuminate\Console\Application))
#13 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Console/Application.php(58): Illuminate\Console\Application->bootstrap()
#14 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(287): Illuminate\Console\Application->__construct(Object(Illuminate\Foundation\Application), Object(Illuminate\Events\Dispatcher), '5.4.3')
#15 /home/vagrant/Code/someline-starter-master/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Illuminate\Foundation\Console\Kernel->getArtisan()
#16 /home/vagrant/Code/someline-starter-master/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 {main}
In issues addressed this, #1314.
If I need this package urgently, will you release it first or how to quick fix it?
To install the latest dev-master branch, also don't work!
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
- Conclusion: remove laravel/framework v5.4.3
- Conclusion: don't install laravel/framework v5.4.3
- Conclusion: don't install laravel/framework v5.4.2
- Conclusion: don't install laravel/framework v5.4.1
- Conclusion: don't install laravel/framework v5.4.0
- Installation request for dingo/api dev-master -> satisfiable by dingo/api[dev-master].
This is because in composer.json the dev-master is aliased to 1.0-dev.
Until a new version is tagged you could use my fork:
"require": {
"dingo/api": "dev-master",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/rhwilrForks/api"
},
{
"type": "vcs",
"url": "https://github.com/rhwilrForks/blueprint"
}
],
Api is still pointing to old blueprint that doesn't work with 5.4 yet
+1
Please tag a new version for Laravel 5.4
+1
+1
+1
+1
I know it's really ugly, but if you're being held up by this issue and you desperately need to get around it, you could do the following (until a patch is officially released):
"dingo/api": "1.0.x@dev" to your composer.json filecomposer updateThat's how I got things up and running for the time being.
it doesn't work
I made a simple line to script section into the composer.json to download the last version for this file Routing/Adapter/Laravel.php
post-create-project-cmd sectionwget -q https://raw.githubusercontent.com/dingo/api/master/src/Routing/Adapter/Laravel.php -O vendor/dingo/api/src/Routing/Adapter/Laravel.php
like this
"post-create-project-cmd": [
"wget -q https://raw.githubusercontent.com/dingo/api/master/src/Routing/Adapter/Laravel.php -O vendor/dingo/api/src/Routing/Adapter/Laravel.php",
"php artisan key:generate",
"php artisan jwt:generate"
],
composer updateYou could reference the last master commit :
"dingo/api": "dev-master#a852013"
+1
@Broutard not working sir!
@libern
success ???
+1
public function getRouteProperties($route, Request $request)
{
return [$route->uri(), $route->methods(), $route->getAction()];
}
@YannGrosjean what? 成功了吗?
+1
+1
+1
I am working on the development of an api and it is working with larevel "5.4.*" and dingo
"dev-master # a852013"
tested with "php artisan api:routes" and tests on codeception, work ok
@Broutard
What about Laravel 5.5?
Most helpful comment
I know it's really ugly, but if you're being held up by this issue and you desperately need to get around it, you could do the following (until a patch is officially released):
"dingo/api": "1.0.x@dev"to yourcomposer.jsonfilecomposer updateThat's how I got things up and running for the time being.