Score:-3

Best practice to upgrade drupal 9.4 to 9.5? Composer or Drush method?

kr flag

I can run this command to upgrade drupal 9.4 to 9.5, but I can also do it in drush. Which method is better and why?

composer require drupal/core-recommended:9.5.0 drupal/core-composer-scaffold:9.5.0 drupal/core-project-message:9.5.0 --update-with-all-dependencies

Kevin avatar
in flag
As far as I know it cannot (should not) be done with Drush. Everyone should be leveraging Composer at this point.
Score:4
ua flag

Let me preface with what each of these are:

Drush is a command line shell and Unix scripting interface for Drupal. Drush core ships with lots of useful commands and generators. Similarly, it runs update.php, executes SQL queries, runs content migrations, and misc utilities like cron or cache rebuild.

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.


You cannot use Drush to update/upgrade Drupal 9. That particular Drush functionally/feature got deprecated. As Drupal 9 requires Drush 10 or higher, it doesn't have it.

enter image description here

source: Updating Drupal core via Drush

Composer is a very popular PHP tool used outside the Drupal world to manage dependencies.

Drupal decided to adopt it. Once this happened, there was no need for Drush to re-invent the wheel when there is already a dedicated tool built for this job specifically and that does it very well.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.