Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120561 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50866 invoked from network); 13 Jun 2023 14:49:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jun 2023 14:49:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A20391804F5 for ; Tue, 13 Jun 2023 07:49:22 -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-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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, 13 Jun 2023 07:49:22 -0700 (PDT) Received: by mail-oo1-f53.google.com with SMTP id 006d021491bc7-55b3d77c9deso3902115eaf.0 for ; Tue, 13 Jun 2023 07:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686667761; x=1689259761; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0v+K1DW7QO4njtsOH4KZoFusJNYps/+PBilHze5dIQ0=; b=N4ZhBpf0MpxuziU5kTlFAbONxi9M9VVBM0gVLckbEx5xQaUs1Aoh269g7Ly5u0RiJ3 XEHrUnIt9Z2Y/AQFQY/HwgyqpjoJy6e7KuWI8MVmz+krfKgaREbnIYzBSxVFtHQPuJtI Tz2ip43zrGtoXtxOo6Z/h4gP9DAcQzZ6LEI906g2DNE5E/FMyXHMQc/5irQ9vWiEpDch wGifaBRe6yQYq7d9s+hD/sbP0LV8WjxbLcgg4ABE4guJQ/pWrYUcy7BxskxiZZuzamER 4WFvzcMD0ba4XorHdVDCvXx3PMqMPhYoojIPxg0ct4tP0x4nvhye3QLdJKLQyd5O5Coz 8UEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686667761; x=1689259761; 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=0v+K1DW7QO4njtsOH4KZoFusJNYps/+PBilHze5dIQ0=; b=AsUwy1oc7tmdHBuSyzF8ex4OZ4enMqG4cSiPN8KbXMH8fYI/VlyEb1SfGoKtIEagya zr2rSMocWKwdfcNXcpR8JJvLs7E+ErZVuz2VGovqcQOWbkPMyCvnV69vJgQ06OU2V/VH xLSubwygAFWNYSZnumQ0i6djXHMaFsZYkDA4Ad1hlobw57lW2ajbjkR1ge+uRxtPiVhk tvVjnwEYCruJWEa1ddc3zEL/cErLaVpdR7vA8aavpn0nO31OzQC4qV7Nbr18fQlnPfPv KgOENpmsNkb6aWYTFhQ94djUYH83I0GNmLc0yntXSF3CXGEHvpLcCHoUzgBJa77z/sFX Jk9g== X-Gm-Message-State: AC+VfDyJp1frU+F55hhC8HTiWJWVNSBXJy4s09d5Y6L4/2y7qtuVr5NI /RmK1z6NvASbSV8WE5FpKnYm4y4vtAGo8dScvtu8qOWz4Qg= X-Google-Smtp-Source: ACHHUZ74jYkdTCAbOT/cDv+NawJ6rJmM+nwx5/gkdFAdz12E2T5N9nTo0Oscl6sa2Xyc3mDFXNIamqssPcdWij9Bplc= X-Received: by 2002:a05:6808:9a1:b0:398:59fe:6ee3 with SMTP id e1-20020a05680809a100b0039859fe6ee3mr6832937oig.54.1686667761428; Tue, 13 Jun 2023 07:49:21 -0700 (PDT) MIME-Version: 1.0 References: <108411AD-DBC4-4436-8190-7569B7A0805F@gmail.com> In-Reply-To: Date: Tue, 13 Jun 2023 16:49:09 +0200 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000c62c5c05fe03f0ae" Subject: Re: Fwd: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000c62c5c05fe03f0ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > > In my mind, the only reason to change anything about this function is tha= t > we can't properly overload a function based on its argument types. There'= s > nothing particularly "primary" or "better" about either of the two > signatures, it's just hard to document and use named parameters while > they're both part of one function. > Yes, that's the case exactly. > My suggestion was very explicitly that everyone using sessions should hav= e > to change their code, to a name that explicitly mentions the parameter ty= pe > in its name (because that's the difference between the two). As I said, I > think it's much simpler to communicate "this function is deprecated, choo= se > the appropriate from these two names", rather than "this function is > deprecated in one format, but not the other, and if you are using the > deprecated format, you can use this instead". > I understand that communication is much simpler with your suggested approach, however, deprecating something which everyone surely uses partly undermines the efforts we have made for ensuring as much backward compatibility as reasonably possible. That's why I'm not in favor of officially deprecating the object oriented version of session_set_save_handler() just yet. I think soft deprecating it for now results in a smoother upgrade path by letting people optionally use its alias first (session_set_handler()), and then we can start nagging them later on. Otherwise, I would question why we had to have such a long discussion focusing mainly on the BC aspects of the proposal. I also understand that polyfilling session_set_save_handler() would also be easy to do, but the migration is even easier if we leave the 2-parameter version alone for a while. Both the "_object" suffix (or some equivalent) and deprecating the original > regardless of signature are inherent in my suggestion. You seem to have > interpreted it as something else, and I'm not entirely sure what you're > actually proposing - how does an alias fit in to something that's about > splitting a function into two? > In my opinion, the "_object" suffix is superfluous. There would be two session_set_handler*() functions: the first one accepts a session handler (instance) (session_set_handler()) and the second one accepts session handler callbacks (session_set_handler_callbacks()). They are not primary or secondary, I just don't like the "_object" suffix, and I couldn't come up with a better alternative. Regards, M=C3=A1t=C3=A9 --000000000000c62c5c05fe03f0ae--