-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Singular DateTime::[get|set]Microsecond & no tentative return type #13486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care about the naming but maybe @derickr has opinions?
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]Hour
and not hoursRemoved tentative return type as noted here #12557 (comment)
Added
getMicrosecond
toDateTimeInterface
as discussed in #13491As this hasn't been added to any stable/beta branch it's not a BC break.