Skip to content

Should plugins run on reinstall ? #10508

@jrfnl

Description

@jrfnl

This is more a question for which I couldn't find if this had been discussed before.

Code to reproduce can be found here: https://github.com/jrfnl/composer-install-action-bug/tree/testing/composer-reinstall
Test run output: https://github.com/jrfnl/composer-install-action-bug/actions/runs/1790724084

My composer.json:

{
    "name": "jrfnl/composer-reinstall",
    "description": "Testing",
    "license": "MIT",
    "require-dev": {
        "php": ">=5.4",
        "phpcsstandards/phpcsextra": "^1.0.0"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "dealerdirect/phpcodesniffer-composer-installer": true
        }
    }
}

When I run this command:

composer reinstall phpcsstandards/phpcsextra

I get the following output:

Run composer reinstall phpcsstandards/phpcsextra -v
  - Removing phpcsstandards/phpcsextra (1.0.0-alpha3)
  - Installing phpcsstandards/phpcsextra (1.0.0-alpha3): Extracting archive

And I expected this to happen:

That the Dealerdirect PHPCS Composer plugin, which is installed as as part of the package would run, but it didn't.

Plugin also doesn't run when installed as a root requirement.

As there is no separate "reinstall" event, I would expect post-install events to run on reinstall as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions