Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
At #3135629-42: Minimum MySQL version requirement is not confirmed when upgrading existing sites from Drupal 8 to Drupal 9 I noticed a bunch of missing PHPDoc comments in core/lib/Drupal/Core/Database/Install/Tasks.php
.
Proposed resolution
Fix the docs.
Remaining tasks
Do it.- Reviews.
- RTBC.
- Commit.
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#22 | 3136388-12.9_y_x.patch | 4.7 KB | dww |
#12 | 3136388-12.8_9_x.patch | 4.01 KB | dww |
Comments
Comment #2
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedComment #3
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedComment #4
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedHi @dww, Hoping you are safe in the coronavirus pandemic!!
could you please elaborate, what exactly needs to be done here?
Thanks!!
Comment #5
dwwHi @jyotimishra123, thanks for the well-wishing! Indeed, I'm safe and well, blessed be. Hope you're safe, too (both from the pandemic and
Cyclone Amphan (if you're anywhere near that)).
What needs to happen is to run phpcs on core/lib/Drupal/Core/Database/Install/Tasks.php:
and add good PHPDocs for all of these referring to comments. This patch will probably be able to be backported all the way to 8.8.x. Remember that "array" is almost never a good type for the docs, and you'll want something more specific like "string[]" (as appropriate).
The t() stuff would have to be a separate issue, since that'd be a string change and only 9.1.x at this point. Not sure if that should be a single issue, or if there's a wider effort to solve that across core that would be a more appropriate scope. You could search for something like that, and open a follow-up if not.
Not sure if "array spans longer than 80 characters..." is in scope here or not. Better to leave it out for now and focus on comment-only-changes.
Thanks!
-Derek
Comment #6
Ramya Balasubramanian CreditAttribution: Ramya Balasubramanian at Srijan | A Material+ Company for Drupal India Association commentedComment #7
Ramya Balasubramanian CreditAttribution: Ramya Balasubramanian at Srijan | A Material+ Company for Drupal India Association commentedComment #8
Manisha111 CreditAttribution: Manisha111 commentedComment #9
nitesh624Comment #10
nitesh624Comment #11
nitesh624Comment #12
dwwCool, thanks. That's a good start!
I pulled in some of the other changes from the interdiff at #3135629-42: Minimum MySQL version requirement is not confirmed when upgrading existing sites from Drupal 8 to Drupal 9 that weren't addressed.
Also did a pass through the whole file and did some other cleanups:
- Using an active verb for each phpdoc summary (e.g. "Checks" not "Check").
- Tried to keep the summaries under 80 chars.
- Added yet more missing docs (not sure why phpcs didn't flag all of these).
...
Also, thanks to #3109534: Raise the minimum MySQL version to 5.7.8 and MariaDB version to 10.2.7 in Drupal 9, this issue now needs separate patches for 9.y.x branches vs. 8.9.x branch.
Comment #13
nitesh624hi @dww thanks for quick review. what will be the next step should i take in this issue. please guide me
Comment #14
dwwHi @nitesh624,
At this point, neither of us are really qualified to RTBC the issue, since we've both contributed to the patch.
Your next steps could include:
A) Carefully review my changes from #12 and make sure they're all set (no typos, code standards are right, new docs are accurate, clear, concise, etc.) If you find any problems, either fix them yourself or comment here to discuss and we can decide who will fix them. You could also review the issue summary to make sure it's complete and accurate. These are things core committers appreciate before being asked to review something.
B) If #12 and the issue overall seem totally done to you, you could try to find someone else to review/RTBC this:
- Co-workers?
- Other folks you have a connection to (local user group, friends, random contributors you've worked with on other issues and have a bond, etc).
- Offer to do a "review trade" where you'll review someone else's patch and they'll review this. The #contribute and #patch-review channels on Slack can be good places to make such an offer.
That's about all you can do at this point.
Thanks!
-Derek
Comment #15
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedAssigning my self to test
Comment #16
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedHi @dww,
I have reviewed the patch in #12, it applied successfully in both versions of Drupal instance.
But when i ran PHPCS, there were still some warning present, therefore i updated the patch.
Thnks!!
Comment #17
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedcan anyone tell me, how to run test cases of this 3136388-16.9_y_x.patch against drupal 9 version?
Comment #18
nitesh624Thanks @jyotimishra123 to run test against D9 dev release
Click on "Add test / retest" link below the patch and select "custom parameters" and select appropriate parameters from dropdown
and for #16 can you please provide inderdiff file(s).
Comment #20
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedHi @nitesh624, please find interdiff files.
Comment #21
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedComment #22
dww@jyotimishra123: Thanks for trying to move this forward. However, as I wrote at #5:
So let's not worry about trying to do anything along the lines of #16. This issue isn't about trying to fix all the PHPCS errors on this file, it's about the documentation only.
Hiding the new files. Reviews / RTBC should be based on #12 for now. Re-uploading so the testbot isn't confused.
Thanks,
-Derek
Comment #23
jyotimishra-developer CreditAttribution: jyotimishra-developer commentedHi @dww, Apologies!!!
Really missed out #5 comment about t() stuff.
Now I got it... as i said in #16 that the patches in #12 are working fine and looks good to me..
Thanks!!
Comment #24
quietone CreditAttribution: quietone at PreviousNext commentedThis came up while working on coding standards issues.
The patch still applies to 9.4.x, changing version.
I applied the patch and read the documentation. The content looks correct to me and is an improvement. It is correcting faulty documentation so changing to a bug.
I also think this is ready.
Comment #25
dwwIf it’s a bug, let’s smash it. 😉
Comment #26
alexpottCommitted and pushed b5156d7b04f to 10.0.x and d2a903bbc31 to 9.4.x and 950da2e97f8 to 9.3.x. Thanks!