2016-11-30 46 views
2

運行時出現PHP致命錯誤異常php artisan make:widget最近新聞,請按照描述here所述進行安裝步驟。運行'php artisan make:widget'時出現最大函數嵌套級別異常

PHP Fatal error: Maximum function nesting level of '256' reached, aborting! in .../vendor/laravel/framework/src/Illuminate/Container/Container.php on line 698 

PHP Fatal error: Maximum function nesting level of '256' reached, aborting! in .../vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php on line 115 

完整的命令輸出可以找到here

增加php.ini中的xdebug.max_nesting_level的值(至500,f.e.)沒有幫助。然後它告訴我它達到了最大功能嵌套水平'500'。

php artisan make:model test runs without any issues。

我正在運行php 7.0.8-2 + deb.sury.org〜xenial + 1並使用laravel 5.3。 使用的widget組件(arrilot/laravel-widgets)可以在here找到。

我在做什麼錯?或者我該如何解決這個問題?

+1

請從https://github.com/illuminate/console/blob/master/GeneratorCommand.php添加一些代碼:) –

+1

(); (Str :: startsWith($ name,$ rootNamespace)){ return $ name; (str :: contains($ name,'/')){ } if(Str :: contains($ name,'/')){name = str_replace('/','\\',$ name); } return $ this-> parseName($ this-> getDefaultNamespace(trim($ rootNamespace,'\\'))。'\\'。$ name); }'你看到它的調用本身,我想''rootNamespace'失敗 – cske

回答

1

這是Laravel v5.3中的一個已知問題,已在v5.3.1中修復。 有關詳細信息,請參閱this topic。 `保護功能PARSENAME($名) {$ = rootNamespace $這個 - > rootNamespace: