Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120197 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12337 invoked from network); 5 May 2023 16:12:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 May 2023 16:12:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CB5B61804DF for ; Fri, 5 May 2023 09:12:49 -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.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 5 May 2023 09:12:49 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 8EA9510C401; Fri, 5 May 2023 17:12:48 +0100 (BST) Date: Fri, 5 May 2023 17:12:48 +0100 (BST) To: =?UTF-8?Q?M=C3=A1t=C3=A9_Kocsis?= cc: PHP Internals List In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1096135276-1683303168=:41807" Subject: Re: [PHP-DEV] [RFC] [Discussion] Deprecate functions with overloaded signatures From: derick@php.net (Derick Rethans) --8323329-1096135276-1683303168=:41807 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 27 Apr 2023, M=C3=A1t=C3=A9 Kocsis wrote: > As you have possibly already experienced, overloaded signatures cause=20 > various smaller and bigger issues, while the concept is not natively=20 > supported by PHP. That's why I drafted an RFC which intends to phase=20 > out the majority of overloaded function/method signatures and also=20 > forbid the introduction of such functions in the future:=20 > https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures I'm going to nitpick on the newly suggested names and argument order for th= e DatePeriod factory methods =E2=80=94 althoughI do agree that they need to g= et created: createFromInterval(DateTimeInterface $start, DateInterval $interval, DateTi= meInterface $end, int $options =3D 0) =E2=86=92 createWithRange(DateTimeInterface $begin, DateTimeInterface $end,= DateTimeInterface $int, int $options =3D 0) createFromRecurrences(DateTimeInterface $start, DateInterval $interval, int= $recurrences, int $options =3D 0) =E2=86=92 createWithRecurrences(DateInterval $begin, int $recurrences, Date= Interval $interval, int $options =3D 0) We also should fix the argument names. Either $start/$finish, or $begin/$en= d. I prefer the latter. createFromIso8601(string $specification, int $options =3D 0) -> createFromISO8601String I am open to bike shedding about this :-) cheers, Derick --8323329-1096135276-1683303168=:41807--