LoginSignup
0

More than 5 years have passed since last update.

Laravelで'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Maximum function nesting level of '100' reached, aborting!'

Posted at

現象

Laravelで構築中に以下のようなメッセージが出た。

local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Maximum function nesting level of '100' reached, aborting!' in ~vendor/composer/ClassLoader.php:

原因

xdebugのxdebug.max_nesting_level = 100になっているため。

php -i 
~~
xdebug.max_nesting_level => 100 => 100
~~

対処法

1 Laravel DebugBarを使っている場合使用をやめる。

Laravel5の場合.envの

APP_DEBUG    = true

をfalseにすれば消えるため実行が可能になる・・・が、デバッグがしづらくなるのでなるべくならこの方法はとりたくない

2 xdebugの設定をする。

php.iniのxdebug.max_nesting_levelを引き上げる。

xdebug.max_nesting_level = 200

参考

https://laracasts.com/discuss/channels/general-discussion/xdebug-max-nesting-level-reached
https://teratail.com/questions/169
http://stackoverflow.com/questions/8656089/solution-for-fatal-error-maximum-function-nesting-level-of-100-reached-abor

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0