Skip to content
Snippets Groups Projects
Commit 390a2f5c authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3301844 by phenaproxima, tedbow, TravisCarden: DEVELOPING.md...

Issue #3301844 by phenaproxima, tedbow, TravisCarden: DEVELOPING.md instructions do not work for running build test
parent 1abfe54b
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,6 @@ For development and running the module's tests, Automatic Updates assumes you ar ...@@ -11,7 +11,6 @@ For development and running the module's tests, Automatic Updates assumes you ar
``` ```
git clone https://git.drupalcode.org/project/drupal.git --branch 9.5.x auto-updates-dev git clone https://git.drupalcode.org/project/drupal.git --branch 9.5.x auto-updates-dev
cd auto-updates-dev cd auto-updates-dev
composer config platform.php 7.4.0
composer install composer install
``` ```
Replace `9.5.x` with the desired development branch of Drupal core. Be sure to point your web server to the `auto-updates-dev` directory, so you can access this code base in a browser. Replace `9.5.x` with the desired development branch of Drupal core. Be sure to point your web server to the `auto-updates-dev` directory, so you can access this code base in a browser.
...@@ -25,7 +24,7 @@ git clone --branch '8.x-2.x' https://git.drupalcode.org/project/automatic_update ...@@ -25,7 +24,7 @@ git clone --branch '8.x-2.x' https://git.drupalcode.org/project/automatic_update
### Step 3: Install dependencies ### Step 3: Install dependencies
From the Drupal repository root: From the Drupal repository root:
``` ```
composer require php-tuf/composer-stager "symfony/config:^4.4 || ^6.1" composer require php-tuf/composer-stager "symfony/config:^4.4 || ^6.1" --ignore-platform-req php
git reset --hard git reset --hard
``` ```
Note: If you switch to a different branch of Drupal core and delete the `vendor` directory, you will need to do this step again after running `composer install`. Note: If you switch to a different branch of Drupal core and delete the `vendor` directory, you will need to do this step again after running `composer install`.
...@@ -237,7 +237,7 @@ END; ...@@ -237,7 +237,7 @@ END;
$packages = []; $packages = [];
$drupal_root = $this->getDrupalRoot(); $drupal_root = $this->getDrupalRoot();
foreach ($this->getPackagesFromLockFile() as $package) { foreach ($this->getInstalledPackages() as $package) {
$name = $package['name']; $name = $package['name'];
$path = "$drupal_root/vendor/$name"; $path = "$drupal_root/vendor/$name";
...@@ -273,23 +273,19 @@ END; ...@@ -273,23 +273,19 @@ END;
} }
/** /**
* Returns all package information from the lock file. * Returns all package information from the `installed.json` file.
* *
* @return mixed[][] * @return mixed[][]
* All package data from the lock file. * All package data from the `installed.json` file.
*/ */
private function getPackagesFromLockFile(): array { private function getInstalledPackages(): array {
$lock = $this->getDrupalRoot() . '/composer.lock'; $installed = $this->getDrupalRoot() . '/vendor/composer/installed.json';
$this->assertFileExists($lock); $this->assertFileExists($installed);
$lock = file_get_contents($lock); $installed = file_get_contents($installed);
$lock = json_decode($lock, TRUE, JSON_THROW_ON_ERROR); $installed = json_decode($installed, TRUE, JSON_THROW_ON_ERROR);
$lock += [ return $installed['packages'];
'packages' => [],
'packages-dev' => [],
];
return array_merge($lock['packages'], $lock['packages-dev']);
} }
/** /**
......
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