Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Conversation

vincenttouzet
Copy link
Contributor

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

This fixes the #32427

ping @weaverryan

@@ -329,9 +329,9 @@ private function getSchema(): Schema
return $schema;
}

public static function formatDateTime(\DateTimeInterface $dateTime)
public function formatDateTime(\DateTimeInterface $dateTime): string
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

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

in a patch release?

Copy link
Member

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 :)

@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Jul 21, 2019
/**
* @internal
*/
public function formatDateTime(\DateTimeInterface $dateTime)
Copy link
Member

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.

Copy link
Contributor Author

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)

@vincenttouzet vincenttouzet force-pushed the 32427_messenger_dateimte_format branch 2 times, most recently from c3324d7 to d003805 Compare July 24, 2019 06:10
@vincenttouzet vincenttouzet force-pushed the 32427_messenger_dateimte_format branch from d003805 to f3ba03b Compare July 25, 2019 06:01
@Tobion
Copy link
Contributor

Tobion commented Jul 28, 2019

Duplicate of #32456 which seems to solve it better using dbal types.

@fabpot
Copy link
Member

fabpot commented Aug 5, 2019

Let's close in favor of #32456 then.

@fabpot fabpot closed this Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants