Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120181 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55648 invoked from network); 2 May 2023 13:07:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2023 13:07:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 46EBE180544 for ; Tue, 2 May 2023 06:07:35 -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,FREEMAIL_FROM,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-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 ; Tue, 2 May 2023 06:07:34 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3062678861fso2004588f8f.0 for ; Tue, 02 May 2023 06:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683032853; x=1685624853; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=U5KvKfyEJXjpf8izLYYN4jNtXmrGFH1jbBf5xBCCbTk=; b=RG2BL70Bnk8k4Xt+qOcTwMWiH/MIfekMP/prR/wpBDQjdpryMi5yomyB9RQE52IOuQ mnmqOzJuXp62aaHz9Y6HAVwlnt95z2odogf1qepVAAo3BVuVrvu12vtPK4jANFvGN5f/ Rbhi0CnESPdA/5Bwrk/0+GQgajLbAwpMbXZQyQYcMLTu93NYLrtLMiBeVgJLN3ogj0Ny O6TowXAgqquspfSDFzDO22K2dkSeODNRjgnGIxysQWUu19x/wld5L+Cb++4+jlAPbnzK HNDo5DQQWGn4Pj7cfw088KrqVfuvAwub2BqCwXesNskyxntE5WPd5wKql4LjXFrvtYj0 kQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683032853; x=1685624853; h=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=U5KvKfyEJXjpf8izLYYN4jNtXmrGFH1jbBf5xBCCbTk=; b=Zt7P8sqObKTeASg9VTrl1EPt019MrBMl7BXhkzbNUQAqe3lWFElBaMcpAmucz8ATQ/ qjTmD7fqZb2U27h4pQ61ZO3mSWyReNbPYOWRTXUBFeDI5Yesjv8z3G0hAYsVfFNk/GxZ bRfiv//KQQNJrrq3CiR/Sh7IwP12lpzA5Q9occDtne2pwOG7vKcqVRvitmu5Jk8Ul+dz ijQN4cuMtRt2EeXcsCPCUKZw4Hf6u1eJ3zjWeCjRpSymG3vwNgtQA3nACFH8X8pvuXLs m8G95tyzP8ah9sE8ym9IK4IYl3R0UtWfDI03/Q9m+cYcki1g9McXnddbgzbXc3Dir+zp yDlQ== X-Gm-Message-State: AC+VfDyZkZzcoPfEKNY0F6kNO/p2k/0fZrJR241nipb3+/ApXteTWlJS wIX0BOnzgTldJK33j8nSFirNsRge+0CW5VpZEVNwIvE72eA= X-Google-Smtp-Source: ACHHUZ61jeq0YmM5mXvoA/CNNX9rjErwqW1Do+eitlusAKQzdv5qLvXlM9hRVHWyOsR4BD67i+X+fjw7p0BsePdzQl4= X-Received: by 2002:adf:dfcf:0:b0:306:3afd:ed8f with SMTP id q15-20020adfdfcf000000b003063afded8fmr734096wrn.25.1683032853504; Tue, 02 May 2023 06:07:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 2 May 2023 14:07:21 +0100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000060f32605fab59f68" Subject: Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: rowan.collins@gmail.com (Rowan Tommins) --00000000000060f32605fab59f68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2 May 2023 at 13:20, M=C3=A1t=C3=A9 Kocsis = wrote: > Yes, but changing session_set_save_handler() to session_set_save_handlers= () > should be a reasonably small effort, isn't it? I understand that it's > going to affect > lots of codebases, however other PHP 8.x deprecations are much more > difficult > to fix than this one would be. > Oh, did that proposal change, or did I just misread it? Maybe because the function names are so similar? In general, I hate variable and function names that differ only by an "s", it's far too easy to misread or mistype them. Maybe "session_set_save_handler_functions"? For the same reason, I much prefer Kamil's suggestion of " stream_context_set_option_array" over " stream_context_set_options". As an aside, I don't think "other deprecations are already more difficult" is a good argument - it's like saying "yes, I punched him, but not as hard as someone else already had". I think the change can be defended from other angles, but wanted to call that out. > Yes, I agree that the assert_options() name is at least weird but I > wouldn't like to > include changes into this RFC which are not strictly related to overloade= d > signatures. Just like in case of implode(), the 1-parameter version of > assert_options() > could be added to the PHP 8.3/8.4 deprecations RFC though. > It *is* strictly related, though: the current function has two purposes: get an option, and set an option; the RFC proposes to split that into two functions, and there are three ways we can do that: 1) Keep the current name for get, come up with a new name for set 2) Come up with a new name for get, keep the current name for set 3) Come up with new names for both get and set I then looked further, and suggested: 4) Deprecate the existing function, but do not create any new functions; instead, recommend ini_get for get, and ini_set for set All four options are direct remedies to the overloaded signature, and I think due to the current unclear naming, options 3 and 4 are superior to options 1 and 2. Do you have a specific reason to prefer option 1? Regards, --=20 Rowan Tommins [IMSoP] --00000000000060f32605fab59f68--