diff --git a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php index ee438d536..bafacd49e 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SettingsTestCase.php @@ -132,19 +132,13 @@ protected function tearDown(): void { */ protected function setEnvVars(array $vars): void { // Unset the existing environment variable if not set in the test. - if (!isset($vars['TMP'])) { - $vars['TMP'] = NULL; - } + $vars['TMP'] ??= NULL; // Unset the existing environment variable if not set in the test. - if (!isset($vars['DRUPAL_CONFIG_PATH'])) { - $vars['DRUPAL_CONFIG_PATH'] = NULL; - } + $vars['DRUPAL_CONFIG_PATH'] ??= NULL; // Do not enforce the CI environment unless it is explicitly set. - if (!isset($vars['CI'])) { - $vars['CI'] = FALSE; - } + $vars['CI'] ??= FALSE; // Filtered real vars without a value to unset them in the lines below. $vars_real = self::getRealEnvVarsFilteredNoValues(static::ALLOWED_ENV_VARS); diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php index e4dea1a63..7823a4cb7 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/SettingsTestCase.php @@ -1,4 +1,4 @@ -@@ -193,7 +193,7 @@ +@@ -187,7 +187,7 @@ * Require settings file. */ protected function requireSettingsFile(array $pre_settings = [], array $pre_config = []): void { diff --git a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php index e4dea1a63..7823a4cb7 100644 --- a/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php +++ b/.vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/SettingsTestCase.php @@ -1,4 +1,4 @@ -@@ -193,7 +193,7 @@ +@@ -187,7 +187,7 @@ * Require settings file. */ protected function requireSettingsFile(array $pre_settings = [], array $pre_config = []): void { diff --git a/composer.json b/composer.json index 3c42f9737..2d41023e8 100644 --- a/composer.json +++ b/composer.json @@ -56,12 +56,12 @@ "phpcompatibility/php-compatibility": "^10.0@alpha", "phpspec/prophecy-phpunit": "^2.5", "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^2.2.8", + "phpstan/phpstan": "^2.2.10", "phpunit/phpunit": "^11.5.56", "pyrech/composer-changelogs": "^2.2", - "rector/rector": "^2.6.3", + "rector/rector": "^2.6.4", "softcreatr/jsonpath": "^0.10 || ^1.0", - "vincentlanglet/twig-cs-fixer": "^4.0.2" + "vincentlanglet/twig-cs-fixer": "^4.1.0" }, "conflict": { "drupal/drupal": "*" diff --git a/tests/phpunit/Drupal/SettingsTestCase.php b/tests/phpunit/Drupal/SettingsTestCase.php index dabf01d3c..4e4bfedd2 100644 --- a/tests/phpunit/Drupal/SettingsTestCase.php +++ b/tests/phpunit/Drupal/SettingsTestCase.php @@ -135,19 +135,13 @@ protected function tearDown(): void { */ protected function setEnvVars(array $vars): void { // Unset the existing environment variable if not set in the test. - if (!isset($vars['TMP'])) { - $vars['TMP'] = NULL; - } + $vars['TMP'] ??= NULL; // Unset the existing environment variable if not set in the test. - if (!isset($vars['DRUPAL_CONFIG_PATH'])) { - $vars['DRUPAL_CONFIG_PATH'] = NULL; - } + $vars['DRUPAL_CONFIG_PATH'] ??= NULL; // Do not enforce the CI environment unless it is explicitly set. - if (!isset($vars['CI'])) { - $vars['CI'] = FALSE; - } + $vars['CI'] ??= FALSE; // Filtered real vars without a value to unset them in the lines below. $vars_real = self::getRealEnvVarsFilteredNoValues(static::ALLOWED_ENV_VARS);