Rowan Collins <rowan.coll...@gmail.com> schrieb am Di., 30. Mai 2017, 19:39:

> On 30/05/2017 07:24, Rasmus Schultz wrote:
> >> The type widening RFC makes it easier to move to parameter types for
> > existing libraries.
> >
> > I'm curious to see how you'll set the version constraint in your
> > composer.json file.
>

>=min-php-version.

> After adding a scalar type-hint to an interface, which is a breaking
> change
> > in 7.0 and 7.1, but a non-breaking change in 7.2, is the new version of
> > your package a major or minor release?
>

Depends on the new minimum version. If it is 7.0 or 7.1, then it's a
breaking change so new major, otherwise new minor.

> If you release it as minor, you'll need a PHP version constraint like
> > "^5.5, ^7.2", but excluding 7.0-7.1 In that way is itself a breaking
>

As scalar types do not work on PHP 5, why would I use that constraint?

> change, so likely your only practical move is to release (and commit to
> > maintain!) both major and minor versions, which doesn't sound easy at
> all.
>

I don't see a reason to release a new major when increasing the minimum PHP
version requirement. The old major.minor can still get bug fixes but won't
receive new features.

That's a good point, and reduces the immediate value of the change
> slightly, but there is perhaps still value in making upgrading *easier*
> on users.
>
> For instance, you might want to use some other feature of PHP 7.2
> anyway, so be willing to set that as your minimum version, but still not
> want users to have to go through checking all their code for the correct
> type hints. If they're already using 7.2, they might be able to migrate
> to your new version without changing a single line of code.
>

Regards, Niklas

>

Reply via email to