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

Fix DateTimeInterface type-hinting #3052

Merged
merged 2 commits into from
Sep 6, 2019
Merged

Fix DateTimeInterface type-hinting #3052

merged 2 commits into from
Sep 6, 2019

Conversation

bpolaszek
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #3047
License MIT

Make use of is_a() instead of is_subclass_of() for DateTime objects, allowing to type-hint DateTimeInterface properties.

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test?

@bpolaszek bpolaszek changed the title Fix #3047 Fix DateTimeInterface type-hinting Sep 5, 2019
@bpolaszek
Copy link
Contributor Author

It looks like the whole class is currently untested, isn't it?

@bpolaszek
Copy link
Contributor Author

My bad, I was looking in tests/Documentation. Gotta get a new brain 😅

@teohhanhui teohhanhui merged commit e3ea015 into api-platform:2.4 Sep 6, 2019
@teohhanhui
Copy link
Contributor

Thanks @bpolaszek! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants