Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292343

Document that a module's classes are not available during hook_requirements() 'install' phase

$
0
0

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension...

When a module is installed, its hook_requirements() is called with $phase set to 'install'. At this point, the module has not yet been registered with the autoloader, and thus classes in the module can't be loaded.

This should be documented.

There is a workaround for this, which should probably be documented too: see http://blog.riff.org/2015_08_27_drupal_8_tip_of_the_day_autoloaded_code_...

Novice task

See comment #2 and update in #4


Viewing all articles
Browse latest Browse all 292343

Trending Articles