Skip to content

syntax error with phpstan starting with 2.6.7  #4614

@lazka

Description

@lazka

I use phpstan in my project and after the update to 2.6.7 phpstan fails with a "syntax error":

 44/44 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------- 
  Line   tests/ApiTest.php                                                     
 ------ ---------------------------------------------------------------------- 
         Internal error: syntax error, unexpected 'static' (T_STATIC)          
         Run PHPStan with --debug option and post the stack trace to:          
         https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md  
 ------ ---------------------------------------------------------------------- 

The internal error is (I'm using php 7.4):

Uncaught ParseError: syntax error, unexpected 'static' (T_STATIC) in /home/lazka/my-bundle/vendor/api-platform/core/src/Util/ClientTrait80.php:18

Does anyone know how to work around that?

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