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

Check requirements before running updatedb #2708

Merged
merged 1 commit into from Oct 19, 2017

Conversation

alexpott
Copy link
Contributor

@alexpott alexpott commented Apr 7, 2017

See #1427

@@ -130,6 +130,11 @@ function update_main() {
drupal_load_updates();
update_fix_compatibility();

// Check requirements before updating.
if (!drush_update_check_requirements()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be a validation callback instead, so it's run before we hit the actual command? Then drush_update_check_requirements can just be used directly or the validation command can call out to that as the code is now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well then we have to go through the rigmarole of loading all the .install files in the validation

@weitzman
Copy link
Member

I get that update.php does this, but updatebd doesnt have to do everything that update.php does. updatedb lacks tests and i'm loath to put more weight on it without tests.

@alexpott
Copy link
Contributor Author

The problem is that drush will run updates when core would not.

@weitzman
Copy link
Member

weitzman commented Apr 18, 2017

Right. Some other command could validate requirements and then careful folks would chain calls to that command and then updatedb. Just saying that updatedb doesn't have to do it all.

@weitzman
Copy link
Member

Merged into 8.x and master in order to help media entity contrib project.

@marcoscano
Copy link

Thanks!

@mootari
Copy link

mootari commented Oct 25, 2017

When is the next release due?

@gideoncresswell
Copy link

This still does not work on a Drupal 7 site. The update_7.inc file runs the update_check_requirements() function but doesn't check if that returns TRUE or FALSE. And it doesn't call any hook_requirements() at all - just system_requirements().

Issue #1427 was closed in favour of this ticket, but the bug is still present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants