Skip to content

Comments

[12.x] Only fire composer uninstall events when removing dev packages#58338

Merged
taylorotwell merged 2 commits intolaravel:12.xfrom
cosmastech:patch-35
Jan 10, 2026
Merged

[12.x] Only fire composer uninstall events when removing dev packages#58338
taylorotwell merged 2 commits intolaravel:12.xfrom
cosmastech:patch-35

Conversation

@cosmastech
Copy link
Contributor

To close: #57613

There have been so many problems with this feature 😢 I hope that this clears up the last of them.

If we are uninstalling packages with the --no-dev flag, then we do not want to fire events. Why? Because it fixes a problem. Thinking further though, we wouldn't want these things to fire on production environments. That's not the intended use of this pattern. I misunderstood the naming of this event prePackageUninstall thinking that it meant "when a package is requested to be removed from composer.json" instead of what it is, which is "when a package is being removed from your composer.lock"

@taylorotwell taylorotwell merged commit b7a710f into laravel:12.x Jan 10, 2026
70 checks passed
@cosmastech cosmastech deleted the patch-35 branch January 11, 2026 02:12
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

Successfully merging this pull request may close these issues.

"pre-package-uninstall" script fails with service providers of non-installed packages

2 participants