flex icon indicating copy to clipboard operation
flex copied to clipboard

Possibility to use only as symfony version resolver

Open marmichalski opened this issue 3 years ago • 3 comments
trafficstars

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.

marmichalski avatar Mar 09 '22 19:03 marmichalski

Please send a PR, that's the best way to move forward here I think.

nicolas-grekas avatar Apr 30 '22 22:04 nicolas-grekas

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

vtsykun avatar Oct 08 '23 17:10 vtsykun

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.

stof avatar Oct 11 '23 10:10 stof