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

Relay update warnings to the user. #5337

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

pfrenssen
Copy link
Member

@pfrenssen pfrenssen commented Dec 13, 2022

Fixes #5335

How to test:

Add the following line to core/modules/node/node.install:

function node_update_8000() {}

Run the drush updatedb:status command. A warning should be shown:

$ drush updatedb:status
 [warning] node: <em>node</em> module cannot be updated. It contains an update numbered as 8000 which is reserved for the earliest installation of a module in Drupal 8.x, before any updates. In order to update <em>node</em> module, you will need to install a version of the module with valid updates.
 [success] No database updates required.

Verified

This commit was signed with the committer’s verified signature.
aykevl Ayke
@pfrenssen pfrenssen force-pushed the inform-about-update-warnings branch from 2bb0f5a to 9a4b2e6 Compare December 13, 2022 14:32
Copy link
Member

@weitzman weitzman left a comment

Choose a reason for hiding this comment

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

LGTM. Up to you if you want to make a test for this.

@pfrenssen
Copy link
Member Author

Thanks! This is an edge case which will only affect a minority of users, so I think a test does not bring much value.

It only happens if a developer makes a mistake in the naming of an update hook. Still a good idea to show the warnings in this case :)

Verified

This commit was signed with the committer’s verified signature.
aykevl Ayke
@weitzman weitzman merged commit 50a4f5b into drush-ops:11.x Dec 13, 2022
@pfrenssen pfrenssen deleted the inform-about-update-warnings branch December 14, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inform the user when database updates have warnings
2 participants