diff -up ./gen_stub.php.old ./gen_stub.php --- ./gen_stub.php.old 2024-10-21 07:42:09.285923573 +0200 +++ ./gen_stub.php 2024-10-21 07:43:44.385591795 +0200 @@ -1809,6 +1809,12 @@ function initPhpParser() { } $isInitialized = true; + + if (file_exists('/usr/share/php/PhpParser4/autoload.php')) { + require_once '/usr/share/php/PhpParser4/autoload.php'; + return; + } + $version = "4.9.0"; $phpParserDir = __DIR__ . "/PHP-Parser-$version"; if (!is_dir($phpParserDir)) {