Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128415 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 lists.php.net (Postfix) with ESMTPS id 7AFC01A00BC for ; Thu, 7 Aug 2025 01:46:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1754531074; bh=153b1JU+UQOYGEbAIzCuWkcEmgisScVoXZW0vgieMsM=; h=From:To:Subject:Date:References:In-Reply-To:From; b=XYM1fWaMAxLMA1chiO8/xQXH+bViFjVozGMu3h1/Fvco1MuQm9GqKPCZ3ImnHiiEl lzdCoYj/MConVTL9RI31Gyb4eFF/FwOT7U8/pyil7tskJiAbDLQWSiUNV2u2dORpNG IJZW+06ZJ9WBmpU1NPOk0sRD0eh4yXNFoFj5/9maeViGEbZ03Tf3siUL7esagH/C8/ zz2nfjkyVZEOpaAqNGvoHAlTlJrtRZTep/Jn3tgKC82PqXAykCQt/9XwrpIIsN6nP3 sa5iDJbPDMf5/Xqn7pSJ4DHiylvsOzBSTmzBAl58+trqqyOuaxzMvk0ZaWtrio6Uc+ vCoGK950RlAlg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DCF8918005B for ; Thu, 7 Aug 2025 01:44:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_20, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12olkn2024.outbound.protection.outlook.com [40.92.23.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 7 Aug 2025 01:44:30 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iTWkeK61oVu7zPcK+a+QzzB+Oc+8k1MJ50ImB1k56ZOdFJQPw2Pp2hZHYPvDNLlyJrsE9gqFbEmIeBrOqEEMDbOh125Yy6WA6Vi8ix9Zbn964akMFLfGgHQGdbjgVUzLWw8aN/hdR+LAzu0tSllgzDqBJZz5nPxithAn5cVBIQePW2k9177bGxv0NybSmhpnDaMX5X6pGGUBpSV8IEayPXA/nRc1cTACqIY3Qys6sVuEDew7s3snf34wp+pFp9Uz2QKkQqj6Ug///lbbV/woOdGlmcP9d31fj4YwkSRblldCkofCLBwdC/jmzOY5feNvXeQQornybGKjEYyKnKOcZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=153b1JU+UQOYGEbAIzCuWkcEmgisScVoXZW0vgieMsM=; b=hvjuKSncWojQrw8l7yCkH26iLfrp703eg/GyerQhZ/2UWW6qDlLct+zpXxE2ByrmAKf8QyXZ+1pk8gSUxySJxf0PQ9PHyhtst0wbbbyEqFYtOdccfxLJT2UzGox4dpS8HSeIIaJkykUJvniwum7cOLW8xwv/uCpVQ0/GWn0km0oyrEiNEsNfosuCWpe1k1VYTfau5Bs2QXDHEUrAkZeU3PAM1byywydqZmv+KTlRqJPrJ3kV5C/3Mgx6W46tDW3eaVQth7sWMO973DYq9YDPkFBoX6mjBhS0+b2EicsfCatqCUe7CYPe81ozx48ZciATYogk24nWYh5VzYnhYFJfnA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=153b1JU+UQOYGEbAIzCuWkcEmgisScVoXZW0vgieMsM=; b=uLeqRdmhedhnB8pRhkpD2s5r4lM1TqBpWAH0jH97cNdMWWbSWdeuya76a/fUWbY5H0TNUNcXNFGnpBnCsAZvm5WKobKWsh5ENcTA9SIs4tetNBJw8eivID32UjHVTVLRYX2o5T8+2ECqlz8ZsjYpDG0jsUOImw2qTfu2i2jtSUYe8YEMLPcXATFx1SHMNkxreY8PQ//CoZ4KEiEAkniAypRIr6XEg367rBv0kON4sv05S9phBT5IN0jWjld5nLxxUFmkvfPQ5AGyO90SMndGHegZ69LqSs+/gLWXVgho/1i0q7VJWpMHYcr2bMLde/UjD1Q4+p6GL/rFl1TrppNWCw== Received: from BL4P223MB1364.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:5a9::14) by SJ5PPFD4BFD2A81.NAMP223.PROD.OUTLOOK.COM (2603:10b6:a0f:fc02::63a) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9009.14; Thu, 7 Aug 2025 01:46:06 +0000 Received: from BL4P223MB1364.NAMP223.PROD.OUTLOOK.COM ([fe80::2e7b:7134:b7fe:e849]) by BL4P223MB1364.NAMP223.PROD.OUTLOOK.COM ([fe80::2e7b:7134:b7fe:e849%4]) with mapi id 15.20.9009.013; Thu, 7 Aug 2025 01:46:06 +0000 To: Juliette Reinders Folmer , "internals@lists.php.net" Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 Thread-Topic: [PHP-DEV] [RFC] Deprecations for PHP 8.5 Thread-Index: AQHb64u2H5zq3sHt70yWwR4bMWJ8NLRCZ0aAgBKk0u6AAWrOAIAAF5LK Date: Thu, 7 Aug 2025 01:46:06 +0000 Message-ID: References: <68830C4F.5020107@adviesenzo.nl> <6893E062.2070709@adviesenzo.nl> In-Reply-To: <6893E062.2070709@adviesenzo.nl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL4P223MB1364:EE_|SJ5PPFD4BFD2A81:EE_ x-ms-office365-filtering-correlation-id: e76eea43-b7d4-4d7e-2787-08ddd5542d18 x-ms-exchange-slblob-mailprops: YfhX3sd/0TVWrg+fxRScxfg9v9HXnUFl5RUDEdTsiLVw0UCWPpBThm7gtMl19bmjanJFrKvbJ463XboFL1eUz6RZFOcg1MkYhykVYT9mgtc6xUCQI6wT+P8BCDhIH9PKCl+2wYceNUY3BVC7uaZxvZz5LWqCnJKS34RNz3ohkpGSEwt4/WBiDmhPu5BSrMVFfcwW+boDwq+ITm5L26RCp4G1U/gISi0b3PhBDmsnVUJ4Coyo7Kbyq2/dRQZVePK5WemZf1xQCqPk70GtuOj+Z4GTluHnMeKo3sbpmIHeVG9h0rcrXFSbSO8DQ29L3twPLXhwBh8+S6ndYUElK/3QN3VnVqtkZYaUoxxPBQYb+k/+4LjV11c70mbPds12z5HYXSSYVRCt+MHpgRbfEyCm9kOwDk/lDkAz79F4mG44iY3Umhkts+hDbfLSegmZG10TlD45V4yU2Ra8pEwBH/KEiU/g2y0IRsVqjQU7VYzHd270zW0z9VwvESsScRFk+t6xXstwN/EGTlBGCNigsvNNboPXIujpJSTOS2nQg62ZeNaGfewneoTnnhxiEPHSENs/8cJmwMcF3LHyZsUCydXzwh+tkzRgpjSJlLUKvBeGf1AXds18YIK6whsJU0ww89cXNLIwyIP/RNNTAiE6QE4ar+QZC7mKfMdA4PPQzg4G6yhmyDfoZo2vzGPUcPxuitnkbzgOiLLCgvWFLxiTQSc6AfbWGLcWKKfTeZl/a46PQF0Lv/PrTHcTy0ud71ZLPXJpKklMRYmdgCRygDYFTikTdtV2J/j5tutsrRAXgO5gbo8= x-microsoft-antispam: BCL:0;ARA:14566002|31061999003|15080799012|15030799006|19110799012|461199028|8060799015|8062599012|10035399007|56899033|102099032|1602099012|4302099013|40105399003|440099028|3412199025|52005399003; x-microsoft-antispam-message-info: =?iso-8859-1?Q?um+YlX+qZHW9E6ZOd3RO4aC5rCwweLbXv1XntcZXfHbDJus1lS7pnRQ8+N?= =?iso-8859-1?Q?ycS8UgbL+UYatxYtHpjNTIb1A/Lt4Erutbrm4IopyYQf6cSxg1dEZP99ev?= =?iso-8859-1?Q?SxsiE0tyqr9JnUzMotPSogkCzmwYCVfBRNWFbCkKrz3ZUnVd/Xi1on++Jf?= =?iso-8859-1?Q?/cJnh6YpLqw3V9T4cTM+vgWp8FdoWUjEiFiSj/SWociLPugkVx3ip+flTg?= =?iso-8859-1?Q?ZpjkoKu5sfeQdvTXxkk/I7795rpuU4d15GpeDPJp3Q/fXkx+L6H5CBltcQ?= =?iso-8859-1?Q?NvesMwKJ0re5TukDn209I5vMeuu/5FDlTLQJm9jK9ecP7yZI2v2Feimvrr?= =?iso-8859-1?Q?f6vMD8Ko05pcK0d9cOk7eXt6fWnmJC3ImMhfUlJvyQiR53Dg3K9LkjSY1/?= =?iso-8859-1?Q?quLvhbPmaS9h28qz4rewnFMluZ45L369X6IkCIqoKRchMJHPv+i9ozyGUx?= =?iso-8859-1?Q?yrlZM95YOo3m8hH6YKqhd9G5+QOEvyUc6wlxbY94OsD2Pc9g1+RJ0mZqhP?= =?iso-8859-1?Q?SPe+OZSFytXcHOFDIe4ji4/1DQEhBdcS+cEt/pg/j/wYhrqeKIxOgsIsAG?= =?iso-8859-1?Q?eyZLzXnIrjheCmqS3uI1gn9zmm/SA+JrUi8aKzN9Xi/keUgg81PJYONlIy?= =?iso-8859-1?Q?08sLXDuopLLwrdj4t8oEYL+pNBKllPBDAFvCcTPybSEvEnieWLe/YI02fR?= =?iso-8859-1?Q?oSePgyxjv6FF+rAWe1dwKL1ZpGjf3MpvBNv8X7u1P6vcyszPsCN7P2pnir?= =?iso-8859-1?Q?ZOvvVwF3xTiPlB7gCb6MvzZcPS+w2qPhcL3AAkDiRf237G7j9XF6rP9slD?= =?iso-8859-1?Q?w2aixVlYl1z3Oh85RcIKduLzecVj3vLc5P1LEw7f/XJ78HZfVJA7Gj1D5G?= =?iso-8859-1?Q?z9D9GlneKivXWqSf0Dlw74lA5edD64KCAVvCLbK9L0teZ5zBgLdnr3T0dH?= =?iso-8859-1?Q?MRooLPKTU2frK2xGImD49K4zGPZAPw6qxW8YRth9BNXy6FI4jbM00Qgc1i?= =?iso-8859-1?Q?S20UQZ+TZDGsFRPCzFfAl3b48GWI8DsJZcXBlOxZRkDL97P6BRQMtIvH8Q?= =?iso-8859-1?Q?iWQ1+w7dXJfm/6d3OK9DF/k3CAc4N7eoSqdckmgl9Sh7PwLBTka69345JP?= =?iso-8859-1?Q?/d32BbPyTMrHAk951IlwYnHUi/h1cTEKy+V5s70fezdR1I4ZZDXWwpx1PH?= =?iso-8859-1?Q?eZSCDdxu/K4moZa4iV+DXvH3GowH2zAOPRXwWK8An985ZReLTrskOBf3vB?= =?iso-8859-1?Q?v5p4YKeCWRoZD/bf4Qhy0r5Y1rcZcTwxMoPHPP/QIE71SKuiM9Ojkjuq+g?= =?iso-8859-1?Q?AJMYK3b2ATXSt/0LeaQXlldKcgPhZrKcKWFi2WzMZUWWFps=3D?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?vxdtRpPA3QehIsH7zlmPvRRYMfNb9IolcSLbJ1fUIiITn6OeyUSx1rYuot?= =?iso-8859-1?Q?eC7jyYPbpXWpi5u/y0Tiw+J4AWxGKVGWBMuOrymsSIKeBZ77Wg1BKTnQ8h?= =?iso-8859-1?Q?70bgjCIuRaTnxdJ/V3N1EUs3sUyB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HF7OsuYtY8d2Oex9AJStjm0Si1norg41nD+A+F87RTqz9iYl0NJYc+5x?= =?iso-8859-1?Q?23m9mP1MnYYM9U7yOEYCPWdsif0vAEyjdVh0hJfindHvmw+eE4+MyHILEj?= =?iso-8859-1?Q?1mFdb7vzO8O7MeWH4boDNz37GV28J5aAJPOcIQ7c4rXi7AWAT3zkuHXMNr?= =?iso-8859-1?Q?L5EE8CotkTxCY5pJ9JY6WtZ9fNdpMB1d+/epz7b2rs4aFS0E9dEC79bNEZ?= =?iso-8859-1?Q?31/Ox8kv6J8k/KWaCAwSMnXJRsKWOncf4eUuZHkow=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL4P223MB1364.NAMP223.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: e76eea43-b7d4-4d7e-2787-08ddd5542d18 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Aug 2025 01:46:06.6897 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ5PPFD4BFD2A81 From: theodorejb@outlook.com (Theodore Brown) On Wed, August 6, 2025 at 17:08 Juliette Reinders Folmer wrote:=0A= > On 6-8-2025 6:21, Theodore Brown wrote:=0A= >> I just analyzed the top 1500 Composer packages for a couple more of the = proposed syntax=0A= >> deprecations, and found the following:=0A= >>=0A= >> ## Deprecate non-standard cast names:=0A= >> 197 non-standard casts in 25 unique packages.=0A= >>=0A= >> ## Deprecate backticks as an alias for shell_exec:=0A= >> 49 backtick operator executions in 10 unique packages.=0A= >>=0A= >> I find it ironic that the more widely used of these proposals has the le= ast opposition to=0A= >> deprecate (100% in favor so far), while deprecating semicolon-terminated= case statements=0A= >> (which has zero usages in the top 1500 packages) currently has more oppo= sition than either=0A= >> of these.=0A= >=0A= > Hi Theodore,=0A= >=0A= > Thank you for making the effort to gather more impact analysis. I wish th= is kind of=0A= > information would be mandatory for all deprecations and I appreciate your= efforts to=0A= > help gather the info, though considering the timing, it probably won't ha= ve any impact=0A= > on the vote anymore.=0A= =0A= Hi Juliette,=0A= =0A= You are welcome. It takes time to download top packages and write analysis = scripts,=0A= which is probably why it hasn't been done for more of the deprecation propo= sals.=0A= I agree that it's generally nice to have impact data, though.=0A= =0A= > I'm not surprised at all by the 0 usage of the semicolon-terminated case = statements=0A= > in the top 1500 packages as it is forbidden by PSR2 and a significant num= ber of the=0A= > top 1500 packages use PSR2/12/PER.=0A= > In contrast, PSR2/12/PER does not have any rules about the use of non-sta= ndard cast=0A= > names or the use of the backtick operator.=0A= =0A= This is not the case. Since PSR-12 the longer type keywords have been forbi= dden.=0A= See https://www.php-fig.org/psr/psr-12/#25-keywords-and-types, which states= :=0A= =0A= "Short form of type keywords MUST be used i.e. `bool` instead of `boolean`,= =0A= `int` instead of `integer` etc."=0A= =0A= >> Perhaps the deprecation seems unnecessary at first, but there is a non-z= ero cost to=0A= >> maintaining this legacy alternate syntax in the language:=0A= >>=0A= >> 1. It requires projects and coding style guides to choose and document w= hich syntax to use.=0A= >> 2. Coding style fixers like PHP-CS-Fixer and PHPCS have to implement and= maintain fixers=0A= >> to enforce one of the syntaxes.=0A= >> 3. Who knows whether the alternate syntax may block future proposals, as= was the case for=0A= >> the curly brace array/string offset syntax, which being deprecated in PH= P 7.4 made it=0A= >> possible to implement property hooks in PHP 8.4.=0A= >=0A= > I don't think this reasoning is valid. Code style tools which have suppor= t for scanning=0A= > code against PSR2 already handle this and have for a long time. There is = no significant=0A= > maintenance costs to that anymore. The costs is in the past.=0A= >=0A= > More than anything, even when the syntax would be deprecated and eventual= ly removed,=0A= > these tools will still need to keep up support for flagging these things = as these=0A= > tools are often enough used on older code bases, which haven't been updat= ed for the=0A= > deprecation yet.=0A= >=0A= > The deprecation and eventual removal will more likely increase maintenanc= e costs for=0A= > these tools, as contributors less versed in the intricacies of PHP will t= ry to remove=0A= > support or flag the test code used as a parse error, which then means a m= aintainer=0A= > will have to explain this used to be supported by PHP etc etc.=0A= >=0A= > It also means more detection tooling needs to be created - like in PHPCom= patibility -=0A= > to detect this for years to come.=0A= >=0A= > So no, in my estimation, deprecating this syntax will create more work, n= ot less=0A= > work for code style fixing libraries and adjacent projects.=0A= =0A= Even if there is some short term effort to automate deprecation detection a= nd fixes,=0A= these tools will eventually drop support for PHP 8.x, at which point it wil= l no longer=0A= be necessary to maintain the fixers. Without the deprecation, there is extr= a work=0A= indefinitely to ensure the fixers continue to work with the syntax in new P= HP versions.=0A= =0A= And tooling maintenance is not the only cost. One of the reasons I was moti= vated to=0A= include the deprecation proposal was seeing all the discussions over the ye= ars in=0A= Drupal related to this. See https://www.drupal.org/project/coding_standards= /issues/2999367=0A= (starts in 2018) and the referenced issues.=0A= =0A= Deprecating this unnecessary legacy syntax will eventually remove the need = to=0A= maintain extra tooling and coding style documentation, and ultimately=0A= eliminate a source of confusion and inconsistency in the language.=0A= =0A= Sincerely,=0A= Theodore=