Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99267 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50288 invoked from network); 30 May 2017 17:39:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 May 2017 17:39:15 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.178 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.128.178 mail-wr0-f178.google.com Received: from [209.85.128.178] ([209.85.128.178:33386] helo=mail-wr0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0B/70-43873-14EAD295 for ; Tue, 30 May 2017 13:39:14 -0400 Received: by mail-wr0-f178.google.com with SMTP id v104so4805754wrb.0 for ; Tue, 30 May 2017 10:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=SrivTjvE2qoJNbJIn2qIytwkxVmV1uLWw+4F6tKWEJc=; b=RM/ki3FDZwZz8BjZjRAmR2vPDNqdNhICcp+AlaN46RMf2XoXPufPeoGPR0rBEfje6I bm6RtZz639PhyxE5oHVevzuPYmQf/N9zX1DcqhR2mMuF0M9M0fU0ceiF4cAQ25rdS/B3 hX31lV54QDWB1O+i5VC4edsaDknqA1dUNvqscEEQdyWmAVCjwFq3Ntbwi8njh4RGW+2L +Pa5M2KwSBWksXgVtdPcR+VVkVb5qDwfwK5uWSgmoO83pw7E8DD121/7CJFhpy93kQ83 ikYsmw+PFseriDI8NObJfgU2VBFK4TAyvRAgKCyEXEqr6xT9MtVooulGODLjNE37S1yV rnAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=SrivTjvE2qoJNbJIn2qIytwkxVmV1uLWw+4F6tKWEJc=; b=oYCUGUIPXwqB4gc51ZQ7mlWLsAAT/ic4j2hSNgNZ49YFHTsxu4SGlO4YRePV0xorzk 8cQ8uIYe1CG91EGhFOLwejx7IujPPQVK+qSyONXOXFa90s9ACMQaqYf36y1EYurqXaHg EgmkHywysrDOPjh06PgqEtPym3DkM01ipgpcie8hq8+vnkkmthoneNxBX68AL9NSYXaX 7N4n/uUbnpFXYeJ8y1Cpf7aVHz7aaIs+bCz2Eq3XebCiM6IUmnboRlNKX+egoZZho24z Mc0L219d7mSdm3sG+ayw+i8mOFIhFMa2GC0Vt6Uef1NPhS/OhqPeEhsiAUH5DTTrQqJq wFkA== X-Gm-Message-State: AODbwcBgXPmA8BuUbOlkbnxhg4Bg6MZznBiAMe/3SCQ7yFkPKPahl9Gu amD10g6+LcHPZVbf X-Received: by 10.223.147.225 with SMTP id 88mr7965665wrp.39.1496165950809; Tue, 30 May 2017 10:39:10 -0700 (PDT) Received: from ?IPv6:2a00:23c4:4bd2:6e00:8109:7591:7906:abd0? ([2a00:23c4:4bd2:6e00:8109:7591:7906:abd0]) by smtp.googlemail.com with ESMTPSA id l70sm38024956wma.11.2017.05.30.10.39.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 10:39:10 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Tue, 30 May 2017 18:39:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Parameter type widening RFC From: rowan.collins@gmail.com (Rowan Collins) 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. > > 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? > > 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 > 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. 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, -- Rowan Collins [IMSoP]