Check what syntaxhighlighter_requirements() does at site-install time, and evaluate if the line require_once 'syntaxhighlighter.module'; can be removed.
The hook_requirements() documentation says that when $phase == 'install' stuff may need to be imported but our implementation does nothing during this phase.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | syntaxhighlighter_do_not_require_module_in_hook_requirements-2881173-2.patch | 471 bytes | ao2 |
Comments
Comment #2
ao2 commentedAttaching a patch that can be tested by bringing it in at install time using the "extra, patches" mechanism in composer.json, like this:
Comment #3
ao2 commentedFixed wording in the issue description
Comment #4
ao2 commentedFrom my tests I verified that during the "runtime" phase it's not necessary to require the .module file because the module has already been installed.
It would be necessary if we wanted to check the requirements also during the "install" phase, which I think we should do BTW, to be able to use
_syntaxhighlighter_get_lib_location(), but not if we switch to use the libraries module unconditionally.So I am setting #2881252: Make the libraries module a hard dependency as the parent issue.
Comment #6
ao2 commentedClosing as fixed, now the requirements are checked also at install time.