Andrew Fletcher published: 11 September 2023 (updated) 29 September 2023 1 minute read
Resources - changing Drush
Type | Version |
---|---|
Drush (current) | 11.6.0 |
Drush (update) | 12.2.0 |
Updating Drush went OK on all testing environments until on to the staging environment.
The initial error that I saw was
PHP Fatal error: Declaration of Drush\Style\DrushStyle::confirm($question, $default = true) must be compatible with Symfony\Component\Console\Style\SymfonyStyle::confirm(string $question, bool $default = true): bool in /var/www/html/{project}/vendor/drush/drush/src/Style/DrushStyle.php on line 11
Followed by attempting to run composer update
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drush/drush[12.0.0, ..., 12.2.0] require composer-runtime-api ^2.2 -> found composer-runtime-api[2.1.0] but it does not match the constraint.
- Root composer.json requires drush/drush ^12 -> satisfiable by drush/drush[12.0.0, ..., 12.2.0].
To resolve this problem, update your composer by running the following command:
composer self-update
Comparing the Composer versions
Environment | Version |
---|---|
Local | 2.5.2 2023-02-04 14:33:22 |
Ubuntu server | 2.1.5 2021-07-23 10:35:47 |
Ubuntu server Composer version post running the self-update command
2.6.2 2023-09-03 14:09:15
Related articles
Andrew Fletcher
•
22 Jan 2025
Removing a missing module in Drupal
Occasionally, a Drupal site may display a warning about a module being "Missing or invalid." This issue occurs when a module is marked as installed in the configuration but is no longer present in the file system. A common example is the `fakeobjects` module, which is associated with CKEditor 4 and...
Andrew Fletcher
•
05 Jan 2025
A comprehensive guide to debugging and monitoring in Drupal like a pro
Observing colleagues work with Drush, it’s clear they have the basics down pat. Recently, I conducted a crash course in upskilling like a pro. Moving beyond the frequent commands many have already mastered, such as:drush cr
drush updb
drush statusThese commands are fantastic for quick tasks like...
Andrew Fletcher
•
26 Nov 2024
A technical journey to resolving line ending issues in Drupal installations
In the ever-evolving landscape of web development, technical challenges are par for the course. One such challenge recently encountered involved a Drupal installation, where the popular command-line tool Drush failed to execute correctly. This article delves into the issue, the diagnostic steps...