@@ -29,12 +29,20 @@ function automatic_updates_help($route_name, RouteMatchInterface $route_match) {
...
@@ -29,12 +29,20 @@ function automatic_updates_help($route_name, RouteMatchInterface $route_match) {
$output.='<p>'.t('Additionally, Automatic Updates periodically runs checks to ensure that updates can be installed, and will warn site administrators if problems are detected.').'</p>';
$output.='<p>'.t('Additionally, Automatic Updates periodically runs checks to ensure that updates can be installed, and will warn site administrators if problems are detected.').'</p>';
$output.='<h3>'.t('Requirements').'</h3>';
$output.='<h3>'.t('Requirements').'</h3>';
$output.='<p>'.t('Automatic Updates requires a Composer executable whose version satisfies <code>@version</code>, and PHP must have permission to run it. The path to the executable may be set in the <code>package_manager.settings:executables.composer</code> config setting, or it will be automatically detected.',['@version'=>ComposerExecutableValidator::MINIMUM_COMPOSER_VERSION_CONSTRAINT]).'</p>';
$output.='<p>'.t('Automatic Updates requires a Composer executable whose version satisfies <code>@version</code>, and PHP must have permission to run it. The path to the executable may be set in the <code>package_manager.settings:executables.composer</code> config setting, or it will be automatically detected.',['@version'=>ComposerExecutableValidator::MINIMUM_COMPOSER_VERSION_CONSTRAINT]).'</p>';
$output.='<p>'.t('For more information, see the <a href=":automatic-updates-documentation">online documentation for the Automatic Updates module</a>.',[':automatic-updates-documentation'=>'https://www.drupal.org/docs/8/update/automatic-updates']).'</p>';
$output.='<p id="cron-alternate-port">'.t('If your site is running on the built-in PHP web server, unattended (i.e., cron) updates may not work without one of the following workarounds:').'</p>';
$output.='<p id="cron-alternate-port">'.t('If your site is running on the built-in PHP web server, unattended (i.e., cron) updates may not work without one of the following workarounds:').'</p>';
$output.='<ul>';
$output.='<ul>';
$output.='<li>'.t('Use a multithreaded web server, such as Apache, NGINX, or on Windows, IIS.').'</li>';
$output.='<li>'.t('Use a multithreaded web server, such as Apache, NGINX, or on Windows, IIS.').'</li>';
$output.='<li>'.t('Run another instance of the built-in PHP web server on a different port and configure automatic updates accordingly: <code>$config["automatic_updates.settings"]["cron_port"] = $alternate_port_number;</code>').'</li>';
$output.='<li>'.t('Run another instance of the built-in PHP web server on a different port and configure automatic updates accordingly: <code>$config["automatic_updates.settings"]["cron_port"] = $alternate_port_number;</code>').'</li>';
$output.='</ul>';
$output.='</ul>';
$output.='<p>'.t('For more information, see the <a href=":automatic-updates-documentation">online documentation for the Automatic Updates module</a>.',[':automatic-updates-documentation'=>'https://www.drupal.org/docs/8/update/automatic-updates']).'</p>';
$output.='<h3 id="minor-update">'.t('Updating to another minor version of Drupal').'</h3>';
$output.='<p>';
$output.=t('Automatic Updates supports updating from one minor version of Drupal core to another; for example, from Drupal 9.4.8 to Drupal 9.5.0. This is only allowed when updating via <a href=":url">the user interface</a>. Unattended background updates can only update <em>within</em> the currently installed minor version (for example, Drupal 9.4.6 to 9.4.8).',[
$output.='<p>'.t('This is because updating from one minor version of Drupal to another is riskier than staying within the current minor version. New minor versions of Drupal introduce changes that can, in some situations, be incompatible with installed modules and themes.').'</p>';
$output.='<p>'.t('Therefore, if you want to use Automatic Updates to update to another minor version of Drupal, it is strongly recommended to do a test update first, ideally on an isolated development copy of your site, before updating your production site.').'</p>';
@@ -284,6 +296,22 @@ final class UpdaterForm extends FormBase {
...
@@ -284,6 +296,22 @@ final class UpdaterForm extends FormBase {
thrownew\LogicException("Release information for Drupal $first_release_version is not available.");
thrownew\LogicException("Release information for Drupal $first_release_version is not available.");
}
}
if($this->moduleHandler->moduleExists('help')){
$url=Url::fromRoute('help.page')
->setRouteParameter('name','automatic_updates')
->setOption('fragment','minor-update');
// @todo Updating this wording in https://www.drupal.org/i/3280403 to
// reflect that multiple minor branches may be visible.
$form['minor_update_help']=[
'#markup'=>$this->t('The following updates are in the next minor version of Drupal. <a href=":url">Learn more about updating to another minor version.</a>',[
$assert_session->pageTextContains('The following updates are in the next minor version of Drupal. Learn more about updating to another minor version.');
$assert_session->linkExists('Learn more about updating to another minor version.');
$assert_session->pageTextNotContains('The following updates are in the next minor version of Drupal. Learn more about updating to another minor version.');