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

Update of Opigno 3.0.0 in the distro platform #1605

Open
VangelisP opened this issue Nov 24, 2021 · 2 comments
Open

Update of Opigno 3.0.0 in the distro platform #1605

VangelisP opened this issue Nov 24, 2021 · 2 comments

Comments

@VangelisP
Copy link

Hi all.

As D8 has passed the EOL date, i was reviewing if Opigno 3.0.0 (their latest version) can work with D9 on the Aegir stack.

While the platform can be registered properly, site creation fails due to some new code/functionality implemented for drush on the module opigno_statistics, which unfortunately, breaks our drush (8.4.9-dev currently on my instance). It's being written to work with drush9.

I do have a first draft patch that I've tried which seems to resolve the installation issue by stripping out the offending (for drush 8) drush command, however I am aware that this is not he proper approach.

Instead of stripping out the new command that causes a break in drush during installation, is there a way to explicitly define which drush version should run when building a drupal site ? (eg drush8, drush9 etc)

For reference, here is my patch as a code:

diff --git a/opigno_statistics.services.yml b/opigno_statistics.services.yml
index 6593bc8..986e00b 100644
--- a/opigno_statistics.services.yml
+++ b/opigno_statistics.services.yml
@@ -15,8 +15,3 @@ services:
       - [setContainer, ['@service_container']]
     tags:
       - { name: access_check, applies_to: _opigno_access_user_achievements }
-
-  opigno_statistics.update:
-    class: Drupal\opigno_statistics\Commands\StatisticsCommands
-    tags:
-      - { name: drush.command }
diff --git a/src/Commands/StatisticsCommands.php b/src/Commands/StatisticsCommands.php
index 8ff1a29..fc084ef 100644
--- a/src/Commands/StatisticsCommands.php
+++ b/src/Commands/StatisticsCommands.php
@@ -10,6 +10,14 @@ use Drush\Commands\DrushCommands;
  */
 class StatisticsCommands extends DrushCommands {
 
+  public function getName() {
+    return $this->pluginDefinition['name'];
+  }
+
+  public function getDefinition() {
+    return $this->info;
+  }
+
   /**
    * Makes update of trainings statistics.
    *

Many thanks

@omega8cc
Copy link
Owner

omega8cc commented Dec 22, 2021

Aegir can't run any Drush version higher than 8, because its code is based on Drupal 7.x and needs to support also Drupal sites running core 7.x and 6.x, however, the Drush 8 itself is still receiving patches to make it work with Drupal 9+, so it should work, but any offending module should not be enabled on install, but could be enabled while the site is already installed, also with drush10 available on command line (but not for Aegir).

@yazzou
Copy link

yazzou commented Apr 20, 2022

I have tried what suggested by :

  • creating a standard d9 site on 9.3 plateform
  • migrating to the site to opigno lms
  • enabling modules from the interface one by one (as drush 9 / 10 did not work error] Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in GuzzleHttp\choose_handler()
  • The site started working but no verification through aegir was working on the site as the error mentionned by @VangelisP appeared again

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