Bug #73301 [Opn]: DateTime::setTime breaks backwards compatibility

From: Date: Wed, 12 Oct 2016 12:23:00 +0000
Subject: Bug #73301 [Opn]: DateTime::setTime breaks backwards compatibility
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204632@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73301&edit=1

 ID:                 73301
 Updated by:         nikic@php.net
 Reported by:        sjon at hortensius dot net
 Summary:            DateTime::setTime breaks backwards compatibility
 Status:             Open
 Type:               Bug
 Package:            Date/time related
 PHP Version:        7.1Git-2016-10-12 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

This is not related to the default value (which has not changed). We generally do not allow removing
parameters, even optional ones, from method signatures: https://3v4l.org/i1Btt


Previous Comments:
------------------------------------------------------------------------
[2016-10-12 11:53:11] sjon at hortensius dot net

Description:
------------
DateTime::setTime was changed between RC3 and RC4 in a backward breaking way which seems highly
unwanted.

Warning: Declaration of Custom_DateTime::setTime($hour, $minute, $second = 0) should be compatible
with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL)

This causes applications to break; why was $second=0 not kept as a default?



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=73301&edit=1


Thread (4 messages)

« previous php.bugs (#204632) next »