Skip to content
Snippets Groups Projects

Issue #3230507: Create build tests for case where site is using core recommended Composer project

Merged Issue #3230507: Create build tests for case where site is using core recommended Composer project
1 unresolved thread
1 unresolved thread
Compare and
7 files
+ 294
69
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -9,6 +9,17 @@ class PreStartEvent extends UpdateEvent {
use ExcludedPathsTrait;
/**
* The name of the Drupal core package in the project-level composer.json.
*
* Will be either 'drupal/core' or 'drupal/core-recommended'.
*
* @see \Drupal\automatic_updates\Updater::getCorePackageName()
*
* @var string
*/
protected $corePackageName;
/**
* The desired package versions to update to, keyed by package name.
*
@@ -19,14 +30,30 @@ class PreStartEvent extends UpdateEvent {
/**
* Constructs a PreStartEvent.
*
* @param string $core_package_name
* The name of the Drupal core package in the project-level composer.json.
* @param string[] $package_versions
* (optional) The desired package versions to update to, keyed by package
* name.
*/
public function __construct(array $package_versions = []) {
public function __construct(string $core_package_name, array $package_versions = []) {
$this->corePackageName = $core_package_name;
$this->packageVersions = $package_versions;
}
/**
* Returns the name of the Drupal core package in the project's composer.json.
*
* @return string
* The name of the Drupal core package in the project-level composer.json.
* Will be either 'drupal/core' or 'drupal/core-recommended'.
*
* @see \Drupal\automatic_updates\Updater::getCorePackageName()
*/
public function getCorePackageName(): string {
return $this->corePackageName;
}
/**
* Returns the desired package versions to update to.
*
Loading