From 80845adc1a22b216b88759fdf3c60a5dc3487f89 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Sun, 27 Feb 2022 23:29:45 +0100 Subject: [PATCH] Avoid deprecations --- composer.json | 4 ++-- src/Resources/config/admin_mongodb.php | 2 +- src/Resources/config/admin_orm.php | 2 +- tests/Security/RolesBuilder/AdminRolesBuilderTest.php | 5 +++-- tests/Security/RolesBuilder/SecurityRolesBuilderTest.php | 5 +++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index 8013801b5..dcbfd5476 100644 --- a/composer.json +++ b/composer.json @@ -64,7 +64,7 @@ "phpunit/phpunit": "^9.5", "psalm/plugin-phpunit": "^0.16", "psalm/plugin-symfony": "^3.0", - "sonata-project/admin-bundle": "^4.8", + "sonata-project/admin-bundle": "^4.9", "sonata-project/block-bundle": "^4.0", "sonata-project/doctrine-orm-admin-bundle": "^4.0", "symfony/browser-kit": "^4.4 || ^5.3 || ^6.0", @@ -74,7 +74,7 @@ "vimeo/psalm": "^4.9.2" }, "conflict": { - "sonata-project/admin-bundle": "<4.8", + "sonata-project/admin-bundle": "<4.9", "sonata-project/block-bundle": "<4.0", "sonata-project/doctrine-orm-admin-bundle": "<4.0" }, diff --git a/src/Resources/config/admin_mongodb.php b/src/Resources/config/admin_mongodb.php index 727092665..474f7ad11 100644 --- a/src/Resources/config/admin_mongodb.php +++ b/src/Resources/config/admin_mongodb.php @@ -25,7 +25,7 @@ 'manager_type' => 'doctrine_mongodb', 'group' => 'sonata_user', 'label' => 'users', - 'label_catalogue' => 'SonataUserBundle', + 'translation_domain' => 'SonataUserBundle', 'label_translator_strategy' => 'sonata.admin.label.strategy.underscore', 'icon' => '', ]) diff --git a/src/Resources/config/admin_orm.php b/src/Resources/config/admin_orm.php index 46d5fa55f..42d211fdb 100644 --- a/src/Resources/config/admin_orm.php +++ b/src/Resources/config/admin_orm.php @@ -25,7 +25,7 @@ 'manager_type' => 'orm', 'group' => 'sonata_user', 'label' => 'users', - 'label_catalogue' => 'SonataUserBundle', + 'translation_domain' => 'SonataUserBundle', 'label_translator_strategy' => 'sonata.admin.label.strategy.underscore', 'icon' => '', ]) diff --git a/tests/Security/RolesBuilder/AdminRolesBuilderTest.php b/tests/Security/RolesBuilder/AdminRolesBuilderTest.php index b2a31f906..3387ed0c2 100644 --- a/tests/Security/RolesBuilder/AdminRolesBuilderTest.php +++ b/tests/Security/RolesBuilder/AdminRolesBuilderTest.php @@ -75,9 +75,10 @@ protected function setUp(): void $this->pool = new Pool($container, ['sonata.admin.bar']); $this->configuration = new SonataConfiguration('title', 'logo', [ 'confirm_exit' => true, + 'default_admin_route' => 'show', 'default_group' => 'group', 'default_icon' => 'icon', - 'default_label_catalogue' => 'label_catalogue', + 'default_translation_domain' => 'label_catalogue', 'dropdown_number_groups_per_colums' => 1, 'form_type' => 'horizontal', 'html5_validate' => true, @@ -91,7 +92,7 @@ protected function setUp(): void 'role_admin' => 'ROLE_ADMIN', 'role_super_admin' => 'ROLE_SUPER_ADMIN', 'search' => true, - 'skin' => 'blue', + 'skin' => 'skin-blue', 'sort_admins' => true, 'stylesheets' => [], 'use_bootlint' => true, diff --git a/tests/Security/RolesBuilder/SecurityRolesBuilderTest.php b/tests/Security/RolesBuilder/SecurityRolesBuilderTest.php index a63784285..e788d2ce7 100644 --- a/tests/Security/RolesBuilder/SecurityRolesBuilderTest.php +++ b/tests/Security/RolesBuilder/SecurityRolesBuilderTest.php @@ -47,9 +47,10 @@ protected function setUp(): void $this->authorizationChecker = $this->createMock(AuthorizationCheckerInterface::class); $this->configuration = new SonataConfiguration('title', 'logo', [ 'confirm_exit' => true, + 'default_admin_route' => 'show', 'default_group' => 'group', 'default_icon' => 'icon', - 'default_label_catalogue' => 'label_catalogue', + 'default_translation_domain' => 'label_catalogue', 'dropdown_number_groups_per_colums' => 1, 'form_type' => 'horizontal', 'html5_validate' => true, @@ -63,7 +64,7 @@ protected function setUp(): void 'role_admin' => 'ROLE_SONATA_ADMIN', 'role_super_admin' => 'ROLE_SUPER_ADMIN', 'search' => true, - 'skin' => 'blue', + 'skin' => 'skin-blue', 'sort_admins' => true, 'stylesheets' => [], 'use_bootlint' => true,