-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Allow to prioritize some recipes #957
Comments
Did you consider running your own recipe-repo? Because this should be a better way to handle priorities. Would that work for you? |
@nicolas-grekas, thanks for your reply 🙏🏻. We have our own recipe-repo, but we have also added |
@nicolas-grekas I spend some time thinking about this problem and maybe adding a configuration might not be the best from DX perspective, but what about Composer Events 🤔. I have created a PoC looking +/- like that: $event = new PreRecipesSet($flexRecipe); // $flexRecipe might not be required here as we set $recipes below, but I'm lefting it as is for PoC needs
$eventDispatcher->dispatch(PreRecipesSet::class, $event);
$recipes = [
...$event->recipes(), // we set all recipes set in the PreRecipesEvent event
'symfony/framework-bundle' => null,
]; I know from Symfony perspective it isn't a crucial feature. It might have a low priority, but for frameworks like Sylius, Sulu, and other it might be great to have a better control over flex, without dropping support for already existing recipes. Of course, this needs a lot of lifting, but I need your “approve” that you want such feature in flex 🙏🏻. |
We at @sulu are running into the same problems as Sylius. That other The incompatible part could be fixed via blacklist of some The other thing which I think @jakubtobiasz is trying to solve here is some
We both has our own Kernel class and we both I think have our own security configuration. If I understand @nicolas-grekas suggestion it would be possible that we provide I'm not really sure what the best solution would be here, maybe recipes can provide Another possible solution if we say we don't want to include patches is that every |
Hi 👋🏼!
I am coming here to gather some feedback on my idea before starting working on it.
Background
I wanted to create a POC of https://github.com/symfony/skeleton made for Sylius. I created a simple recipe for
sylius/core-bundle
, then an example skeleton repo and I have found out my recipes does not work as another recipe already write files with the same name. Then, I noticedsymfony/framework-bundle
is always put as the first recipe to be executed, and this is a thing I wish to be able to configure.Goal
Somehow allow myself to make (in this POC case)
sylius/core-bundle
as a first recipe to be executed. Of course, I can forksymfony/flex
, but it would be perfect to avoid this way.Idea
The idea is simple, we allow configuring such list for example in this way:
In
Flex
we could implement this +/- this way:instead current
Why?
framework-bundle
as a first recipe to be executed makes it unable for usOther options
I have not checked it yet, but I believe we can achieve the similar feature using Composer's Event Dispatcher. But first, I would like to hear if such a feature is welcomed. Or maybe you have a better idea how to solve this. I am open to provide such feature right after we agree on some solution.
The text was updated successfully, but these errors were encountered: