phpstan: Child process error (exit code 255): PHP Fatal error

Bug report

Hi, I have this error when I launch the phpstan command line : bin/phpstan analyse -c phpstan.neon --error-format=prettyJson --no-interaction --no-progress --ansi

Error :

{
    "totals": {
        "errors": 1,
        "file_errors": 0
    },
    "files": [],
    "errors": [
        "Child process error (exit code 255): PHP Fatal error:  Cannot declare interface PhpParser\\NodeVisitor, because the name is already in use in /Users/jimmy/Development/RDV/winelidays/symfony/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php on line 5\nFatal error: Cannot declare interface PhpParser\\NodeVisitor, because the name is already in use in /Users/jimmy/Development/RDV/winelidays/symfony/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php on line 5\n\nIn NodeVisitor.php line 5:\n                                                                                                     \n  Compile Error: Cannot declare interface PhpParser\\NodeVisitor, because the name is already in use  \n                                                                                                     \n\nworker [--paths-file PATHS-FILE] [-c|--configuration CONFIGURATION] [-l|--level LEVEL] [-a|--autoload-file AUTOLOAD-FILE] [--memory-limit MEMORY-LIMIT] [--xdebug] [--port PORT] [--identifier IDENTIFIER] [--] [<paths>...]\n\n"
    ]
}

My composer :

{
    "require-dev": {
        "phpstan/extension-installer": "^1.0",
        "phpstan/phpstan": "0.12.43",
        "phpstan/phpstan-doctrine": "0.12.19",
        "phpstan/phpstan-strict-rules": "0.12.5",
        "phpstan/phpstan-symfony": "0.12.7"
    },
}

Any ideas ?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Your issue is reported here already: https://github.com/phpstan/phpstan/issues/3956

I’m experiencing the same issue but only with version 0.12.55 running the same with 0.12.54 works like a charm.

Steps to reproduce:

git clone https://github.com/pimcore/pimcore.git foo
cd foo
./vendor/bin/phpstan analyse lib/* -l 1 --memory-limit=-1

I can’t help you unless you create a repository that shows the problem.