Remove UpdateStage::begin() in favor of ::create()

Created on 2 November 2023, about 1 year ago

Problem/Motivation

In πŸ“Œ Should we only show RC for pre-releases of core in the form? Active I found the problem that in \Drupal\Tests\automatic_updates\Kernel\StatusCheck\VersionPolicyValidatorTest::testCronPreCreate we are actually asserting that if you call ConsoleUpdateStage::create directly with cron update disable we will not get any of the validation rules you would get if cron updates are enabled.

this is a bit weird because we explicitly throw an exception if you call ConsoleUpdateStage::begin directly but not create

This is because we made UpdateStage::begin instead of overriding create() because it needs to start with project versions. But this makes a weird situation where you can start a instance of UpdateStage without a project version, you just have to call create() directly

Steps to reproduce

Proposed resolution

*Caveat this all might be bad idea but I think it is worth trying. We may be reminded of good reason why the current design is better.

We should remove UpdateStage::begin and just override create() with an optional $project_versions argument. We already have validation that this array has 1 element so will not need to add new validation

Remaining tasks

πŸ“Œ Should we only show RC for pre-releases of core in the form? Active has todos to this issue, if we decide not to this we will at least have to remove those todo address them in a different way.

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024