-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] Fix DateTime format on the Doctrine transport #32640
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
[Messenger] Fix DateTime format on the Doctrine transport #32640
Conversation
@@ -329,9 +329,9 @@ private function getSchema(): Schema | |||
return $schema; | |||
} | |||
|
|||
public static function formatDateTime(\DateTimeInterface $dateTime) | |||
public function formatDateTime(\DateTimeInterface $dateTime): string |
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.
looks like this should should be marked as internal
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.
why is this public at all? it should not be public just for the tests.
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.
also we should not do this kind of bc break in a patch release
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.
How can I avoid the BC break ? leaving the function as it is and create a new one that is private ? 🤔
For the tests you're right. I'll change 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.
it's experimental, we can break BC here imho
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.
in a patch release?
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.
yes, the earlier the better to me :)
/** | ||
* @internal | ||
*/ | ||
public function formatDateTime(\DateTimeInterface $dateTime) |
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.
Does it need to be public? I didn’t spot the usage.
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.
This is only use in the Connection
class so we can make it private
.
There is a discussion with @Tobion and @nicolas-grekas about the fact that this would introduce a bc break.
IMHO this component is still marked as experimental so we can introduce this bc break. (there were some breaks with the 4.2 -> 4.3 update)
c3324d7
to
d003805
Compare
d003805
to
f3ba03b
Compare
Duplicate of #32456 which seems to solve it better using dbal types. |
Let's close in favor of #32456 then. |
This fixes the #32427
ping @weaverryan