Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120553 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7611 invoked from network); 10 Jun 2023 07:31:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 10 Jun 2023 07:31:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A7A01180089 for ; Sat, 10 Jun 2023 00:31:37 -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=-0.5 required=5.0 tests=BAYES_05,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-f45.google.com (mail-oo1-f45.google.com [209.85.161.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 ; Sat, 10 Jun 2023 00:31:37 -0700 (PDT) Received: by mail-oo1-f45.google.com with SMTP id 006d021491bc7-558a79941c6so1622637eaf.3 for ; Sat, 10 Jun 2023 00:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686382296; x=1688974296; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9P1o6UpzMLu8ZwHl5QpEjcTSyo7Q2pl/QwlQMEx9cdU=; b=eJdM9aqbXjq4NkZages3AemjeNWRjDUn6Oufun2H5NHpb2Ux7vWkpqab9N6G4Mvzkj oEd2hIPZLTBeOslEkj2iZIx6Fahx1Sd6CUK4Md/oRq0nJHQIMpW7BSobTdPHmA1biGko TqS0YY/R4/xVWpnDoxWRyjSKFnDcXe5WWggZ2clo5NonXD5zvBKkz94k6Sx0dBi6Uorp 5o9HCykUyu2SrdxZWEIsnRBIjHatQe0fbJQHgNQtzTIrE8csxB1wdsnGsVIbbMmgM/5u nrl87WFoRRQgCCxSgn4i1eLlDgyNNIIiVtwaWDVmNl7VFOSFwWIuBrWAvo5S78/B/kcs 8MYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686382296; x=1688974296; 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=9P1o6UpzMLu8ZwHl5QpEjcTSyo7Q2pl/QwlQMEx9cdU=; b=Nm/MJCbTcxxd8T+qX3dojncL91PMdDB8ruIUQjcjlqTI8wvLNu2rdK09qbol86f2UX kk+sijogHvzDvKvZS67amsJopfsISFZ9pjASTvSRChTZ97uwzOkUgpdvFItzahb1WYj9 MGMp9P2LMtpq5Aag/ZAj52S6QAcDcz47r6W+kxCPQaCuqxJ5Qqywsla1eGYW6U3cPaS6 zWQz47sZLNFtxwLul3AfgszwOnlTH3BJInHlHiPke5TZQmRG410UObGfsuvwl/oBI97C WrDrVbC/4+K4eaSVUNxOn2+t15Yy1CMae0b16b6pPDYzj80VThCmGFadPnPlSeERB0Wt +l3w== X-Gm-Message-State: AC+VfDwsH6xFE4Oubn2RccIZV+qyaGd53n9OAwCgfRvjKUrDYLOVdO0p g+s0zPlEEWLYaTlAoMYj4nJzq7OjhA49XUaIxT6rKctOI94= X-Google-Smtp-Source: ACHHUZ7xjHUriOe1u4VPJhFx2juabsJN9R3YLDNQFXkWGAYCBkVHXF/HHoSolSQrwVNOZiEdoodInPawD6vlde/CPpc= X-Received: by 2002:a4a:b4c2:0:b0:558:b60d:edfd with SMTP id g2-20020a4ab4c2000000b00558b60dedfdmr2383807ooo.3.1686382296278; Sat, 10 Jun 2023 00:31:36 -0700 (PDT) MIME-Version: 1.0 References: <108411AD-DBC4-4436-8190-7569B7A0805F@gmail.com> In-Reply-To: Date: Sat, 10 Jun 2023 09:31:24 +0200 Message-ID: To: PHP Internals List Cc: Rowan Tommins Content-Type: multipart/alternative; boundary="000000000000b9aa8005fdc179ba" Subject: Fwd: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000b9aa8005fdc179ba Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I'm forwarding my mails which I managed to only address for Rowan: Hi Rowan, > If we go down that route, perhaps we should come up with a corresponding > name for the object based version - "session_set_handler_object" perhaps? > That would also mean the deprecation messages can be much simpler: if > you're using the old name, you need to do something. > Hmm, that's also a very good idea, and I support this. However, I'm hesitant to deprecate the 2 parameter version of session_set_save_handler() just yet, since doing so would mean that everyone using sessions has to use a new function... Instead, I opted for aliasing it to the new session_set_handler() function (I'm not fond of the "_object" postfix, because I regard it unnecessary as it operates on SessionHandlerInterface instances). And we could maybe deprecate session_set_save_handler() altogether in a few years. Then I guess we should just pack up and go home, because right now PHP > doesn't even have an official static analyser, let alone a mandatory one; > and the evolution of Hack shows just how much the language would need to > change for such a tool to guarantee full coverage. > I'm not 100% sure an official static analyser would be needed. I think it's already a good situation to have very well usable and maintained userland implementations, which we do have. After all, we neither bundle Composer or PHPUnit. To expand on my previous statement in my other main: I don't say that everyone uses static analysers.... I know many people don't... My message would have rather been that bugs don't cost enough for these projects if they don't have to actively prevent the introduction of bugs via static analysis. I have realized in the meanwhile though that there may be many other reasons why someone doesn't use these tools, so I think this argument of mine is invalidated. I think Claude is taking the same premise, and reaching a different > conclusion: returning true is consistent with the other methods on the > class, and that consistency makes it more predictable and more accessible= . > However, as George highlighted (I also tried, but most probably I couldn't convey my message), declaring true return types is an intermediary step before changing them to void. So replacing the old IntlCalendar methods having "incorrect" return types with new ones having the "correct" return types is a very nice by-product of this RFC, since we (and users) don't have to deal with the return type migration separately at a later point of time. I still think that the benefit of immediately using void for the new methods outweighs the risks. Regards: M=C3=A1t=C3=A9 --000000000000b9aa8005fdc179ba--