Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125801 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 432041A00BD for ; Mon, 14 Oct 2024 11:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728905505; bh=uB4y3hMWlptRMvePHaa79K5PjT5dpUva8AtVB4kvsuA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=W53dRbjsGvHlyZZLihZceiq2/alHWBiP9dDfZ2WAqohGLJDi/fi9/whVBBuoN1wkm 7I6olFVbUFYFz67VwriqS+reXe1MolEQmisnuK3pOPsH6sNPJNn8/3zVRMSgRjNV1s E+YrkRrC4gNEzjXZt8yQvsAV1O/aKOMo9CZdhFhEo22kXTZ6mUNgJnEf7aHX+FObEy eFMr5M5QLBL2dcUIdM/E01Z2XI01DffE+O3ydrtkTNhurzkuFzCAyEAaQdV3/BBZmo yyiAVmQ+O6srsrpONNQ7NaYqUym3xQIMfrWfGUJjfmJyqpkWPpBluk8NLSBpN9y+cj LfiiB518lnnEg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 93595180041 for ; Mon, 14 Oct 2024 11:31:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from filter101.mijn.host (filter101.mijn.host [109.163.225.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 14 Oct 2024 11:31:43 +0000 (UTC) Received: from h26.mijn.host ([2a03:5180:7:2:f264:726d:beae:1]) by filter101.mijn.host with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t0JGK-000r7G-CM for internals@lists.php.net; Mon, 14 Oct 2024 07:29:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=jnvsor.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=pYOTp8inqXsgOjCpU769I2RWg/qZbFXBNVKiQN4yDa0=; b=H2p6Ui4UKgCS8/XeywrblPzSeU yIGz3SlKrWJe9ipbg2WHHoPB7FwNGS6Z9L2b3NkyCqX4uZOPWlYWRG8+5s5NWoEMN3bm+oGfVh4ZH rczZKdx0zQ9sKohqWCdI1Lb4EJJQnLGwU7N5B5+llhTkWjkY7WNevfN3pTfhIA+uB/uzpyiHB/490 wSNMk7flpwKn0rEptlCJMco1esjYeG0IjiZ9y/GcUYgx6EuS8bUOyg1tzDdQSJXGswEtZp6OkeBV8 RZeRq7ipsJkOfTGmUJXB7nykrkh7zdD5mw5Vy6j9Ttr/Fkp//ZKv5kuOCOOzEUF11MS8qSseSpd56 3xZR0YZw==; Received: from 2001-1c00-2a11-3600-92ca-bedc-8964-e0cf.cable.dynamic.v6.ziggo.nl ([2001:1c00:2a11:3600:92ca:bedc:8964:e0cf]) by h26.mijn.host with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1t0HOC-00000008Nfe-07Wf for internals@lists.php.net; Mon, 14 Oct 2024 13:29:20 +0200 Message-ID: <7c5c0588-5a9d-4862-b40b-fc1f2759997c@jnvsor.net> Date: Mon, 14 Oct 2024 13:29:19 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Asymmetric visibility is a BC break To: internals@lists.php.net References: <2A7CF24F-3AE3-4125-965F-C65431C42DFB@gmail.com> <30a41608-a1ea-40a9-8d2a-c53c508cd89f@jnvsor.net> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AuthUser: jnv@jnvsor.net X-Originating-IP: 2a03:5180:7:2:f264:726d:beae:1 X-mijn.host-Spamfilter-Domain: mijn.host X-mijn.host-Spamfilter-Username: 2a03:5180:7:2:f264:726d:beae:1/112 Authentication-Results: mijn.host; auth=pass smtp.auth=2a03:5180:7:2:f264:726d:beae:1/112@mijn.host X-mijn.host-Spamfilter-Outgoing-Class: ham X-mijn.host-Spamfilter-Outgoing-Evidence: Combined (0.30) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT+Ga4IHVxheXk3IEp81dmsvPUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5ysVpdc69k5cRExqclQnUjJ0xCugIxICoR4SK4EpYmU4+fH zJ6mVE7ewsipSVIfs4ZB+hX4Vvb+KFstJscTgN8AABHVTw1lV42ob3hDgXVUNd9a53XVj4zauHkA 5dPfA2liT1v1qMyQrE//74nL7QEx5Bc+yE++qUpjcddTsVCQfwRo87oeATC+hGtbNyLqD79d1FgH UTYLOfKNI261jSzBP06AR5g2UA3HqsYlcMd+kU3FrKlNunbw3GCGM2ilT87d7j7SBq6MwVj6lFM1 1vq969CCDfOKd5FAllGsCCg+XysEJGdAAQBUErof8jiNd96dw+XGlIW1bb6iLQaqIs5B5d+hLlId aCW6xwdNo4OxtwDY4SpTbUhcsSYcTjOB+M5x3dBtceKX2dWiEm+7oHm9xBEeGmns8QeFADnQDTrf rserYKXCRGR18OfTWrHpf6kV0xJ411PPMPVAmEodS0dereVcnHDGPTHJJ/+YucHWLMPH12Bh87aa 4YfZs104p87OifVovUq7COge14oi3y0trSOIPpeqwlm2NDGXIJ2x7Aw67nLpfFALWaP7S/uCvcMs T3AdBmqsjHpFvIRGv3QGFGGN9tupvM6WO2Ft1gH+Fbzq3gG/FN3PpnrILocBWkUlA5yvuKg/VrQW W0t2gQb8VPATXlXOfRp8+eB3Yg8HXdFEFdiL9rNiZMnOwdYHLGEeFcyQ7VJExC7Q4eRzWD0n0z6b halFEM/pjPCQA+BAlk5KEOURO6sk/Aa437Ns/uqKg2woREVyMtyJFnDS+Flb0Yz6YeoZzUP3WXBO HtFTXF+u3uimnWr9ujZRDLmZ6nzfRmo+6HsrDTfTk2WASpxA9hnDZXV2CQwQLTmDKYV0FLstv/fQ 2PQkRKCR50pYUO1+pvlHhV6a5QjptwQBGybQa79B8ofWhEiU8433QvQjH6EsmgNU80KTDQcWwe0S 4mArfQ+tROiiWG4K9sxAvhAB5OBSN81tpz7T+tfAQe1JK2MgYyDjTfyYIHhsZr9+GI4gfKNLQ72k P6B93hdHavZ5 X-Report-Abuse-To: spam@filter101.mijn.host From: jnv@jnvsor.net (Jonathan Vollebregt) On 10/14/24 4:37 AM, Valentin Udaltsov wrote: > First of all, I have already agreed above that PHP does not have a BC > break here. Now we are discussing the potential problems in the PHP > ecosystem and how they could be mitigated. Then perhaps we should change the name of the thread, since the title of this is rather confusing. > Symfony PropertyInfo requires `php >= 8.2`. And it is written in PHP > 8.2 syntax. So it can be safely installed and used in PHP 8.2 and 8.3. > In other words it's forward compatible. However, the `php >= 8.2` > constraint also allows installing it in PHP 8.4. And as it turned out, > PropertyInfo is not ready for 8.4 syntax (see my reproducer > https://github.com/vudaltsov/symfony-property-access-php84). In my > opinion, this is a problem, because a PHP 8.4 user can install the > library without any obstacles and only later find out that `private > (set)` properties do not work as expected there. Ideally > `symfony/property-info` should not be installable until it ensures to > be compatible with all the PHP 8.4 features. So, its PHP constraint > should be `>=8.2 && <8.4`. And then `>=8.2 && <8.5`, once the tests > pass for PHP 8.4 features. There are some major problems with this ideal: 1. Often, a partially working library (because of a bug that only occurs with new PHP features) is of more use than one that doesn't work at all because of version constraints 2. With upper version constraints if any of the projects you depend on aren't on the ball it will hold you back from upgrading PHP versions. You are now only as up-to-date as the slowest of your dependencies (Regardless whether the upper version constraint is warranted because of an impending bug) 3. Any project that already has the typical `php >= 8.2` constraint can NEVER use upper version constraints: If you decide to add an upper version constraint eg. `php >= 8.3 < 8.5` then years down the line with `php >= 10.1 < 10.3` everyone who updates to 10.3 will still be installing the years old `>= 8.2` version which is the latest one they are "compatible" with. This will cause far more breakage if the library isn't up to date than without the upper version constraint. I don't know if it's technically possible to force push new tags with a changed composer.json for all old versions of a library but just typing that out sounds scary.