Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119859 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31457 invoked from network); 10 Apr 2023 14:37:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Apr 2023 14:37:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 12877180041 for ; Mon, 10 Apr 2023 07:37:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 217.72.192.0/20 X-Spam-Virus: No X-Envelope-From: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 10 Apr 2023 07:37:55 -0700 (PDT) Received: from oxbsltgw07.schlund.de ([172.19.249.24]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MDQqe-1pcYjP2jEU-00AUK3; Mon, 10 Apr 2023 16:37:53 +0200 Date: Mon, 10 Apr 2023 16:37:53 +0200 (CEST) To: Craig Francis , PHP internals Message-ID: <114465957.2449454.1681137473474@email.ionos.de> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev40 X-Originating-Client: open-xchange-appsuite X-Provags-ID: V03:K1:xaJBL0bcJBIiTEoobGdfWD7Pxj04WgoVrdx3WLpWiSPG8tKWOzR CQVf+L7iuzEAR3sfhBPlsEINVum56qZKosSIN6MHou7DoDe2SdwYQ2eSWFezH8ivEFJwHbQ EK3EhDYjPqRyRekFyQPMNzKX3hFDygeeBsyzGpUzHE8KU7czUaXHkIGJPdjIRHrBTm9/bdP cbr/dUjuGgWAcEjFAyGNQ== UI-OutboundReport: notjunk:1;M01:P0:vkfEpr0CEBE=;XG9epbu+f3M1PQ1DtygFpQnDzE2 9U7FqZHUmliCuBeQ5FD6f72sNe/4yVYxY5zAVQd1eV6vR6Hb/sk3A8jkLF+qocg8gzuaYvOa7 pFFUfKatDaNnLZ5JqAHXVA/j5skIq2nKiLLLE2MUpGv3hYTfJB41YanEuiVODkZpzh7hOECa9 TAG4HglZN0mn7oHjty1gHrdogsDCollyMbMe5qJT6ew37ceks++uFd1B2fWAV5rnN0U6t3XgP zFY+RksSarM8afJ1JVxjmoFumZisvNaVgFnP6eHW6+RHi7MJFPngpZt1TpSEEbpJ5TCupQOp5 QRYzyU8goMMSzAVbRJGAmF376aQcmS4pH7f9vGbZkX90MagolcIuaXLhZXHMytjCE6AejoILq M/0u1P6qcustJ9jCaNWU/dNE0CaLutburFXOLP7nQQkpS6vNsXReBAEdZQQEwiIbWjCWkNj87 Otmo6JXe9UrYvvA1fV6CqOeIzgqtzrX2kLtPeKe/ZeEaLAZV1jV02UfXrXwNVmQ+nYxuitCcL hklDmEC5LhLyoxfLp4nEQ25SSlBqfk0K2d7U0GJP0adC3A4GB9704PH0Jg/AAemSj/5CMt3n0 v7+FtYwLb1bnTdw8zkLaje8AeuxKMs4vrMKpFKFRVue6VpZZtIqET4seUV0mhKlGp1oMJYT/K U4WXtONMdhjCmrjl9iEs Subject: Re: [PHP-DEV] Future stability of PHP? From: mails@thomasbley.de (Thomas Bley) Regarding compatibility promise, I'd also like to mention that things are quite complex now, e.g. https://3v4l.org/VfAr4 has 4 different outputs between php 7.x and 8.x. From userland perspective, having Craig Francis hat am 10.04.2023 14:58 CEST geschrieben: > > > On 9 Apr 2023, at 23:10, Kamil Tekiela wrote: > > I wonder about this every time I hear this claim. What exactly changed in PHP 8.0 that made the upgrade path so difficult? The upgrade to PHP 9 may be a little more difficult because of some of the recent deprecations, but that's still years ahead of us. > > > > Most of the deprecations and changes do make sense, and while deprecating dynamic properties is going to be a pain, I think it's going to be worth it (like undefined variables), same with ${} string interpolation (better to be consistent); and I know it's been mentioned in this thread, but `utf8_decode` does get misused a lot (read the RFC as to why). > > But I do not understand "Passing null to parameter # of type string is deprecated" specifically. > > I should note that the other coercion/type tweaks that G.B.P (Girgias) is suggesting, and has partially implemented, do make sense: > > https://github.com/Girgias/unify-typing-modes-rfc > > And (fortunately) NULL coercion still works when concatenating NULL to a string, adding NULL to an integer, NULL being treated as false, etc. > > One team of developers I know are still finding these issues well over a year later (they also introduce new code that trips it as well); two other teams specifically ignore this deprecation (far too many instances to "fix"), and one team is still to decide what they are going to do (annoyingly they are still using 7.4). > > Even Rector gives up and uses `(string) $var` for every variable that's a non-nullable string, which can result in thousands of changes in a project (that's for the ~434 function arguments being checked; personally I'd have only gone with 335 of the ~997): > > https://github.com/rectorphp/rector-src/blob/main/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php > > Anyway, when PHP 9.0 makes this a type error, in the ~85% of code that isn't using strict types, that's going to cause lots of random and unexpected problems. > > Craig > > > > PS: I drafted this RFC, but didn't continue due to the negativity (i.e. it would have been voted down, and then used to justify the type error): > > https://wiki.php.net/rfc/null_coercion_consistency