Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are dependencies still present in the installer path after removal? #525

Open
vinkla opened this issue Aug 18, 2023 · 0 comments
Open

Comments

@vinkla
Copy link
Contributor

vinkla commented Aug 18, 2023

Why are dependencies that are removed from the composer.json file still present in the installer path? Is this the intended behavior, or is there a solution to remove the dependencies from the installer path as well?

First, I will add a dependency to the installer path.

{
    "require": {
        "php": "^8.2"
    },
    "extra": {
        "installer-paths": {
            "public/mu-plugins/{$name}/": [
                "type:wordpress-muplugin",
+               "wpackagist-plugin/bugsnag"
            ]
    }
}

Then, I will install the plugin by using the composer require command.

composer require wpackagist-plugin/bugsnag

The dependency has been installed correctly in the installer path. Next, I remove it from the composer.json file.

{
    "require": {
        "php": "^8.2",
-       "wpackagist-plugin/bugsnag": "^1.0"
    },
    "extra": {
        "installer-paths": {
            "public/mu-plugins/{$name}/": [
                "type:wordpress-muplugin",
-               "wpackagist-plugin/bugsnag"
            ]
    }
}

Then I run composer update in the root of the project.

composer update

The dependency has been removed from the vendor directory but remains in the installer path.

Related issues: #82 #519

@vinkla vinkla changed the title Why is dependencies still present in the installer path after removal? Why are dependencies still present in the installer path after removal? Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant