When attempting to install this module on a brand new Drupal 8 site, using the latest dev release (installed via

</code>), I got the following error in the log, and a WSOD after clicking 'Install' on the modules page:

<code>
Got error 'PHP message: Error: Class 'Drupal\\tideways\\Install' not found in /var/www/drupalvm/drupal/web/modules/contrib/tideways/tideways.install on line 7 #0 [internal function]: tideways_requirements('install')
#1 /var/www/drupalvm/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(391): call_user_func_array('tideways_requir...', Array)
#2 /var/www/drupalvm/drupal/web/core/includes/install.inc(997): Drupal\\Core\\Extension\\ModuleHandler->invoke('tideways', 'requirements', Array)
#3 /var/www/drupalvm/drupal/web/core/modules/system/src/Form/ModulesListForm.php(412): drupal_check_module('tideways')
#4 /var/www/drupalvm/drupal/web/core/modules/system/src/Form/ModulesListForm.php(430): Drupal\\system\\Form\\ModulesListForm->buildModuleList(Object(Drupal\\Core\\Form\\FormState))
#5 [internal function]: Drupal\\system\\Form\\ModulesListForm->submitForm(Array, Object(Drupal\\Core\\Form\\FormState))
#6 /var/www/drupalvm/drupal/web/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array)
#7 /var/www/...
', referer: http://drupalvm.dev/admin/modules
CommentFileSizeAuthor
#10 tideways-php-status-report.png184.31 KBgeerlingguy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

geerlingguy created an issue. See original summary.

  • david_garcia committed 93da9c2 on 8.x-1.x
    Issue #2843481: Can'\''t install latest dev release on 8.x
    
david_garcia’s picture

Looks like autoloading is not available during install phase. I added the requirements hook after having the module installed on several sites, so that's why I did not notice this.

Pushed a fix. Give it a shot.

david_garcia’s picture

This would have been a better fix....

// Not needed at runtime.
if ($phase === 'install') {
  $module = 'tideways';
  drupal_classloader_register($module, drupal_get_path('module', $module));
}

Could you try with this alternative fix?

geerlingguy’s picture

Status: Active » Needs review
geerlingguy’s picture

Now trying to composer require either 1.x-dev or ^1.0 results in:

  [Composer\Downloader\TransportException]                                                                             
  The "https://packages.drupal.org/8/drupal/provider-2016-4%24a30289dd8394e5271bd77777bb14b361c5938656f1cddad7fae1c00  
  d5d6ba9c6.json" file could not be downloaded (HTTP/1.1 404 Not Found) 

Not sure if it's a Drupal.org issue or something else, but I'll try downloading manually to see if that works.

geerlingguy’s picture

Status: Needs review » Reviewed & tested by the community

With the code in -dev, module installs correctly. Also trying the manual patch you posted above now... it works fine as well!

Do you want to switch to the code in #4? Otherwise, can mark this fixed.

geerlingguy’s picture

Actually... with the alternative fix in #4, install succeeds, but in either case, I don't see any report on the Reports -> Status report page.

I'm guessing the code inside src/Install.php is supposed to run, but it seems like it never actually gets picked up, so it's hard to see if Tideways is supposed to be running correctly or not...

geerlingguy’s picture

If I manually paste the code from Install.php over into the .install file (just to make sure I can check requirements), I get a fatal error, with the message:

PHP message: Error: Class 'Tideways\\Profiler' not found in /var/www/drupalvm/drupal/web/modules/contrib/tideways/tideways.install on line 17

Is that supposed to be installed as part of the Tideways PHP Extension installation? I don't see it after I follow the official extension compile/install instructions :/

geerlingguy’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
184.31 KB

Also, it seems that Tideways is being picked up by PHP correctly, at least...

Tideways PHP status report info

david_garcia’s picture

Is that supposed to be installed as part of the Tideways PHP Extension installation?

Should be brought into scope as a composer dependency.

    "require": {
        "tideways/profiler": "^2.0"
    }
geerlingguy’s picture

Status: Needs work » Needs review

Ah... Drupal's composer endpoint was down, so I manually downloaded the release, and that's why I didn't get the library. Explains a lot!

I'll try again later now that the D.o repo is up.

david_garcia’s picture

Status: Needs review » Closed (won't fix)

I'm going to consider this as fixed. Thanks!