Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120229 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69948 invoked from network); 10 May 2023 22:10:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 May 2023 22:10:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 39A5E180551 for ; Wed, 10 May 2023 15:10:46 -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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) (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 ; Wed, 10 May 2023 15:10:45 -0700 (PDT) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-54fd9c0e435so895767eaf.2 for ; Wed, 10 May 2023 15:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683756645; x=1686348645; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gFD7vBBeUOqRyWM1mNzonY9MsRC3BFfobuudz0eUD/Q=; b=An6qBSC9CBFRsU4uN2EUSI+0r0k5EatCMVuHMtUioTbHvi3qoBU4juQP8kWMnoU8+S 0JkXyaXB95yrNXaO3rfMif6qQyhD3NDy7gdUuhvW8pT3SknQC4yubzOChiJ3AMzSrMLu 4uaQnkVVpHmQ2TCms7T+19kGySk4fHK+CMtmQHQIjgQyzJGIt1dptqLUx53Oo4dsNml7 9BWouzAAvrN1UJvmmeRwBa2tC15g9E73OBP0EmT81+g9lBcaVATSnLa47kNC09qMP6Zr XihNLStfNqP5GEbNWadLIex02NcyJrEHuGPBmn2Ihav8y+brsefDct/Z1PO78Xx93VHi 3PsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683756645; x=1686348645; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gFD7vBBeUOqRyWM1mNzonY9MsRC3BFfobuudz0eUD/Q=; b=c8/chaMdG8uoFoJ91rPsDfx3XCUPrRtu+nqjJN3BgennX/NCY5Wi/hm6P0hv3Xmvt7 Y55GoyCY1Y1kgmcIBApQEpSdJ1D5MN/SG4Rqgj+SAm62/wW3tKr6xs9jxC2ZNcEojcxw xgnxCo0i3+JW0U5zteJF1g98j8l5W/tSb4UyMHdlRcc8VvZKsI17fW7H2YG0BG68TDZA hot2ftdJxKZmxeC3nMhq1kum9ohmcEp2dD6KoLWUnWi3rlXeklgk6X46J+pnW3qKq8uT 0GRePakvF0zeIvkQVb4ZuBqR4TQy1rOMgrTLNXjwvWsQeGR+b5ehCNCqKMdi+8UVtx+f O/yw== X-Gm-Message-State: AC+VfDx4VDownl5pjqRYBxCZLOdbVP97zRSBHSPnGmSmumYg1z5bXLtZ i0wBkP+LdfXS9LTbmVElIsGqGGa6Kuv9bjpGQdgYx5kmrGZJK1P5 X-Google-Smtp-Source: ACHHUZ68AKccHEGHtpKtj9WZLXhlmwIyea7fbhwuEZLFjNj6sbvWluj5Jeof6wJLAHQBfhinY3iMmxUpXd8jx02Klic= X-Received: by 2002:a05:6808:614d:b0:392:6077:e36e with SMTP id dl13-20020a056808614d00b003926077e36emr3668084oib.44.1683756644989; Wed, 10 May 2023 15:10:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 11 May 2023 00:10:33 +0200 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="000000000000b6827905fb5e24a3" Subject: Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000b6827905fb5e24a3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dan (and Larry and Tim who responded to the same topic), Would leaving the current versions in place and working actually cause > any maintenance issues? Yes, unfortunately they cause some maintenance issues: since they don't have a single signature, gen_stub.php generates the wrong signature for them in the manual. For example https://www.php.net/manual/en/function.stream-context-set-option.php displays two distinct signatures, however gen_stub.php only knows one signature, so obviously generation won't work well: function stream_context_set_option($context, array|string $wrapper_or_options, ?string $option_name =3D null, mixed $value =3D UNKNOW= N): bool {} I use gen_stub.php for automatically detecting the outdated function/method/class signatures which I can then commit with minimal effort. Actually my doc-en PRs ( https://github.com/php/doc-en/pulls?page=3D1&q=3Dis%3Apr+is%3Aclosed+author= %3Akocsismate ) are either fixing outdated information in the manual, or ensuring that gen_stub.php can generate the same information that we display in the docs. Now, there are only ~50-60 function/method signatures in master which are not in line with the output of gen_stub.php, and most of them are due to overloaded signatures (the rest is due to PHP 8.3 changes which shouldn't be documented yet). For reference, the number of outdated function signatures used to be many hundreds or probably 1000+ when the project started, just before PHP 8.0 came out. If not, then we could just move really slowly on deprecating them. We > could deprecate them at some point in the 9.x release cycle and remove > them in 10.0. Although I would love to get rid of as many overloaded signatures as possible due to the above mentioned fact, I admit that there might be some signatures which other internals would prefer to phase out slower than me. So thanks for the idea! Now, the individual votes in the RFC contain 2 options for removing a signature: a shorter path (deprecation in PHP 8.4, removal in PHP 9.0) and a longer one (deprecation in PHP 9.0 and removal in PHP 10.0). Additionally, I wrote a very explicit and detailed list about the suggested BC compatible alternatives for each deprecation so that now it should be very clear how difficult it is to replace a function/method invocation. The RFC says: Impact analysis: 1 out of the 2000 most popular PHP packages rely on > calling session_set_save_handler() with 6 or more arguments. > I doubt analysing github is going to give a useful measure of the > impact of this RFC. Functions like session_set_save_handler are going > to be used in custom code written for a company than in shared > libraries. Yes, I'm aware of this glitch, but that's the best I could provide for estimating the impact of the deprecations. Cheers, M=C3=A1t=C3=A9 --000000000000b6827905fb5e24a3--