Skip to content

Add support for unpacking Composer packages #241

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

Closed
wants to merge 3 commits into from

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Dec 12, 2017

This PR is short but packed (pun intended) with great features.

Basically, it helps fix an issue people have with Flex: starting a new project.

@Pierstoval
Copy link
Contributor

Pierstoval commented Dec 12, 2017

About the post && unpack feature, I wonder why it's only reserved to the symfony-pack type? Why can't it be associated with the already existing metapackage, which is, by the way, documented?

@nicolas-grekas
Copy link
Member

The reason is that when you require several packages at once, only some of them should be unpacked.
composer require a/b a/c b/a b/c --unpack
only those that were designed to be unpacked should be unpacked.

@Pierstoval
Copy link
Contributor

Pierstoval commented Dec 12, 2017

Yeah, but a metapackage is precisely the kind of package that can be unpacked: if a metapackage contains requirements, they should be unpackable. If the metapackage is only here to create conflicts (like symfony/lts or roave/security-advisories), even if you set --unpack, it will not unpack anything, so it can be considered safe.

I'm just commenting on this because symfony-pack will reinforce the idea for some people that Flex is only for Symfony packages, which is not the case. Anyone willing to create a pack should be able to unpack it with Flex even if it's not a Symfony-related package.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Dec 12, 2017

can != should - that's the point.

it will reinforce the idea for some people that Flex is only for Symfony packages

Flex is only for Symfony apps yes, framework bundle is an implicit requirement of all recipes.
Let's first try improving the Symfony-based experience, and if some ideas are more broad then fine, that's OSS, ppl can contribute to Composer. We cannot fix the world (who are we to even think we could).

Anyone willing to create a pack should be able to unpack it with Flex even if it's not a Symfony-related package

sure, that's the case - the false-ideas are false-ideas, only technical behavior has value here.

@fabpot
Copy link
Member Author

fabpot commented Dec 12, 2017

Symfony Flex is currently definitely for Symfony, no questions about it.

@fabpot
Copy link
Member Author

fabpot commented Dec 19, 2017

Based on the feedback, unpack never happens recursively. It gives more control. There is now also a new unpack command that allows to unpack already installed packs.

@fabpot fabpot force-pushed the unpack-metapackages branch from b243a21 to 19bafc0 Compare December 19, 2017 05:44
@fabpot fabpot force-pushed the unpack-metapackages branch from 45f2644 to 681745a Compare December 19, 2017 23:16
@fabpot fabpot force-pushed the unpack-metapackages branch from 681745a to bcc3219 Compare December 19, 2017 23:55
@fabpot fabpot closed this in adb823e Dec 20, 2017
@xabbuh xabbuh deleted the unpack-metapackages branch December 20, 2017 09:26
tgalopin pushed a commit to tgalopin/flex that referenced this pull request Dec 3, 2020
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.

3 participants