0

I'm having a bit of a problem with Laravel's artisan commands and more specifically with artisan route:list. When I execute this command, the result is the following :

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

I've tried bumping up the number of nested level with xdebug.max_nesting_level but without success. The link to my repo is here if anyone is intested.

KuKeC
  • 4,392
  • 5
  • 31
  • 60
Sahbi Belgacem
  • 664
  • 8
  • 20

1 Answers1

0

This might help: https://stackoverflow.com/a/30839127/4617687

Apparently changing this value at runtime also helps.

Community
  • 1
  • 1
Filip Sobol
  • 5,198
  • 3
  • 13
  • 24
  • Yeah, I've already tried that. Whatever value I put in there, the exact number of line will be outputted by the console :( – Sahbi Belgacem Feb 13 '17 at 18:28
  • Which version of Laravel are you using? This issue can occur when you are wrapping routes in 'web' middleware (which is automatically done since v5.2.27). I cannot check that, because you already deleted your repo. – Filip Sobol Feb 13 '17 at 20:48