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 alternative method for symfony/flex #17031

Conversation

alexislefebvre
Copy link
Contributor

@alexislefebvre alexislefebvre commented Jul 21, 2022

I propose another way to use `symfony/flex/ in a bundle:

  • install symfony/flex as a dependency of the project, not only on the CI
  • use composer config … instead of relying on a variable (it's more consistent in my humble opinion)
  • don't use the global config, Seldaek suggested to not use it:

I'm well aware of that part but I don't understand the point of having it globally installed then. For those use cases, the project itself should really require symfony/flex in composer.json to ensure it's always present.

Source: shivammathur/setup-php#611 (comment)

This way may also replace the previous block.

@carsonbot carsonbot added this to the 5.4 milestone Jul 21, 2022
@alexislefebvre alexislefebvre changed the base branch from 5.4 to 4.4 July 21, 2022 15:23
@alexislefebvre alexislefebvre force-pushed the add-alternative-method-for-symfony/flex branch from 88f2198 to 66a7abb Compare July 21, 2022 15:23
@michaelKaefer
Copy link
Contributor

I'm not for nor against this way of testing a bundle with a specific Symfony version. But for a best practice it would be better IMHO to only suggest one way of doing the same thing (testing a bundle with a specific Symfony version) and not 2 alternative ways.

javiereguiluz added a commit to EasyCorp/EasyAdminBundle that referenced this pull request Aug 5, 2022
This PR was merged into the 4.x branch.

Discussion
----------

add symfony/flex to require-dev

Follow-up of #5330

There's no need to require `symfony/flex` on the CI, it can be added to `required-dev`.

This is the same idea than symfony/symfony-docs#17031

Commits
-------

e07ff0b add symfony/flex to require-dev
@alexislefebvre
Copy link
Contributor Author

This was a bad idea, don't do that in a bundle, see EasyCorp/EasyAdminBundle#5354 for the consequences.

@alexislefebvre alexislefebvre deleted the add-alternative-method-for-symfony/flex branch August 5, 2022 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants