Repository navigation
Singular DateTime::[get|set]Microsecond & no tentative return type - #13486
Conversation
Ayesh
left a comment
There was a problem hiding this comment.
I think you forgot to run php build/gen_stub.php, so the tests will eventually fail.
As for the method renaming, I'm personally against using microsecond. JS also follows the plural naming pattern (Date.setMilliseconds, Date.setHours, etc). We don't have DateTime::setHour method in the first place, so there is no inconsistency.
|
@Ayesh This is about one part of the date/time. As that it's about one single microsecond part and does not get/set multiple microseconds. About JS |
|
IMO ext/date is already inconsistent with the naming: on one hand, there is already a BTW: the tentative return type related parts are fine, and thanks for dealing with this! |
Where is |
Oh... I guess I mixed it up with |
|
After my other merge, this has now a conflict in the generated stub. Can you fix that? I'll then merge this. |
a9e4c26 to
4898a5f
Compare
@derickr done rebased |
4898a5f to
8b965ef
Compare
|
@derickr @kocsismate Now added |
…nd() (xabbuh) This PR was merged into the 7.1 branch. Discussion ---------- [Clock] rename get/setMicroseconds() to get/setMicrosecond() | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT follows php/php-src#13486 Commits ------- ff06ba4 rename get/setMicroseconds() to get/setMicrosecond()
Renamed
DateTime[Immutable]::[get|set]Microseconds()toDateTime[Immutable]::[get|set]Microsecond()[get|set]Hourand not hoursRemoved tentative return type as noted here #12557 (comment)
Added
getMicrosecondtoDateTimeInterfaceas discussed in #13491As this hasn't been added to any stable/beta branch it's not a BC break.