-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(appframework): ⌚ Make ITimeFactory extend \PSR\Clock\ClockInterface #35872
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.
Given how easy it is to get a mutable object form the immutable one I wouldn't include the helper but I'm okay if we do.
Nice addition to the PSR API family 👍
Might or might not make sense to deprecate |
Same for the getDateTime() I think |
return \DateTime::createFromImmutable($this->now()); | ||
} | ||
|
||
public function withTimeZone(\DateTimeZone $timezone): static { |
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.
: static
is 8.0+ only, but currently linting is still run against 7.4 while we plan to drop it.
Could remove the typing for now, or we keep it and make sure the 7.4 lint job is removed already
589cf70
to
c4e4d91
Compare
c4e4d91
to
2b12b75
Compare
I would love to see this documented at https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/psr.html :) |
Will do, after it's merged |
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.
2b12b75
to
acf0412
Compare
Rebased, now that 7.4 is dropped |
Dang, this slipped through. To preserve stability in OCP, I'm moving it to 27 |
Signed-off-by: Joas Schilling <[email protected]>
acf0412
to
c297f8e
Compare
Docs in #37039 (comment) and nextcloud/documentation#9722 |
* @since 8.0.0 | ||
* @since 26.0.0 Extends the \Psr\Clock\ClockInterface interface |
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.
are you sure about that? ;)
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.
YOu mean extends vs implements?
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'm pretty sure it's correct here, but yeah on the actual implementation the comment could be adjusted
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.
The since 26. I just had Mail integration tests fail because I used now
for 26. It's only there for 27+ :)
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.
Ah, yeah see comment above:
Dang, this slipped through. To preserve stability in OCP, I'm moving it to 27
Sorry about that :(
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.
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.
Fix in #40865
Summary
TODO
Checklist