breeze2 / vscode-phpstan

Visual Studio Code extension working with phpstan
MIT License
22 stars 8 forks source link

Does not work with latest phpstan versions #28

Open LucasDemea opened 3 years ago

LucasDemea commented 3 years ago

Hi, I'm using phpstan 0.12.84, and I can't get the extension to work. I guess that's because of some recently added phpstan settings. I get this error in vscode devtools:

[Extension Host] [phpstan] failed: Invalid configuration:Unexpected option 'parameters › excludePaths'.

Here is my phpstan.neon :

parameters:
  level: 5
  paths:
    - .
  excludePaths:
    analyse:
      - vendor
      - tests
    analyseAndScan:
      - web/wp/wp-admin/includes/noop.php
driskell commented 3 years ago

I think this isn't a problem with the extension. It looks to happen when you have a phpstan.neon file existing somewhere with parameters that don't exist in the phpstan binary that is used.

Worth checking that the ./vendor/bin/phpstan at the location where your phpstan.neon is actually works by running it manually ./vendor/bin/phpstan --configuration=phpstan.neon as that's all the extension is doing and that error comes back from phpstan itself.

FunctionDJ commented 3 years ago

I'm using phpstan version 0.12.98 and i'm also not getting any feedback from the extension. Nothing happens in the editor, or when i run "Lint this file/folder". It used to work with an older phpstan version which i can't use anymore because of a bugfix i need.