-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
dev/drupal/#137 updates hook requirements adds sanity check, remove install checks #46
Conversation
…k for runtime invoking of _requirements remove install checks on runtime invoking.
I can take a look at this tomorrow. Regarding the installer there is |
I wasn't aware of cv core:check-req however a quick check of the code suggests it is running the same checks that happen before this patch is applied. While these look promising I think we run into the same hurdles. I think the best solution would be that the core checkRequirements is modified to take an option of checking an existing install and modifies some of the checks. The goal with this patch is not to require a writeable civicrm.settings.php to avoid seeing errors when hooks_requirements is run. I think |
Thanks for the PR - overall it seems to address the problem just some issues below.
|
Another thought - I wonder if we're doing this backwards and should instead be putting something in here that does something slightly different if civi is already installed: That way the other checks that still make sense when installed would still run as-is. And if this were run from non-drupal you'd want that too. |
Thanks for moving this along. My main concern is that this prevents all the other good checks from running when you visit the drupal status report. I have an alternate which I'll put up in a minute. |
Sure - I think the best solution would be that core is aware of install status and issues warnings accordingly. |
hook_requirements didn't account for it being called post install. This PR adds a very quick sanity check - is civicrm initialised and is civicrm.settings.php writable.
The check on is civicrm initialised to match behaviour on D7.
It's possible we should add some behaviour here to catch the case where the installer hasn't run? However as the installer isn't being used on D8 currently - and it installs on enabling this is probably surplus to requirements for now.
Rationale for adding the check on civicrm.settings.php (and nothing else) is due to the previous behaviour which warned if it was not writable. Potentially this could be an error? But have left as a warning for now.