Re: [RFC] [Vote] Deprecate functions with overloaded signatures
| From: | Aleksander Machniak | Date: | Tue, 27 Jun 2023 05:44:23 +0000 |
| Subject: | Re: [RFC] [Vote] Deprecate functions with overloaded signatures | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120689@lists.php.net to get a copy of this message | ||
On 26.06.2023 20:22, Ben Ramsey wrote:
I voted “no” onI also voted No on IntlCalendar and IntlGregorianCalendar changes. The proposed solution is not good enough. IntlGregorianCalendar has already a static fromDateTime() method inherited from IntlCalendar, so a new method is not needed, imo. Also, setTime() method already exists (not the best name), so addition of setDate() and setDateTime() will make it worse. -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.comIntlCalendar::set()because it seems to me thatsetDate()andsetDateTime()could share the same signature if$hour,$minute, and$secondall default to zero, like this:public function setDate(int $year, int $month, int $dayOfMonth, int $hour = 0, int $minute = 0, int $second = 0): void {}In the same way, withIntlGregorianCalendar::__construct(),createFromDate()andcreateFromDateTime()could be combined as:public static function createFromDate(int $year, int $month, int $dayOfMonth, int $hour = 0, int $minute = 0, int $second = 0): void {}