phpstan-drupal icon indicating copy to clipboard operation
phpstan-drupal copied to clipboard

Unexpected item 'parameters › drupal'.

Open NigelCunningham opened this issue 11 months ago • 3 comments

Hi there.

I've seen a previous issue with a similar report, but don't seem to have the same cause. I have phpstan/extension-installer included in my composer.json and the files exist under /vendor/phpstan, but I'm still getting

nigel@nigel-laptop:~/oimsdelite$ php /home/nigel/oimsdelite/vendor/bin/phpstan analyse --memory-limit=1500M --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /home/nigel/oimsdelite/web/modules/custom/websocket
Invalid configuration:
Unexpected item 'parameters › drupal'.
nigel@nigel-laptop:~/oimsdelite$

Here's the relevant part of my composer.json.

    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "cweagans/composer-patches": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "mglaman/composer-drupal-lenient": true,
            "oomphinc/composer-installers-extender": true,
            "php-http/discovery": true,
            "phpstan/extension-installer": true,
            "tbachert/spi": true
        },
        "sort-packages": true
    },

Would you be willing to give me some pointers on debugging this, please? I can usually sus things out myself but this one has me stumped. Thanks!

NigelCunningham avatar May 25 '25 05:05 NigelCunningham

When you run composer install does it show the extension installer messages about auto configuring phpstan-drupal?

mglaman avatar May 25 '25 14:05 mglaman

No - here's the output:

composer install
Gathering patches for root package.
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Generating autoload files
108 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
phpstan/extension-installer: Extensions installed
  * Homepage: https://www.drupal.org/project/drupal
  * Support:
    * docs: https://www.drupal.org/docs/user_guide/en/index.html
    * chat: https://www.drupal.org/node/314178 
> ln -sf jquery.hoverIntent.minified.js web/libraries/drupal-superfish/hoverIntent.js

NigelCunningham avatar May 26 '25 01:05 NigelCunningham

Okay, when at the computer I'll double check because

phpstan/extension-installer: Extensions installed

Should say which extensions were configured

mglaman avatar May 26 '25 23:05 mglaman