Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:119855 php.internals:119856 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20092 invoked from network); 10 Apr 2023 12:59:13 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Apr 2023 12:59:13 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 09982180503 for ; Mon, 10 Apr 2023 05:59:12 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 05:59:11 -0700 (PDT) Received: by mail-wm1-f42.google.com with SMTP id n19-20020a05600c501300b003f064936c3eso7663757wmr.0 for ; Mon, 10 Apr 2023 05:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=craigfrancis.co.uk; s=default; t=1681131550; x=1683723550; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :from:to:cc:subject:date:message-id:reply-to; bh=QKk63bBaoM5fTmLuhmya6dfxLxnLBC4D/0lanVN2+Vg=; b=ZRYoZv+dvIyTFlnlrJHCbKWG32+tH1LD5QItm9o7nKlCJ97c8ArSRo5Dzdk1orM3VB vGU+rUl7yN5qgN4zJM93FGo63633kOXQ03ttBHCJm5fh6o7z+oVr4e6JazcFdzGlGjxl DqeKorS8L6rAsYyAUzu9eGxMvZjpGfG/U41JM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681131550; x=1683723550; h=message-id:in-reply-to:to:references:date:subject:mime-version:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QKk63bBaoM5fTmLuhmya6dfxLxnLBC4D/0lanVN2+Vg=; b=zkYz8XY/t5uppGECQLA11hFtAux9nojM4dNz3ElPZKhsdZ52NfEEFAIj+86hqWyqsr da9+UBEoEqrMgV//6UBD8B3jUemszEwWFT4nS71M4fcqTXdCFQoif1vb87FGpwOsgMbD Gp6T3+YSy8QM1VfIeX+kDmoularEpyWvMgY+UmIYnowke50ZAAZoGKvVj6GLKBjj2jb5 kwc4o9s7I2ytX/0eAg+WdfQNUMgL+toiroJoh/X7pIDwwRnoo2u6fHWeCFMbujf6seUV +OV+KK12SYQ/qwuUgEdZsdYNQa4BEokEin/BnoGFjY9CwA9zDHM6AKOxWi7Q4trCnxr7 qH0Q== X-Gm-Message-State: AAQBX9f/bKpF6Nw9v0ea3hIquT/WvETfwu1us+uTPsqWqcPq0YVP7Lrr 3gNMrE/Wbj8mBCLzfrczF2gLMC+tRUDd73Y8PkO7WA== X-Google-Smtp-Source: AKy350Z91L08ZS0Qd3B9UAnjlUNWGZh+cF8T46m7EHOlfYV3jD+TyrEMLIm3dE1Yx3Dra5Ovk3ta9A== X-Received: by 2002:a7b:ce03:0:b0:3ef:62c6:9930 with SMTP id m3-20020a7bce03000000b003ef62c69930mr7448671wmc.3.1681131550017; Mon, 10 Apr 2023 05:59:10 -0700 (PDT) Received: from smtpclient.apple ([92.234.79.97]) by smtp.gmail.com with ESMTPSA id h7-20020a05600c350700b003ee9f396dcesm17672429wmq.30.2023.04.10.05.59.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2023 05:59:09 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_5BF26CFC-9E5C-473D-A0FF-CEFD98B55669" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Date: Mon, 10 Apr 2023 13:58:58 +0100 References: To: PHP internals In-Reply-To: Message-ID: X-Mailer: Apple Mail (2.3731.500.231) Subject: Re: [PHP-DEV] Future stability of PHP? From: craig@craigfrancis.co.uk (Craig Francis) --Apple-Mail=_5BF26CFC-9E5C-473D-A0FF-CEFD98B55669 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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/FuncC= all/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 --Apple-Mail=_5BF26CFC-9E5C-473D-A0FF-CEFD98B55669--