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

Packs could add both to "require" and "require-dev" #654

Closed
nicolas-grekas opened this issue Jul 8, 2020 · 3 comments · Fixed by #782
Closed

Packs could add both to "require" and "require-dev" #654

nicolas-grekas opened this issue Jul 8, 2020 · 3 comments · Fixed by #782

Comments

@nicolas-grekas
Copy link
Member

Right now, a pack can only be added to "require" xor "require-dev".
It could be great to be able to have a pack add things to both "require" and "require-dev" with a single composer require my-pack.

@stof
Copy link
Member

stof commented Jul 9, 2020

Well, if we keep packs as composer (meta-)packages in the solver, that's impossible (as require-dev is root-only). You would need 2 packages, one in require and another one in require-dev (both of them using require)

@nicolas-grekas
Copy link
Member Author

Yep, I have a proposal to work around this:

Inside a pack, listing a package twice, both in "require" and in "require-dev" (with a * requirement in "require-dev") could be the convention we'd use to make this work seamlessly.

Unpacking would use this convention to work. When not-unpacking, these deps would be considered part of "require" so there would be a slight difference in the exact meaning, but maybe that's good enough?

@weaverryan
Copy link
Member

This is one of the most consistent complaints about Flex. It would indeed be awesome to solve - the debug-pack is a particular problem :)

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 a pull request may close this issue.

3 participants