Loading core/modules/system/config/schema/system.schema.yml +1 −0 Changes for core/modules/system/config/schema/system.schema.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ system.file: path: type: mapping label: 'Path settings' deprecated: "The 'path' config schema is deprecated in drupal:11.2.0 and will be removed from drupal 12.0.0. Use 'file_temp_path' key in settings.php instead. See https://www.drupal.org/node/3039255." temporary_maximum_age: type: integer label: 'Maximum age for temporary files' Loading core/modules/system/system.post_update.php +11 −0 Changes for core/modules/system/system.post_update.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -92,3 +92,14 @@ function system_post_update_sdc_uninstall(): void { function system_post_update_remove_rss_cdata_subscriber(): void { // Empty update to trigger container rebuild. } /** * Remove path key in system.file. */ function system_post_update_remove_path_key(): void { if (\Drupal::config('system.file')->get('path') !== NULL) { \Drupal::configFactory()->getEditable('system.file') ->clear('path') ->save(); } } core/modules/system/tests/src/Functional/Update/RemovePathKeyTest.php 0 → 100644 +34 −0 Changes for core/modules/system/tests/src/Functional/Update/RemovePathKeyTest.php: 34 added lines, 0 removed lines. Original line number Diff line number Diff line <?php declare(strict_types=1); namespace Drupal\Tests\system\Functional\Update; use Drupal\FunctionalTests\Update\UpdatePathTestBase; /** * Tests the upgrade path for the system.file schema update. * * @group Update */ class RemovePathKeyTest extends UpdatePathTestBase { /** * {@inheritdoc} */ protected function setDatabaseDumpFiles(): void { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz', ]; } /** * Tests the upgrade path for removing system.file.path key. */ public function testRunUpdates(): void { $this->assertIsArray(\Drupal::config('system.file')->get('path')); $this->runUpdates(); $this->assertNull(\Drupal::config('system.file')->get('path')); } } Loading
core/modules/system/config/schema/system.schema.yml +1 −0 Changes for core/modules/system/config/schema/system.schema.yml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -344,6 +344,7 @@ system.file: path: type: mapping label: 'Path settings' deprecated: "The 'path' config schema is deprecated in drupal:11.2.0 and will be removed from drupal 12.0.0. Use 'file_temp_path' key in settings.php instead. See https://www.drupal.org/node/3039255." temporary_maximum_age: type: integer label: 'Maximum age for temporary files' Loading
core/modules/system/system.post_update.php +11 −0 Changes for core/modules/system/system.post_update.php: 11 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -92,3 +92,14 @@ function system_post_update_sdc_uninstall(): void { function system_post_update_remove_rss_cdata_subscriber(): void { // Empty update to trigger container rebuild. } /** * Remove path key in system.file. */ function system_post_update_remove_path_key(): void { if (\Drupal::config('system.file')->get('path') !== NULL) { \Drupal::configFactory()->getEditable('system.file') ->clear('path') ->save(); } }
core/modules/system/tests/src/Functional/Update/RemovePathKeyTest.php 0 → 100644 +34 −0 Changes for core/modules/system/tests/src/Functional/Update/RemovePathKeyTest.php: 34 added lines, 0 removed lines. Original line number Diff line number Diff line <?php declare(strict_types=1); namespace Drupal\Tests\system\Functional\Update; use Drupal\FunctionalTests\Update\UpdatePathTestBase; /** * Tests the upgrade path for the system.file schema update. * * @group Update */ class RemovePathKeyTest extends UpdatePathTestBase { /** * {@inheritdoc} */ protected function setDatabaseDumpFiles(): void { $this->databaseDumpFiles = [ __DIR__ . '/../../../../../system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz', ]; } /** * Tests the upgrade path for removing system.file.path key. */ public function testRunUpdates(): void { $this->assertIsArray(\Drupal::config('system.file')->get('path')); $this->runUpdates(); $this->assertNull(\Drupal::config('system.file')->get('path')); } }