Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99285 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83749 invoked from network); 30 May 2017 21:04:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2017 21:04:30 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.162 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.162 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.162] ([81.169.146.162:34300] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/86-43873-C5EDD295 for ; Tue, 30 May 2017 17:04:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1496178265; l=5231; s=domk; d=kelunik.com; h=Content-Type:To:Subject:Date:From:In-Reply-To:References: MIME-Version; bh=wt0Uzv3Yp5+y5CQ9GNWcgZgcPVaWcODnkvO/1CZ83TY=; b=lbUHGBc0O3EOUvVz94Rx/U8zQuqHxeO4uu4I5qXTcULQQjje0ETgtCfKLSgB24lnSH 3uBQqhGlMGYyDIai8JKQrlnEg+CV9XhYziwR5Eq5vABzbYnJP+MsMZE03bX7V3i+t49e TlR1c9V2Eu2MuxxiQs9dLdir56XYeV0z9b05c= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoNHBqX83Q== X-RZG-CLASS-ID: mo00 Received: by mail-oi0-f44.google.com with SMTP id w10so127626773oif.0 for ; Tue, 30 May 2017 14:04:25 -0700 (PDT) X-Gm-Message-State: AODbwcCjBVYjccIFZp5z0O4XKSdmzuanZL6ZsPfRr2LsEtjolCOYoib0 VCuMxL7veW/c9iCOEKbEmSWbg4rGiA== X-Received: by 10.157.47.195 with SMTP id b3mr5207218otd.78.1496178265102; Tue, 30 May 2017 14:04:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 30 May 2017 21:04:11 +0000 X-Gmail-Original-Message-ID: Message-ID: To: Rowan Collins , PHP Internals Content-Type: multipart/alternative; boundary="001a113db9e4032ce80550c426ce" Subject: Re: [PHP-DEV] Parameter type widening RFC From: me@kelunik.com (Niklas Keller) --001a113db9e4032ce80550c426ce Content-Type: text/plain; charset="UTF-8" Rowan Collins 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 > --001a113db9e4032ce80550c426ce--