From a1c680d14d542f55f8ade3e1a8ba508cfd9f9d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Wed, 25 Oct 2023 17:05:24 +0200 Subject: [PATCH] Increase xdebug.max_nesting_level to 1000 if required in bin/console script Fix issue #411 --- bin/console | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/console b/bin/console index c933dc53..88268a20 100755 --- a/bin/console +++ b/bin/console @@ -4,6 +4,13 @@ use App\Kernel; use Symfony\Bundle\FrameworkBundle\Console\Application; +//Increase xdebug.max_nesting_level to 1000 if required (see issue #411) +//Check if xdebug extension is active, and xdebug.max_nesting_level is set to 256 or lower +if (extension_loaded('xdebug') && ((int) ini_get('xdebug.max_nesting_level')) <= 256) { + //Increase xdebug.max_nesting_level to 1000 + ini_set('xdebug.max_nesting_level', '1000'); +} + if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); }