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

Add support for multiple bundles in auto-configured packages #427

Closed
emodric opened this Issue Oct 11, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@emodric
Copy link
Contributor

emodric commented Oct 11, 2018

Currently, if a package has a symfony-bundle type and does not have a recipe, it is automatically added to bundles.php, extracted from PSR4 autoload config. However, this only works for the first bundle listed in PSR-4 autoload.

It would be great if Flex would automatically activate all bundles it finds in autoload config, not just the first one.

Additionally, if some of them are listed in autoload-dev section, it would be great if those were automatically activated for dev environment too. Disregard this, this is not always wanted and most probably cannot be automated.

@Pierstoval

This comment has been minimized.

Copy link
Contributor

Pierstoval commented Oct 11, 2018

Deciding whether a bundle should be enabled for a specific environment is the role of the recipe itself. And having multiple bundles in a single repository is not the best option for maintenance 😕

@emodric

This comment has been minimized.

Copy link
Contributor Author

emodric commented Oct 11, 2018

Some users prefer monolithic repos with multiple bundles, which separate concerns. And best option for maintenance is whatever is easier for the package developer, no? ;)

@Pierstoval

This comment has been minimized.

Copy link
Contributor

Pierstoval commented Oct 11, 2018

Yes of course, but if one bundle needs a tough update, the other will also be updated with no changes, which is counter-productive in terms of versioning. Separate concerns = separate packages, whatever seems easier 😄 It's about clean coding, mostly 😉

@emodric

This comment has been minimized.

Copy link
Contributor Author

emodric commented Oct 11, 2018

In my case, repo is not split in multiple packages in Composer. One repo, one package, one versioning strategy. Bundles are used to separate code for various parts of the application.

That should be a supported use case.

@Pierstoval

This comment has been minimized.

Copy link
Contributor

Pierstoval commented Oct 11, 2018

This is not a common case, and it's not any best practice in any SF documentation, I don't think that Flex should support this natively without a recipe.

However, you can still create a recipe for your package and add the two bundles in the bundles configurator 👍

@emodric

This comment has been minimized.

Copy link
Contributor Author

emodric commented Oct 11, 2018

Nope, I can't, because Flex doesn't accept GPL licensed packages.

@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Dec 11, 2018

Would you be able to send a PR doing so?

@emodric

This comment has been minimized.

Copy link
Contributor Author

emodric commented Dec 11, 2018

Yep, but in a couple of days.

@fabpot fabpot closed this in #466 Jan 4, 2019

fabpot added a commit that referenced this issue Jan 4, 2019

feature #466 Add support for multiple bundles in auto-generated recip…
…es (emodric)

This PR was merged into the 1.2-dev branch.

Discussion
----------

Add support for multiple bundles in auto-generated recipes

Fixes #427

Commits
-------

aa38671 Add support for multiple bundles in auto-generated recipes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.