Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120442 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82828 invoked from network); 29 May 2023 23:41:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 May 2023 23:41:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6E8B51804D7 for ; Mon, 29 May 2023 16:41:48 -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-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) (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 ; Mon, 29 May 2023 16:41:47 -0700 (PDT) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-199dd37f0e4so3157315fac.2 for ; Mon, 29 May 2023 16:41:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685403707; x=1687995707; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=fj8412IZcuNArXhO0HLqY9eAsS3J+B+9jemB0E1QVFo=; b=P+U7THpKcuYtvvco/VvpgmZuqlNTExRDRsuVZRVZmHw7MEtbP+L+iELi82kAU6plmF VboSa9j4ziafmVG8AbPS3J5FXIStTwx8MwKhGXahFJ8V/iaV0lPpiJ+vVhiEHzcDYSB/ Er/43vpGOXROKl19d9jOFHxEQU6NX5fA5asLIyi+yzKmbUcFE3Cac4tgYWZ3tBX/WDv4 E/UL1VUx/9WkAU5BNpakai0VVyBp+oznbLKRpZwQzWcDsrPVU/BUL8tU73dsUXu2iUwN nqNguW/76Ea6ulNNmuk88/6W3cT8mm6ofHp9BaSDG9K68J9lBP/tiCKeJVi4LHjmi7oD mizQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685403707; x=1687995707; 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=fj8412IZcuNArXhO0HLqY9eAsS3J+B+9jemB0E1QVFo=; b=VS1wnX0vQwuUbHypYw90wlw/JuwrB8Co23kXgvQaBaHHWl7C3eAXn2ki20T7N4aVRp 6v9RC0UsTnpASSOSbvQQFfvoT7lkZqOZgbUjAF8wHYRYZBI97xHeVKaJxLoSfjYVOqur lHUpj+HfWM1B3Zx77enFnKAq0hdLTD46hTE7kuXyHFKOvhSRZndwYxsRimMvKXIuCwQC ookSpv4RsjCBqqdKZPOQjncKUclurNVT3DGubsFKhQXQBiti557WdRbLLWE8BXwlEKh8 vsEmCiFcCzMDhwHOyOO89heN4mj7ze5iSz1Ndttk94s2FXbrne8Y7jnXLVY1lwrd9YCW zO2A== X-Gm-Message-State: AC+VfDwSEE5V8l30HxsQBxikScbESwPHF7At6XgCGGrmkPWvHbew/tos lE4ITH+0iCIzXkdf1iGjz/lj6q7a16q97nhnDjc= X-Google-Smtp-Source: ACHHUZ6K3OCSDnKqRGsRB9nbRyedOJUw9tauAaWXdebEHzrejBD1Tduqb/MzrG+EMxV1UvMkvUn2i/c8s9srD8iH/Nw= X-Received: by 2002:a05:6870:347:b0:19e:74e4:9c73 with SMTP id n7-20020a056870034700b0019e74e49c73mr218257oaf.0.1685403706848; Mon, 29 May 2023 16:41:46 -0700 (PDT) MIME-Version: 1.0 References: <5798AD17-3FA6-48E5-83E9-B5773BE94598@gmail.com> In-Reply-To: <5798AD17-3FA6-48E5-83E9-B5773BE94598@gmail.com> Date: Tue, 30 May 2023 01:41:35 +0200 Message-ID: To: Claude Pache Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000003ff99005fcdda133" Subject: Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --0000000000003ff99005fcdda133 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Claude, The replacement methods for IntlCalendar::set() (namely > IntlCalendar::setDate() and IntlCalendar::setDateTime()) must not have a > return type of `void`, but `true`, like the original method, for the two > following reasons: > > 1. By changing the returned value, you are introducing an unnecessary > hazard when migrating code. > > 2. Per https://www.php.net/IntlCalendar, all modification methods of that > class (clear(), roll(), setTime(), etc.) consistently return `true` on > success and `false` on failure, even when the method is infallible (and > thus would always return `true`). Don=E2=80=99t break consistency. > 1. I don't see much risk with this change, since we clearly indicate at the very beginning that the new methods return void, so programmers migrating their code should pay attention to the return types. IDEs and static analysers can surely warn them in case of inattention. 2. Some of the methods you mentioned have a "true" return type for a few weeks now. The biggest motivation for introducing these was to at least have some chance to make them void in the future. Doing so is a risky move indeed, so should be carried out very carefully, if it's possible at all... That's why I consider it beneficial to spare the effort and start with a clean slate by adding the new methods in question with their correct return type. Regards, M=C3=A1t=C3=A9 --0000000000003ff99005fcdda133--