Skip to content

Commit

Permalink
Merge 3.x into 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Dec 17, 2021
2 parents f8cae97 + d28274c commit 9183910
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 241 deletions.
5 changes: 5 additions & 0 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
UPGRADE FROM 2.x to 3.0
=======================

## Removed `Sonata\TranslationBundle\EventSubscriber\UserLocaleSubscriber`

In case you need to set the locale based on the user's preferences, you MUST implement your own event
listener, for that you can follow https://symfony.com/index.php/doc/4.4/session/locale_sticky_session.html#setting-the-locale-based-on-the-user-s-preferences

## Dropped support for PHPCR

This bundle no longer supports `doctrine/phpcr-odm`, the implementation was based on having installed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"symfony/config": "^4.4 || ^5.3 || ^6.0",
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
"symfony/form": "^4.4 || ^5.3 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
"symfony/http-foundation": "^4.4 || ^5.3 || ^6.0",
"symfony/http-kernel": "^4.4 || ^5.3 || ^6.0",
"symfony/intl": "^4.4 || ^5.3 || ^6.0",
Expand Down Expand Up @@ -53,7 +54,6 @@
"sonata-project/doctrine-orm-admin-bundle": "^4.0",
"symfony/browser-kit": "^4.4 || ^5.3 || ^6.0",
"symfony/css-selector": "^4.4 || ^5.3 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",
"symfony/phpunit-bridge": "^5.3 || ^6.0",
"vimeo/psalm": "^4.3.2",
"weirdan/doctrine-psalm-plugin": "^2.0"
Expand Down
48 changes: 0 additions & 48 deletions src/EventSubscriber/UserLocaleSubscriber.php

This file was deleted.

6 changes: 1 addition & 5 deletions src/Resources/config/service_locale_switcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/

use Sonata\TranslationBundle\EventSubscriber\LocaleSubscriber;
use Sonata\TranslationBundle\EventSubscriber\UserLocaleSubscriber;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
Expand All @@ -24,8 +23,5 @@
->tag('kernel.event_subscriber')
->args([
'%kernel.default_locale%',
])

->set('sonata_translation.locale_switcher.user_locale_subscriber', UserLocaleSubscriber::class)
->tag('kernel.event_subscriber');
]);
};
37 changes: 0 additions & 37 deletions tests/EventSubscriber/LocalizedUser.php

This file was deleted.

51 changes: 0 additions & 51 deletions tests/EventSubscriber/User.php

This file was deleted.

99 changes: 0 additions & 99 deletions tests/EventSubscriber/UserLocaleSubscriberTest.php

This file was deleted.

0 comments on commit 9183910

Please sign in to comment.