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

"composer update --no-dev" removes merged dev dependencies from lock #261

Open
prudloff-insite opened this issue Mar 6, 2023 · 0 comments · May be fixed by #262
Open

"composer update --no-dev" removes merged dev dependencies from lock #261

prudloff-insite opened this issue Mar 6, 2023 · 0 comments · May be fixed by #262

Comments

@prudloff-insite
Copy link

prudloff-insite commented Mar 6, 2023

When using 2.0.1, if I run composer update --no-dev, merged dev dependencies are removed from the lock.

For example, if I have this in a JSON file that is then merged:

    "require-dev": {
        "friendsoftwig/twigcs": "^5.0"
    }

And then I run something like composer update symfony/http-kernel --no-dev, this dependency is removed from the parent lock file:

-        {
-            "name": "friendsoftwig/twigcs",
-            "version": "5.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/friendsoftwig/twigcs.git",
-                "reference": "5123655a918d232788da4d7b0545c9f75b08023a"
-            },
...

It seems to be because ExtraPackage::mergeInto() only merges require-dev when in dev mode.

@prudloff-insite prudloff-insite linked a pull request Mar 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant