Skip to content
Snippets Groups Projects
Commit c83c648d authored by Ted Bowman's avatar Ted Bowman Committed by Adam G-H
Browse files

Issue #3368741 by tedbow: Drush build test symlinks Drush, and does not...

Issue #3368741 by tedbow: Drush build test symlinks Drush, and does not install any of its dependencies
parent 8db8ae3a
No related branches found
No related tags found
2 merge requests!989Issue #3356804 by phenaproxima: Flag a warning during status check if the...,!925Issue #3368741: Drush build test symlinks drush and only passes because it loads classes not in build test project
......@@ -279,6 +279,9 @@ END;
$this->runComposer('composer require --no-update drupal/core-vendor-hardening:*', $template_dir);
}
// Do not run development Composer plugin.
$this->runComposer("composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer false", $template_dir);
// Create the test project, defining its repository as part of the
// `composer create-project` command.
$repository = [
......@@ -437,12 +440,21 @@ END;
],
'autoload' => $package_info['autoload'] ?? [],
];
if (isset($package_info['require'])) {
unset(
$package_info['require']['symfony/polyfill-php72'],
$package_info['require']['symfony/polyfill-php73'],
$package_info['require']['symfony/polyfill-php74'],
$package_info['require']['symfony/polyfill-php80'],
$package_info['require']['symfony/polyfill-php81'],
);
$packages[$name][$version]['require'] = $package_info['require'];
}
// Composer plugins are loaded and activated as early as possible, and
// they must have a `class` key defined in their `extra` section, along
// with a dependency on `composer-plugin-api` (plus any other real
// runtime dependencies).
if ($packages[$name][$version]['type'] === 'composer-plugin') {
$packages[$name][$version]['require'] = $package_info['require'] ?? [];
$packages[$name][$version]['extra'] = $package_info['extra'] ?? [];
}
}
......
......@@ -402,7 +402,8 @@ class CoreUpdateTest extends UpdateTestBase {
public function testDrushUpdate(): void {
$this->createTestProject('RecommendedProject');
$this->runComposer('composer require drush/drush', 'project');
$output = $this->runComposer('COMPOSER_MIRROR_PATH_REPOS=1 composer require drush/drush', 'project');
$this->assertStringNotContainsString('Symlinking', $output);
$dir = $this->getWorkspaceDirectory() . '/project';
$command = [
......
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