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

Add support for PSR clock #536

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

X-Coder264
Copy link
Contributor

@X-Coder264 X-Coder264 commented Feb 8, 2023

Subject

I am targeting this branch, because it adds a new feature without a BC-break.

Changelog

### Added
- Support for PSR ClockInterface

'username' => $this->config->getCurrentUsername(),
],
[
Types::DATETIME_MUTABLE,
Types::DATETIME_IMMUTABLE,
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this change a BC-break ? I dunno what it imply.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a BC break. The query either executes or it doesn't (it obviously executes fine as all the tests are passing).

All the types do is tell DBAL which \Doctrine\DBAL\Types\Type child class to use to get the value to bind to the query, more specifically in this case whether to call \Doctrine\DBAL\Types\DateTimeType::convertToDatabaseValue or \Doctrine\DBAL\Types\DateImmutableType::convertToDatabaseValue.

tests/BaseTest.php Outdated Show resolved Hide resolved
@VincentLanglet VincentLanglet merged commit 29eb4e6 into sonata-project:1.x Feb 13, 2023
@VincentLanglet
Copy link
Member

Thanks

@X-Coder264 X-Coder264 deleted the add-clock-support branch February 13, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants