Skip to content

running a command thru composer scripts is waaaay slower then natively invoked #8587

@staabm

Description

@staabm

My composer.json:

{
  ...
    "scripts": {
        "phpstan": [
            "phpstan analyse -c phpstan.neon.dist"
        ]
    }
}

Output of composer diagnose:

$ composer diagnose
A script named bin would override a Composer command and has been skipped
Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
require.complex/rocket : unbound version constraints (dev-CLX6_2019R03|dev-CLX6_2019R04|dev-trunk) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 1.9.3
PHP version: 7.0 - Package overridden via config.platform (actual: 7.2.9)
PHP binary path: C:\php-7.2\php.exe

When I run this command:

composer phpstan

I get a phpstan scan taking minutes and finally running into a 300 secs timeout.

when I run phpstan analyse -c phpstan.neon.dist directly, I get the results in 3-4 seconds.

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