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 TimezoneAwareInterface #300

Merged
merged 1 commit into from
May 31, 2020

Conversation

phansys
Copy link
Member

@phansys phansys commented May 28, 2020

Subject

Add TimezoneAwareInterface in order to be implemented by classes used with UserBasedTimezoneDetector.

I am targeting this branch, because this change respects BC.

Related to sonata-project/SonataAdminBundle#5973 (comment).

Changelog

### Added
- Added `TimezoneAwareInterface` interface and `TimezoneAwareTrait` trait.

### Deprecated
- Deprecated timezone inference based on `Sonata\UserBundle\Model\User::getTimezone()`.

## Removed
- Removed dependency suggestion against "sonata-project/user-bundle".

To do

  • Add tests.

@phansys phansys added the minor label May 28, 2020
core23
core23 previously approved these changes May 28, 2020
@phansys phansys force-pushed the timezone_aware_interface branch 2 times, most recently from e908a4e to b8df273 Compare May 29, 2020 05:03
@phansys phansys marked this pull request as ready for review May 29, 2020 05:06
@phansys phansys requested a review from a team May 29, 2020 05:06
core23
core23 previously approved these changes May 29, 2020
@VincentLanglet
Copy link
Member

Should we stop deprecating this bundle then ? @greg0ire @phansys ?

image

@greg0ire
Copy link
Contributor

I don't know, you tell me!

@phansys
Copy link
Member Author

phansys commented May 29, 2020

Should we stop deprecating this bundle then ? @greg0ire @phansys ?

IMO, we must stop the deprecation in this bundle, since it provides useful features that haven't a direct replacement provided by other packages.

@phansys phansys requested review from greg0ire and core23 May 29, 2020 10:48
@greg0ire
Copy link
Contributor

Ok, done!

phpstan.neon.dist Outdated Show resolved Hide resolved
phpstan.neon.dist Outdated Show resolved Hide resolved
greg0ire
greg0ire previously approved these changes May 29, 2020
core23
core23 previously approved these changes May 29, 2020
@phansys phansys dismissed stale reviews from core23 and greg0ire via 0149a41 May 29, 2020 23:27
@phansys phansys force-pushed the timezone_aware_interface branch 2 times, most recently from 7f95e43 to f2738f1 Compare May 29, 2020 23:37
@phansys phansys requested a review from core23 May 29, 2020 23:46
@phansys
Copy link
Member Author

phansys commented May 30, 2020

I've deprecated the timezone inference based on Sonata\UserBundle\Model\User::getTimezone().

@phansys phansys force-pushed the timezone_aware_interface branch 2 times, most recently from d41046a to 0f831ec Compare May 30, 2020 01:04
VincentLanglet
VincentLanglet previously approved these changes May 30, 2020
core23
core23 previously approved these changes May 30, 2020
@phansys
Copy link
Member Author

phansys commented May 30, 2020

Updated UPGRADE-2.x.md document.

VincentLanglet
VincentLanglet previously approved these changes May 30, 2020
@phansys phansys merged commit 06d663b into sonata-project:2.x May 31, 2020
@phansys phansys deleted the timezone_aware_interface branch May 31, 2020 13:47
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

5 participants