flex
flex copied to clipboard
Possibility to use only as symfony version resolver
Hello,
it seems like this is currently not possible to use Flex only for the symfony package version resolving (limiting? filtering?)
Would it be possible/welcomed to add a feature switch for every configurator, so you can control what parts of Flex you are interested in?
At the moment it is possible, for example, to turn off docker(-compose) files configurator: https://github.com/symfony/flex/blob/dd7dafe3bfebf8441e167b76d8a18974585467f3/src/Configurator/DockerComposeConfigurator.php#L103
TL;DR; Looking for a solution to restrict symfony dependencies of symfony dependencies and only that and Flex looks like a good candidate for that.
Please send a PR, that's the best way to move forward here I think.
Are there any updates for this issue?
I want to use symfony/flex as dev dependency in my composer package. I need only feature SYMFONY_REQUIRE to simplify install differents versions in GHA CI. Currently this plugin does a lot of different things: modify phpunit.xml/ composer.json, create many other files.
Is there an easy way to disable recipes execute?
I'm also considering creating a composer plugin where packages can be grouped to vendor bundle to restrict version https://github.com/composer/composer/issues/11682
The solution for that is actually to install it as a global composer plugin in the CI. This solves 2 issues:
- a globally-installed plugins will not run the configurators (unless flex is also a local dependency)
- filtering dependencies requires that the plugin is already installed and enabled by the time the dependency solver runs. If you use a project-level dependency, this won't be the case for the first install (as you have no vendor folder with the plugin installed), which would require performing 2 resolutions of the project dependencies on CI.