Thanks for testing Automatic Updates! Please tell us in detail about the problem you encountered. To help you, you can use the prompts below as guidance.

What was your goal? For example, what versions of Drupal core were you trying to update from and to?

  • Updated Drupal core from 9.3.9 to 9.3.12.

What were the steps you took, starting from when you added the Automatic Updates module to your Drupal project (see https://www.drupal.org/i/3275810#install-module for instructions)? Include anything that seems relevant, including commands you ran, links you clicked on, output logs, relevant config files, screenshots, screen recordings, etc.

  • Checked my php and composer versions
  • Followed the instructions for "Testing with a new Drupal Project".
  • Enabled module.
  • Under Extend -> Updates, my composer version was incorrect. Turns out I had two versions of composer on my computer. First, I tried to set the composer path to the correct version in settings.php according to the help text linked from the status page. I used package_manager.settings:executables.composer, which did not work. I replaced the semi-colon with a period and that also did not work. I ended up removing the second composer file on my computer and re-installing.
  • Once my composer issues were fixed, I was able to follow the instructions under "Use Automatic Updates to update Drupal" with no other issues.

What was your environment like?
Please answer as many of the following questions as you can.

Was this a local development environment, or a remote server?:

  • Local environment

Are you using Lando, DDEV, or another Docker-based environment?:

  • I used the instructions on the beta testing project:
    composer create-project drupal/recommended-project:9.3.9 test --no-interaction
    cd test
    composer require 'drupal/automatic_updates:^2@beta' --no-interaction
    cd web
    php ./core/scripts/drupal quick-start standard

What operating system were you using?

  • Mac

What web server are you using?

What PHP version are you using (see https://www.drupal.org/i/3275810#confirm-php-version)?

  • PHP 8.1.1 (cli) (built: Dec 17 2021 23:49:52) (NTS)

What version of Composer are you using (see https://www.drupal.org/i/3275810#confirm-composer-version)?

  • Composer version 2.3.5 2022-04-13 16:43:00

Did you accomplish your goal? Were the instructions clear? Did you observe any bugs or errors, or other issues? Did you need to do any workarounds?

  • The instructions were very clear and easy to follow. The only issue I had was with my local composer version.

Problem with these instructions? Anything else we should know?

  • The only issue I had was with trying to manually set the composer path in the settings.php file. The instructions also do not say specifically where to update the settings (web/sites/default/settings.php).

CommentFileSizeAuthor
#10 3277235-10.png476.45 KBphenaproxima
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scorbine created an issue. See original summary.

Theresa.Grannum’s picture

Title: [DrupalCon] Automatic Updates beta test result » [DrupalCon] Automatic Updates beta test result [success]
Status: Active » Fixed

Thank you for testing, @scorbine! We've noted your feedback on adding information on updating the settings. Since testing went well, I've closed this issue.

phenaproxima’s picture

Title: [DrupalCon] Automatic Updates beta test result [success] » Package Manager's help text should provide a PHP snippet for setting the path to Composer in settings.php
Component: Code » Documentation
Status: Fixed » Needs work
Issue tags: +beta testing, +stable blocker

settings.php according to the help text linked from the status page. I used package_manager.settings:executables.composer

I'm actually gonna reopen this, because this here is actionable feedback. We should provide an actual code snippet on the help page that people can copy and paste into settings.php, or they'll run into this more. The help page, as it is, is using generic syntax that a core developer would understand, but isn't useful to users.

I'm also gonna tag this as stable blocking, since we definitely want to ship this help text in as usable a state as possible.

phenaproxima’s picture

I think we can go forward with this.

Right now, in package_manager_help(), we have this line:

$output .= '<p>' . t('Package Manager requires Composer @version or later available as an executable, and PHP must have permission to run it. The path to the executable may be set in the package_manager.settings:executables.composer config setting, or it will be automatically detected.', ['@version' => ComposerExecutableValidator::MINIMUM_COMPOSER_VERSION]) . '</p>';

We should change it to say something like this:

Package Manager requires Composer @version or later available as an executable, and PHP must have permission to run it. The path to the executable may be stored in config, or it will be automatically detected.

To set the path to Composer, you can add the following line to settings.php:

$config['package_manager.settings']['executables']['composer'] = '/full/path/to/composer';

Or, if using Drush, you can run the following command:

drush config:set package_manager.settings executables.composer /full/path/to/composer

Obviously that'll have to be done using hook_help()'s arcane syntax, but I think this will be clearer for people.

Theresa.Grannum’s picture

Assigned: Unassigned » Theresa.Grannum

phenaproxima’s picture

Assigned: Theresa.Grannum » tedbow
Status: Needs work » Reviewed & tested by the community

I like it. I like it a lot! Assigning to @tedbow for final review and commit.

tedbow’s picture

Status: Reviewed & tested by the community » Needs work
phenaproxima’s picture

Assigned: tedbow » phenaproxima

Self-assigning to fix this feedback.

As discussed with @tedbow in Slack, I'm going to keep the mention of Drush, but surround it with boundary comments so it can be automatically excised from the core merge request.

phenaproxima’s picture

Assigned: phenaproxima » tedbow
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new476.45 KB

Addressed your points, @tedbow. Here's what it looks like now:

Package Manager's help text, after fixing feedback.

Re-assigning to you for review/commit.

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

thanks for addressing the feedback!

RTBC

phenaproxima’s picture

Status: Reviewed & tested by the community » Fixed

Merged into 8.x-2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.