Commit 66cbcf2f authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3274892 by phenaproxima, tedbow: Before applying the update, check that...

Issue #3274892 by phenaproxima, tedbow: Before applying the update, check that any needed changes to the site directory are possible
parent eb064d8c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -125,3 +125,9 @@ services:
    class: Drupal\automatic_updates\EventSubscriber\ConfigSubscriber
    tags:
      - { name: event_subscriber }
  automatic_updates.validator.scaffold_file_permissions:
    class: Drupal\automatic_updates\Validator\ScaffoldFilePermissionsValidator
    arguments:
      - '@package_manager.path_locator'
    tags:
      - { name: event_subscriber }
+6 −1
Original line number Diff line number Diff line
@@ -9,7 +9,12 @@
        },
        {
            "name": "drupal/core",
            "version": "9.8.0"
            "version": "9.8.0",
            "extra": {
                "drupal-scaffold": {
                    "file-mapping": {}
                }
            }
        },
        {
            "name": "drupal/my_module",
+5 −0
Original line number Diff line number Diff line
@@ -135,6 +135,11 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
   * @dataProvider providerSuccessfulUpdate
   */
  public function testSuccessfulUpdate(bool $maintenance_mode_on, string $project_name, string $installed_version, string $target_version): void {
    // Disable the scaffold file permissions validator because it will try to
    // read composer.json from the staging area, which won't exist because
    // Package Manager is bypassed.
    $this->disableValidators(['automatic_updates.validator.scaffold_file_permissions']);

    $this->updateProject = $project_name;
    $this->setReleaseMetadata(__DIR__ . '/../../../../tests/fixtures/release-history/drupal.9.8.2.xml');
    $this->setReleaseMetadata(__DIR__ . "/../../fixtures/release-history/$project_name.1.1.xml");
+2 −0
Original line number Diff line number Diff line
# This file should be staged because it's scaffolded into place by Drupal core.
services: {}
+6 −0
Original line number Diff line number Diff line
<?php

/**
 * @file
 * This file should be staged because it's scaffolded into place by Drupal core.
 */
Loading