Swagger-php: Fatal error: Maximum function nesting level of '256' reached, aborting!

Created on 2 Oct 2017  Â·  1Comment  Â·  Source: zircote/swagger-php

Seems there is a recursion at vendor/zircote/swagger-php/src/StaticAnalyser.php on line 276

Checked out latest version 2.0.11, ran it through ./vendor/bin/swagger against project that has no annotations and got error in title

Upd. Seems that its caused by consecutive comments with // that are more than 256 lines long — cleaning up project from // to /* lots of lines */ helped

Most helpful comment

PHP doesn't have a Maximum function nesting level, however when you enable the xdebug extension you do.

I've fixed the issue for // comments, until that's released a quickfix would be set xdebug.max_nesting_level=1000 in your php.ini or disable xdebug

>All comments

PHP doesn't have a Maximum function nesting level, however when you enable the xdebug extension you do.

I've fixed the issue for // comments, until that's released a quickfix would be set xdebug.max_nesting_level=1000 in your php.ini or disable xdebug

Was this page helpful?
0 / 5 - 0 ratings