composer-normalize icon indicating copy to clipboard operation
composer-normalize copied to clipboard

Normalization does not happen automatically when using composer require

Open ruudk opened this issue 4 months ago • 3 comments

It could be that this is just not supported, but I noticed that when doing something like

composer require --dev phpstan/phpstan-webmozart-assert

normalization wouldn't happen automatically.

I have to manually do composer normalize.

ruudk avatar Aug 19 '25 18:08 ruudk

You can add something like this to your root composer.json

    "scripts": {
        "post-require": ["@php composer normalize"],
        "post-update-cmd": ["@php composer normalize"]
    }

sambolek avatar Nov 05 '25 14:11 sambolek

Isn't it the goal of this plugin to do this automatically?

ruudk avatar Nov 05 '25 14:11 ruudk

Don't know, but had the same issue and didn't find any option in the plugin to set a flag.

sambolek avatar Nov 05 '25 14:11 sambolek