Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drush 10 error - incompatible local packages #1689

Open
zanami opened this issue Jan 26, 2023 · 6 comments
Open

drush 10 error - incompatible local packages #1689

zanami opened this issue Jan 26, 2023 · 6 comments

Comments

@zanami
Copy link

zanami commented Jan 26, 2023

Drush drush10-bin doesn't work on my D8 site if search_api_solr is enabled.

  1. Drupal 8 (~/static/platformname) implies search_api_solr 1.23
  2. search_api_solr depends on consolidation/annotated-command:2.12.2
  3. drush10-bin (/opt/tools/drush/10/drush/) depends on consolidation/annotated-command:4.40.0
  4. drush10-bin inside ~/static/platformname or with @platformname/@Sitename alias throws this
[26-Jan-2023 11:38:45 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array() expects parameter 1 to be a valid callback, class 'Consolidation\AnnotatedCommand\AnnotatedCommandFactory' does not have a method 'addIgnoredCommandsRegexp' in /opt/tools/drush/10/drush/vendor/league/container/src/Definition/Definition.php:273
Stack trace:
...

Is there a workaround for this? Installing/removing drush locally?

@EdNett
Copy link

EdNett commented Jan 27, 2023

Hello,
I have been trying to understand how BOA uses different versions of drush. For a drupal 9 or drupal 10 site, are we suppossed to call drush9, drush10 or drush9-bin or drush10-bin instead of simply "drush" when on the command line as the octopus ftp user at the site in question?

For example to do a db update on a drupal 9.5.2 site using drush:

as user o1-ftp

cd static/d952/sites/example.com
drush updb OR drush9-bin updb ? OR does it not even matter?

This post isn't off-topic, as I seriously need to undersand this - and have never seen any instructions that answer it - in order to confirm the problem on our BOA server.

Thank you anyone for a clear answer.

Best,

Ed

@zanami
Copy link
Author

zanami commented Jan 27, 2023

In theory, up to D9 you are fine with
drush updb

It’s gonna be drush 8 which is fine.

However, updb aside, most of the contrib modules do not provide drush 8 support in their recent versions.

I decided to downgrade migrate tools to v4 to be able to run migrations with drush 8. Or I could use drush10-bin with v5 for that specific task which isn’t great.

@omega8cc
Copy link
Owner

Drush 10 is deprecated anyway, instead we recommend drush11-bin, although it's still debugged for standalone use without drushlr (Drush Launcher). If your site really needs older Drush 10, you should probably add site-local drush back again (Aegir normally removes it on platform verify because it still collides with Aegir tasks), then use drushlr (Drush Launcher) to allow the site to use its own Drush version.

@omega8cc
Copy link
Owner

omega8cc commented May 8, 2023

Also, it could be a symptom of known issues with the wider compatibility matrix between various Drush, Drupal and Symfony versions we are currently working on to make hosting Drupal 10 on Aegir possible.

@omega8cc
Copy link
Owner

Ah, I probably misunderstood the original issue.. but reading it again, you can't use Drush 10 with this site, because only Drush 8 comes with the old consolidation/annotated-command:2.12.2

So again, the problem is expected because search_api_solr 1.23 depends on too old consolidation/annotated-command to be able to work with Drush 10 and there is nothing you can do about that -- you are locked with Drush 8 for this site.

Not sure however why you expected or needed Drush 10 to work with this site?

Drush 8 officially supports Drupal 8 after all: https://www.drush.org/11.x/install/

@omega8cc
Copy link
Owner

@EdNett Please check the versions compatibility matrix at https://www.drush.org/11.x/install/

To make the situation more complex, here is our matrix:

Aegir Provision -- Symfony 3.4.0 (PHP 7.4 max) (Drupal 6-9)

Drush 8.4.12.4  -- Symfony 2.8.3 (PHP 8.2 max) (Drupal 6-9)
Drush 10.6.2    -- Symfony 4.4.0 (PHP 7.4 max) (Drupal 8-9)
Drush 11.5.1    -- Symfony 5.4   (PHP 7.4+)    (Drupal 9-10)
Drush 12.0.0    -- Symfony 6.1   (PHP 8.1+)    (Drupal 10+)

Drupal core 7   -- no Symfony  (PHP 8.2 since 7.94)
Drupal core 8   -- Symfony 3.4 (PHP 7.4 since 8.8.3)
Drupal core 9   -- Symfony 4.4 (PHP 8.1 since 9.3.0)
Drupal core 10  -- Symfony 6.1 (PHP 8.2 since 10.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants