dunglas / DunglasActionBundle

Symfony controllers, redesigned
https://dunglas.fr/2016/01/dunglasactionbundle-symfony-controllers-redesigned/
MIT License
256 stars 14 forks source link

Remove unbound PHP version constraint #51

Closed soullivaneuh closed 7 years ago

soullivaneuh commented 8 years ago

Ref: https://getcomposer.org/doc/faqs/why-are-unbound-version-constraints-a-bad-idea.md

dunglas commented 8 years ago

Can you use a single pipe as it is done in Symfony (for people using an old version of Composer).

soullivaneuh commented 8 years ago

Can you use a single pipe as it is done in Symfony

:-1: This is a very old and "should not be used" composer convention.

(for people using an old version of Composer).

You mean unstable then? Because this is OK since v1.0.0 stable. IMHO you should not take care of this. Old composer version should be simply upgraded to the last stable.

For a personal case, we use new constraint formats for all sonata project for a while and we didn't get any issue of people using a not compatible composer binary. :wink:

greg0ire commented 8 years ago

as it is done in Symfony

Maybe Symfony is lagging behind the best practice? Are you sure they do this on purpose ? Is it part of their standard ?

soullivaneuh commented 8 years ago

Is it part of their standard ?

I think it's more a historical issue than a standard.

dunglas commented 8 years ago

My goal is to include this bundle in the Symfony SE. I would prefer keeping with SF conventions for now. If it really matters for you, please at least update all constraints in the composer file for consistency.

greg0ire commented 8 years ago

Or maybe open an issue / PR in Symfony, to know why they do this?

soullivaneuh commented 8 years ago

If you want to include it in the Symfony SE, then you should not accept my PR, at least for now.

Symfony uses unbound PHP constraint ATM.

Or maybe open an issue / PR in Symfony, to know why they do this?

:+1:

dunglas commented 8 years ago

This change has already been discussed on the SF repository and rejected: https://github.com/symfony/symfony/pull/18186

theofidry commented 8 years ago

@dunglas but this was about replacing the OR operator, whereas @Soullivaneuh point was more focused on the unbound version of PHP.

teohhanhui commented 8 years ago

No one would be using old Composer with a spanking new Symfony SE (3.2 or later?). That's a moot point.

dunglas commented 8 years ago

Ok then go for the new notation. @Soullivaneuh can you standardize the composer.json file to use || everywhere?