Issue #3443049 by nicxvan, Arun.k: Remove deprecations in SiteConfigureForm

merge-requests/7666/merge
Dave Long 2024-04-24 16:04:53 +01:00
parent 38d7246949
commit a879c61681
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
1 changed files with 2 additions and 20 deletions

View File

@ -3,11 +3,9 @@
namespace Drupal\Core\Installer\Form;
use Drupal\Core\Datetime\TimeZoneFormHelper;
use Drupal\Core\DependencyInjection\DeprecatedServicePropertyTrait;
use Drupal\Core\Extension\ModuleInstallerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Locale\CountryManagerInterface;
use Drupal\Core\Site\Settings;
use Drupal\user\UserInterface;
use Drupal\user\UserStorageInterface;
@ -21,17 +19,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/
class SiteConfigureForm extends ConfigFormBase {
use DeprecatedServicePropertyTrait;
/**
* Defines deprecated injected properties.
*
* @var array
*/
protected array $deprecatedProperties = [
'countryManager' => 'country_manager',
];
/**
* The site path.
*
@ -71,7 +58,7 @@ class SiteConfigureForm extends ConfigFormBase {
* The user storage.
* @param \Drupal\Core\Extension\ModuleInstallerInterface $module_installer
* The module installer.
* @param \Drupal\Core\Locale\CountryManagerInterface|\Drupal\user\UserNameValidator $userNameValidator
* @param \Drupal\user\UserNameValidator $userNameValidator
* The user validator.
*/
public function __construct(
@ -79,17 +66,12 @@ class SiteConfigureForm extends ConfigFormBase {
$site_path,
UserStorageInterface $user_storage,
ModuleInstallerInterface $module_installer,
protected CountryManagerInterface|UserNameValidator $userNameValidator,
protected UserNameValidator $userNameValidator,
) {
$this->root = $root;
$this->sitePath = $site_path;
$this->userStorage = $user_storage;
$this->moduleInstaller = $module_installer;
if ($userNameValidator instanceof CountryManagerInterface) {
@trigger_error('Calling ' . __METHOD__ . '() with the $userNameValidator argument as CountryManagerInterface is deprecated in drupal:10.3.0 and must be UserNameValidator in drupal:11.0.0. See https://www.drupal.org/node/3431205', E_USER_DEPRECATED);
$userNameValidator = \Drupal::service('user.name_validator');
}
$this->userNameValidator = $userNameValidator;
}
/**