// Set the core version.
Composer::
setDrupalVersion($drupal_root,
$tag);
$this->
assertDrupalVersion($tag,
$drupal_root);
// Emulate the release script.
// @see https://github.com/xjm/drupal_core_release/blob/main/tag.sh
$this->
executeCommand("COMPOSER_ROOT_VERSION=\"
$tag\" composer update drupal/core*"
);
$this->
assertCommandSuccessful();
$this->
assertErrorOutputContains('generateComponentPackages'
);
// Find all the components.
$component_finder =
$this->
getComponentPathsFinder($drupal_root);
// Loop through all the component packages.
/** @var \Symfony\Component\Finder\SplFileInfo $composer_json */
foreach ($component_finder->
getIterator() as $composer_json) { $composer_json_data =
json_decode(file_get_contents($composer_json->
getPathname()), TRUE
);
$requires =
array_merge( $composer_json_data['require'
] ??
[],
$composer_json_data['require-dev'
] ??
[] );
// Required packages from drupal/core-* should have our constraint.
foreach ($requires as $package =>
$req_constraint) {