laravel artisan route:list导致FatalErrorException

时间:2017-02-13 11:14:35

标签: php laravel laravel-5.4

我对Laravel的工匠命令有一些问题,更具体地说是artisan route:list。执行此命令时,结果如下:

PHP Fatal error:  Maximum function nesting level of '256' reached, aborting! in /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 950
PHP Stack trace:
PHP   1. {main}() /Users/sa7bi/Code/smartly/artisan:0
PHP   2. Illuminate\Foundation\Console\Kernel->handle() /Users/sa7bi/Code/smartly/artisan:35
PHP   3. Symfony\Component\Console\Application->run() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:123
PHP   4. Symfony\Component\Console\Application->doRun() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:120
PHP   5. Symfony\Component\Console\Application->doRunCommand() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:189
PHP   6. Illuminate\Console\Command->run() /Users/sa7bi/Code/smartly/vendor/symfony/console/Application.php:826
PHP   7. Symfony\Component\Console\Command\Command->run() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Console/Command.php:167
PHP   8. Illuminate\Console\Command->execute() /Users/sa7bi/Code/smartly/vendor/symfony/console/Command/Command.php:262
PHP   9. Illuminate\Container\Container->call() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Console/Command.php:182
PHP  10. Illuminate\Container\BoundMethod::call() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/Container.php:524
PHP  11. Illuminate\Container\BoundMethod::callBoundMethod() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:30
PHP  12. value() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:86
PHP  13. Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/helpers.php:912
PHP  14. call_user_func_array:{/Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28
PHP  15. Illuminate\Foundation\Console\RouteListCommand->fire() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:28
PHP  16. Illuminate\Foundation\Console\RouteListCommand->getRoutes() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:75
PHP  17. Illuminate\Support\Collection->map() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:87
PHP  18. array_map() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/Collection.php:636
PHP  19. Illuminate\Foundation\Console\RouteListCommand->Illuminate\Foundation\Console\{closure}() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Support/Collection.php:636
PHP  20. Illuminate\Foundation\Console\RouteListCommand->getRouteInformation() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:86
PHP  21. Illuminate\Foundation\Console\RouteListCommand->getMiddleware() /Users/sa7bi/Code/smartly/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:114

我尝试使用xdebug.max_nesting_level增加嵌套级别的数量,但没有成功。 如果有人参与,我的回购链接是here

1 个答案:

答案 0 :(得分:0)

这可能会有所帮助:https://stackoverflow.com/a/30839127/4617687

显然在运行时更改此值也有帮助。