Skip to content
Snippets Groups Projects
Unverified Commit 849a6872 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3517070 by bbrala: Remove system.file.path config from system.schema.yml

parent 480738f3
No related branches found
No related tags found
No related merge requests found
Pipeline #465314 passed with warnings
Pipeline: drupal

#465324

    Pipeline: drupal

    #465321

      ......@@ -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'
      ......
      ......@@ -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();
      }
      }
      <?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'));
      }
      }
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment