Skip to content

PHPStan 2.2.11 hangs with turbo extension #15142

Description

@acrobat

Bug report

We have a composer script alias to run phpstan in our projects

"phpstan": "phpstan analyse --memory-limit=-1 --no-progress --no-interaction -vvv src",

When executing phpstan while is loads the turbo extension (automatically) it seems to hang and stops with a timeout. If I disable the turbo extension with PHPSTAN_TURBO=0 it runs fine.

Output of standard run with automatically loaded turbo extension

→ symfony composer phpstan
Note: Using configuration file /XXX/XXXX/phpstan.neon.
Result cache not used because the metadata do not match: composerInstalled, phpExtensions
The following exception is caused by a process timeout
Check https://getcomposer.org/doc/06-config.md#process-timeout for details

In Process.php line 1205:

  The process "phpstan analyse --memory-limit=-1 --no-progress --no-interaction -vvv src" exceeded the timeout of 300 seconds.


phpstan [--dev] [--no-dev] [--] [<args>...]

Output of the run without the extension

→ PHPSTAN_TURBO=0 symfony composer phpstan
Note: Using configuration file /xxxx/xxxx/phpstan.neon.
Composer metadata changed but no package versions changed; keeping the result cache.
Result cache restored. 0 files will be reanalysed.
Result cache is saved.


 [OK] No errors


PHP runtime version: 8.3.26
PHP composer.json required version: 8.1-8.5.99
PHP version for analysis: 8.3.26 (from runtime)

PHPStan version: 2.2.11
PHPStan running from:
/xxxx/xxxx/vendor/phpstan/phpstan

Extension installer:
composer/pcre: 3.4.0
phpstan/phpstan-deprecation-rules: 2.0.5
phpstan/phpstan-doctrine: 2.0.28
phpstan/phpstan-phpunit: 2.0.18
phpstan/phpstan-strict-rules: 2.0.12
phpstan/phpstan-symfony: 2.0.20

Discovered Composer project root:
/xxxx/xxxx

Turbo extension: not loaded
Turbo platform: macos (os: Darwin, machine: arm64, libc: gnu, php: 8.3, zts: no, debug: no)
Turbo worker binary: none found

Parallel worker creation:
Mechanism:                 spawn (react/child-process)
Reason fork not used:      running from a phar without the active turbo extension (its fork guard protects phar:// reads in forked children)

Doctrine's objectManagerLoader: No
Installed Doctrine packages:
doctrine/dbal: 3.10.6
doctrine/orm: 2.20.13
doctrine/common: 3.5.0
doctrine/collections: 1.8.0
doctrine/persistence: 2.5.7

Symfony's consoleApplicationLoader: No

Elapsed time: 0.58 seconds
Peak memory: 99.5 MB

Code snippet that reproduces the problem

No response

Expected output

[OK] No errors

Did PHPStan help you today? Did it make you happy in any way?

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions