Skip to content
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

Change return type of createFromInterface() on DateTime and DateTimeImmutable to static #8102

Merged

Conversation

bitwise-operators
Copy link
Contributor

release:fix: Change return type of createFromInterface() methods on DateTime and DateTimeImmutable to static so extending classes are recognized.

Also fixed a test that was based on the incorrect return type.

Fixes #8096

…ateTime and DateTimeImmutable to 'static' so extending classes are recognized.
@AndrolGenhald AndrolGenhald added the release:fix The PR will be included in 'Fixes' section of the release notes label Jun 13, 2022
@orklah
Copy link
Collaborator

orklah commented Jun 13, 2022

@weirdan Mind looking at this? I vaguely remember there is some mumbo jumbo around DateTime that you warned about some time ago

@bitwise-operators
Copy link
Contributor Author

Just to be clear, I've tested that the static return type is actually correct:

Sandbox example

The reason I came accross this, is because it also messes with the Carbon package, commonly used in Laravel, for example.

@weirdan
Copy link
Collaborator

weirdan commented Jun 13, 2022

LGTM

@orklah orklah merged commit 10ea05a into vimeo:master Jun 13, 2022
@orklah
Copy link
Collaborator

orklah commented Jun 13, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants