This is starting to look great, thanks for working on it!
The latest pipeline has failures in NodeLinksTest now that it's converted to Kernel, among other test failures.
Also, initial look at the open threads on the MR and I think all of them are good suggestions that should be incorporated into this.
I'll try to do a more thorough review soon. This is really exciting!
Thanks again,
-Derek
Agreed this would be great to do in 11.2.0 so the new hooks only use the new API. Tagging as such. But this should now be postponed on 📌 Create enums for RequirementSeverity and RequirementPhase Active , no?
Yeah, would be great to do this and 📌 Convert hook requirements that do not interact with install time Active at the same time, so that the new hooks only use the new API.
Sweet, thanks!
Looks great to me on a local site still running 10.3.10 core. Just did:
composer require drupal/entityreference_dragdrop
drush en entityreference_dragdrop
Visited /admin/reports/updates on the site, and saw this:
Please rebuild all the projects with &
.
Thanks so much!
-Derek
Started reviewing by responding to (and resolving) the open threads. Haven't yet otherwise really reviewed the MR changes, although an initial glance looks good. Hope to review this in more depth on Tuesday.
Hate to say it, but I think this might still be valid. From what I understand, local still has some dependencies on update module. There are also issues to OOP-ify Update module, which this is related to as well. Eg a class to represent project info, not the monster arrays we pass around now.
FYI: Both update and runtime are RTBC. There will be a merge conflict with the 2nd one after the 1st one lands, since both are touching core/lib/Drupal/Core/Extension/module.api.php
-- it'll be a trivial fix, but it means a core committer cannot do both simultaneously without one of us doing a manual rebase in between.
If we wanted to arbitrarily pick one to commit first and mark the other postponed, that'd be okay. Or we leave both RTBC and resolve it organically.
Thanks!
-Derek
Minor formatting for title and summary.
p.s. Did a light edit on the CR for formatting and pedantic nits. 😂 https://www.drupal.org/node/3490851/revisions/view/13843726/13854897 →
Phew! Thanks for sticking with this through all the rounds of reviews. Apologies I didn't spot everything all at once.
Everything is ready here now. Pipeline is green. Code and docs have been polished so much they shine. 😂 No other improvements I can spot. Per the meta, these separate hooks really are the right approach for splitting up the beast of hook_requirements()
.
Ready To Be Committed. 😉
Blocker is in. This needs a rebase and to revert the last commit.
Per Slack, catch is okay to commit this now and do the conversion in a follow up. I or nicxvan will open that follow-up momentarily, but catch only has 29 minutes to connnit this m, so here’s a quick RTBC. There’s a pipeline in the linked issue that shows this change allows that to pass. This is a trivial change. Ready!
Thanks,
-Derek
Yeah, I don’t know if the quick-fix here in an unrelated test is the right approach. I believe we should postpone this on resolving 📌 Add headroom to the navigation performance test Active
Thanks for that pointer, @catch. Let’s see what we can do to make this stable again.
I have a very minor lingering concern that INFO and OK are weird for update. They’re never displayed unless there’s an error or warning, in which case all update requirements, even OK and INFO, are shown to the user, distracting them from the thing they actually have to fix. 😕 This is not a problem to be solved in this issue. 😅 Maybe some of it can be addressed at 📌 Deprecate REQUIREMENT_INFO in favor of REQUIREMENT_OK Active , but probably we’ll want yet another follow up for the UX of update.php when there are requirements problems.
That said, I think we’ve done everything we can to make this a clean and solid improvement. RTBC!
Thanks,
-Derek
This, too, might be RTBC, but lemme do it right if true.
I have a very minor lingering concern that INFO and OK are weird for update. They’re never displayed unless there’s an error or warning, in which case all update requirements, even OK and INFO, are shown to the user, distracting them from the thing they actually have to fix. 😕 This is not a problem to be solved in this issue. 😅 Maybe some of it can be addressed at 📌 Deprecate REQUIREMENT_INFO in favor of REQUIREMENT_OK Active , but probably we’ll want yet another follow up for the UX of update.php when there are requirements problems.
That said, I think we’ve done everything we can to make this a clean and solid improvement. RTBC!
Thanks,
-Derek
Upon further investigation, OK and INFO sort of matter in the update case, but even that's perhaps another UI problem to solve. See summary for details.
Apologies, I missed a point in my previous feedback on the API docs.
Thanks for this bug report, and for the work to try to fix it. Per #19, this issue is duplicate with 🐛 Module names on the Available Updates page are double-escaped Needs review , which started doing much the same thing here, but then ended up moving to another queue since the problem is really in the XML release history feeds provided by updates.drupal.org, not the update.module itself. I just replied there in support of fixing this at u.d.o, not in update.module. Let's continue in the original issue. If it turns out we have to fix this only in update.module, we can move that issue back into the core queue.
Thanks again!
-Derek
Coming here from 🐛 Double encoded ampersand in /admin/reports/updates Active which I was pinged about in Slack for a subsystem maintainer review.
From a little Git archeology, looks like this double-encoding was introduced in #1003764: Add an alter hook invoked while generating release-history XML files → when @drumm converted this from manually putting the XML together into using SimpleXML. Apparently no one noticed that SimpleXML is doing another round of encoding for us.
I just did this:
% wget https://updates.drupal.org/release-history/save_edit/current -O save_edit.xml
...
HTTP request sent, awaiting response... 200 OK
Length: 9702 (9.5K) [text/xml]
Saving to: ‘save_edit.xml’
save_edit.xml 100%[=====================================>] 9.47K --.-KB/s in 0s
2025-01-15 14:45:23 (23.8 MB/s) - ‘save_edit.xml’ saved [9702/9702]
% grep title save_edit.xml
<title>Save &amp; Edit</title>
So the source is definitely double-encoded. It seems wonky to say that core should have to decode twice to get the raw values.
I don't understand the "BC" concern here. The primary client for these feeds, update.module, was written to assume properly encoded markup in the XML feeds, and is now "broken" by the double encoding. If other clients are already decoding twice, and we stop double encoding, what's the harm?
Here's a little test script:
$inputs = [
'not_encoded' => '<title>Save & Edit</title>',
'encoded_once' => '<title>Save & Edit</title>',
'encoded_twice' => '<title>Save &amp; Edit</title>',
];
foreach ($inputs as $key => $value) {
echo "------\n$key\n";
echo "Raw: $value\n";
$decoded = html_entity_decode($value, ENT_QUOTES | ENT_HTML5, 'UTF-8');
echo "Decoded: $decoded\n";
echo "Double decoded: " . html_entity_decode($decoded, ENT_QUOTES | ENT_HTML5, 'UTF-8') . "\n";
}
If I run this, I get:
------
not_encoded
Raw: <title>Save & Edit</title>
Decoded: <title>Save & Edit</title>
Double decoded: <title>Save & Edit</title>
------
encoded_once
Raw: <title>Save & Edit</title>
Decoded: <title>Save & Edit</title>
Double decoded: <title>Save & Edit</title>
------
encoded_twice
Raw: <title>Save &amp; Edit</title>
Decoded: <title>Save & Edit</title>
Double decoded: <title>Save & Edit</title>
We're still going to turn around and re-encode this when printing it in the available updates report. That happens via core/modules/update/templates/update-project-status.html.twig
right here:
<div class="project-update__title">
{%- if url -%}
<a href="{{ url }}">{{ title }}</a>
{%- else -%}
{{ title }}
{%- endif %}
{{ existing_version }}
{% if install_type == 'dev' and datestamp %}
<span class="project-update__version-date">({{ datestamp }})</span>
{% endif %}
</div>
So Twig is going to escape this for us, and I don't see how this could be used as an attack vector.
IMHO, this is the right fix, not the extra decode being proposed at #3493742. I am a maintainer for project*, so I could just commit this, but I can't deploy the fix on d.o anymore. 😅
Needs rebase after 📌 Add array return to all hook_requirements implementations Active landed. Also, added a bunch of suggestions to cleanup the API docs.
Initial pass at saving credit: @nicxvan for all the work, and @smustgrave and myself for reviews.
Hi,
Thanks for your interest in this module. However, I've never seen an issue from you, a patch or MR from you, or even a comment in this issue queue that you're using this module and helping to test / fix anything. I have no idea who you are, if you know how to write secure code, if you know how to write good tests, if you know how to manage releases, database schema updates, etc. There's no way I could possibly grant you access to push commits to this project, much less "co-maintain" it since you've never contributed anything to it and I have no information about you, your experience, abilities, or anything.
Also, if you have a "strong team" that is "managing" this module, I'd love to see some evidence of that in the issue queue before you request for your "team" to take over. Note that drupal.org works with human accounts, not teams. If you have a team, and they're all helping, we need to see activity from each member of that team who will would potentially become a maintainer. Sharing accounts or credentials among a team is disallowed by drupal.org policy.
In the future, if you and your strong team want to contribute to the modules hosted here, I strongly encourage you to start by actually contributing to the module in any/all of the following ways:
- Triage the issue queue (look for duplicates, make sure bugs can be reproduced, that issue summaries are clear and accurate, etc).
- Help review and test existing merge requests.
- Write test coverage for MRs that are lacking tests.
- Write new merge requests for issues that do not yet have code but need it.
- ...
If you perform any (ideally, many) of these tasks, you will begin to earn some respect and trust from existing maintainers. Only after a period of building respect and trust would any responsible maintainer seriously consider granting anyone else access.
Cheers,
-Derek
Maybe postponed is more appropriate, but with known-failing tests, this is NW. Super minor nit as an MR suggestion.
- Pipeline is now green.
- All feedback addressed.
- All threads resolved.
- Title and summary are accurate and clear.
- CR is simple, accurate and clear.
I see nothing left to improve. RTBC.
Thanks!
-Derek
p.s. I did some minor edits and formatting cleanups on the CR: https://www.drupal.org/node/3489411/revisions/view/13800107/13851975 →
Sorry, I missed something in previous reviews (or this is a new bug). 1 suggestion to apply, otherwise seems RTBC to me.
Related, but the rebase seems to have clobbered views.views.inc entirely. I thought we still needed a deprecated views_entity_field_label() in there.
TL;DR: Probably wise not to self-RTBC after a rebase, especially with merge conflicts, so that peer review can help spot trouble. 😅
phpstan is failing in the pipeline.
Thanks noticing this was requested in the parent issue, for opening it and for the MR.
Change is simple and small. Definitely improvement and cleanup. Issue summary and title are clear and accurate.
Pipeline is all green.
I see nothing to improve. Ready to be committed. 😉
The MR thinks the merge is blocked due to conflicts. Would you be willing to rebase? I just did a thorough review on the sister issue. Probably many of those nits would apply here, too. ;) I'm sadly out of contrib time for today, so I'll have to come back to this later for a more thorough review of the details here.
Thanks for moving this forward. The parent meta has good discussion on why this is actually the right approach, after all. 😅
Left a bunch of suggestions on the MR. Mostly pedantic nits, but a few things of substance.
(Sorry for the assigned/unassigned noise -- accidentally clicked something in the MR review UI).
Resolved the opened threads, since @catch has already addressed all the feedback.
Opened a few trivial suggestions for some nits, and to rename a test method that no longer does what the old name says.
I would RTBC, but I think the suggestions are worth applying, first. 😅
Initial pass at saving credit:
@catch (duh)
@alexpott for MR reviews + suggestions
@Spokje, @nicxvan, @godotislate, @luke.leber, and myself for MR and issue reviews
Almost there!
Thanks,
-Derek
p.s. restoring the Bug Smash Initiative tag, which I think @catch accidentally clobbered in #13 with a stale form submit.
Thanks, looks better.
Issue title and summary look clear and accurate.
Saving credit for quietone and myself for MR reviews.
Don’t see anything else to improve. RTBC++
Added some suggestions for very minor / pedantic nits. Otherwise, seems reasonable to me.
I was thinking that if release managers are saying “we shouldn’t use state in tests, only keyvalue, that we could do bulk.
But yes, strongly appreciate the long time it takes to do even single tests carefully. Wouldn’t dream of accusing you of lots of issues for credit. You’re a prolific contributor!
I was only wondering if we could add more scope without as much effort and rigor if we want to convert entirely. It’s a bit weird having a mix of both, so I’m hoping to minimize the time it takes to convert.
All that said, yes, following the issue where the underlying race condition in State API is hopefully going to be fixed. So maybe it’s moot to do this conversation?
Yeah, I’m torn, I guess we’ll leave it for the core committers to decide. Back to RTBC.
Thanks!
-Derek
Sorry, totally missed. I had a stale copy of a branch checked out, and was only looking at the MR diff which seemed thin for some reason.
So we've already moved everything we can move, and converted everything to UpdateHooks, etc. The title here is kinda misleading. Maybe this is closer? I know you opened these issues in bulk with copy/pasta summaries and titles, but I think it's worth refining before it ends up in the Git history.
p.s. Saving credit to nicxvan for the MR, bramdriesen and myself for reviews, but not the patch in #3.
Thanks for this! Great work tracking this down.
I added some suggestions to the MR, mostly for trivial nits and a typo. Hate to slow down progress on a critical, but I really think we need comments about why we're not releasing the locks we're acquiring. I don't think this is RTBC if all the MR threads aren't resolved.
See comment #15. It’s being set to the translatable string “Unknown” but then being treated like an actual version string, which we fail to parse.
- It’s a problem that this user’s site has no version info.
- It’s a bug that in this case, update.module now does fatal errors, instead of gracefully handling the problem.
Disclaimer: it's a bug in update.module* that the error case for an unknown version string ends up as a fatal error. We should probably fix that, regardless of why your site has no version info for core.
Meanwhile, the most useful things for me to understand this would be:
- The entire contents of
core/modules/node/node.info.yml
on the site where this is happening - The
VERSION
const fromcore/lib/Drupal.php
Looking at the output posted above, I notice:
composer require drupal/redis:dev-1.x
Which means you're asking for a "dev tarball". For that case, I'd also love to see:
- The entire contents of
modules/contrib/redis/redis.info.yml
- If
modules/contrib/redis/.git
exists. Is it a git checkout?
To add another variable to the mix, if you're using a Git checkout of any part of Drupal (core or contrib), you need to use
git_deploy →
for update.module
to work. I'm less familiar with composer_deploy
.
It doesn't look like we're actually converting anything here, right? We're just adding the attribute for when to stop scanning for procedural hooks in a bunch of files. Do we actually want to do some conversion, instead? Isn't that part of the fun of having split these out into smaller issues so we can make bigger changes where needed?
Excellent work here!
After checking out the issue fork branch, there are still a ton of references to \Drupal::state()
in core/modules/block/tests/src/*
. Do we want to fix everything? I'm not sure why we're converting some to keyValue
and leaving others as state
.
Fantastic work! Great find.
Agree that the changes to ImageStylesPathAndUrlTest
look good. That much is indeed RTBC.
However, grep is finding more \Drupal::state()
in core/modules/image/tests/src/* and I'm wondering if we want to expand the scope here to fix ImageStyleFlushTest
and ImageEffectsTest
while we're at it. I don't remember seeing those randomly fail as often, but it seems like we shouldn't just do this conversion when we happen to be nailed by the trouble. I'm in favor of preemptively fixing all the tests to stop using state(). So we should probably fix more than 1 test class per issue.
This was already RTBC before it was split up. I’m busy this weekend, but hope to look on Monday to confirm this is still ready.
This was already RTBC before it was split up. I’m busy this weekend, but hope to look on Monday to confirm this is still ready.
I am drawn to the benefits of handling install separately. You make a good case that it’s unfortunate to complicate DI for the runtime / update checks when in many cases those don’t care about install checks.
So even though it’s two independent systems, it might be better DX overall to have the simplicity of the hook for runtime and update cases…
I understand about the class name with the hook approach. I’m okay with putting the right Hook
attribute on separate methods for each phase in the same ModuleRequirements
class, even if that’s in the Hook
namespace and not directly shared with the Install requirements.
I don’t mind 2 hooks (approach 1 over 2). Makes it easy to do whatever you need, and easy to share between them if we default to ModuleRequirements and methods per phase. I don’t think there’s much benefit in approach 2. Seems 1 or 3 would be preferable to 2.
I reserve the right to change my mind if Alex (or anyone) comes up with a better option 4. 😂
Thanks,
-Derek
Re #31 : Indeed, see #12 where 📌 Investigate ModuleHandler::add Active was added as related. 😉
Cool, thanks @catch.
Would a release manager be willing to:
a) Respond to comment #19 😅 - Can we really remove stuff in 11.2 that we deprecated in 11.1 for removal in 12?
b) Make a formal decision on what's happening here.
c) Remove the 'Needs release manager review' tag.
?
Also, do we need product manager review? If so, is that effectively Gabor or Lauri at this point? Should I try to ping them via Slack?
Thanks!
-Derek
I had concerns at 📌 Create hook_runtime_requirements Active but it seems more appropriate to raise them here. As usual, I find @alexpott's views compelling, and perhaps a more clear articulation of what I was worried about.
Generally, I didn't love seeing class FileRuntimeRequirements
... seems we want to move to class FileRequirements
, and have separate methods for each phase. We should be making it easier and cleaner to share code between the phases. Probably more requirements checks should be happening at multiple phases than is currently the case.
I'm not sure how common it is to need services in these checks.
Can we say that if your Requirements class needs services for update and runtime, which it can't use during install, that you have to have a service getter/setter pair, and that getContainer()
returns something valid for during those phases and NULL
during install? Tests can call the setters with mocked services. The real code will use getContainer()
or whatever.
But yeah, I think it'd be better DX overall to move from a single hook_requirements($phase)
to a single new requirements API, not 2 new hooks and a 3rd thing implemented some completely other way.
If install requirements are such a special case, and it really does make sense to handle it separately, at least I think we should unify the hook-based parts to encourage more sharing.
It's still 61 files +788 −683
. Can/should we split this up further to be easier to review? Maybe media* and system their own issues, everything else in here? I think that'd get us closer to +/- 500 here.
Glad to see the rest of this committed. Thanks for opening this as a new issue.
I’m open to splitting this further if y’all prefer. It’s big now. 😅
Resolved the thread about the module name typo. Good spot.
Thanks,
-Derek
Meanwhile, amazing work, @bbrala! Thanks so much for picking this up and running with it. 🙏 Our long nightmare of "Issue #xyz by incomprehensible, list, of, user, names, before, you, know, what, changed" is looking to soon be over! 🎉
I'm not a fan of "local tooling should solve this" as an approach. There are 1000s of maintainers on *.d.o. Telling each of them to solve this common need themselves is infeasible. Our collaboration platform handles (nearly) everything else, it should solve this problem in a general way, too.
There's no way to fully automate the credit assessment. That boils down to humans having to make decisions. So it can't all happen "automatically", anyway. If a human has to go through the issue and/or MR to decide who meaningfully contributed and twiddle a UI to record all that, that same UI can both save those results into the DB, and spit out this copy/paste block of formatted text to use for the commit message.
*.d.o definitely can and should have access to email addresses. I'd be in favor of a d.o-stored field attached to user accounts that indicates the preferred email address for commits. That looks like what ✨ Allow users to set GitLab Commit email Active is about. If not explicitly set otherwise, would default to a no-reply. But if users (like me) want to have a valid email address that we control in all our commits (and commit references), we could opt-in to something else. Then this credit UI can honor the user's preference for which email to use for Reviewed-by, Co-authored-by, etc.
Or I guess to make @smustgrave happy, NW is better. 😂 Sorry to change the status to that without explanation, but I’ll open MR threads later with details.
Thanks for this! Exciting.
I’m only looking at the MR on my phone. I have some concerns. I’ll post a thorough review later when I’m not thumb-typing.😅 But I don’t believe this is totally ready in its current state. No rush, since this isn’t happening for 11.1.x. But getting out of the RTBC queue for now so committers don’t waste time on it.
@berdir: I warmly welcome you (or anyone else) to start sketching out a plan at 📌 [pp-3] Split up and refactor system_requirements() into OOP hooks Active . I doubt we actually want to open an MR there for a bit (hence [pp-3]) but we could already start fleshing out the summary now to do what you're talking about in #32. I agree that'd be helpful work to verify the API being proposed here makes sense, which is why I already opened it, even with my concern about opening sub-issues of 📌 [pp-3] Convert hook_requirements to new classes or hook_runtime_requirements Active for every core module.
I have a scope question at
#3490845-4: [pp-3] Convert hook_requirements to new class or hook_update_requirements or hook_runtime_requirements →
on how to best split that up. However, definitely system_requirements()
will be a huge effort, so I already opened
📌
[pp-3] Split up and refactor system_requirements() into OOP hooks
Active
for it and added to #3490845. I'm actually kind of excited about that one. 😅 Maybe I'll be inspired to find time to take an initial stab at it.
Opened 📌 [pp-3] Split up and refactor system_requirements() into OOP hooks Active to track it. Adding to summary.
For scope, wondering if we really need separate issues for all of these. E.g. the one for update (status) will be a simple move to an OOP hook_runtime_requirements()
. Maybe we should group by all modules that only implement a single phase in their hook_requirements()
?
- Only needs
hook_runtime_requirements()
- Only needs
hook_update_requirements()
- Only needs the
hook_install_requirements()
class - Separate issues for each module that implements more than 1 phase
I can't wait to see system_requirements()
refactored. That's going to help so much. I might even be inspired to raise my hand to at least start on that one. ;)
Thanks for testing! Alas that it's getting harder and harder to resolve this via GitLab.
We're going to have a credit UI on new.drupal.org going forward. I wonder if it's worth adding something to that to spit out an appropriate commit message, like we have on d.o issues now? I wonder how difficult / easy that would be. Maybe easier than trying to implement it in GitLab?
Whereas:
- All feedback addressed.
- Pipeline 367282 is green.
- This is my first time experimenting with requesting changes. Even though I've got somewhat elevated perms in GitLab MRs for core as a subsystem maintainer, I can't actually resolve that request (even though I made it myself). Good to know, I won't be using that feature anymore. The committer can ignore the "Merge blocked: 1 check failed" error on the MR.
- Tweaked some formatting in the summary.
- Initial pass at saving credit.
- I don't mind RTBC'ing this, even though I pushed a trivial commit to update the formatting of the deprecation message.
Therefore, RTBC!
Thanks again,
-Derek
As usual, I believe @berdir speaks the truth. However, this need:
To clarify that, it's not the deprecation that's important, it's when it is safe to use the replacement
is not addressed by putting the exact version the deprecation was added in the messages. You need to read the CR and understand the change to know when the replacement was available, as you explain. But yes, in most cases, it is the same version. So yeah, it's hard to know what's best.
I personally tend to maintain my projects to be as compatible with legacy versions as possible. Sometimes it's impractical and we need a clean break, but often I've found it's barely any technical debt to be able to keep working with very old versions of core. I read the CR, figure out when the replacement was added, add some custom code to call the right thing via `version_compare()` and move on.
I'd be happy either way. I see the benefit of knowing the specific version the deprecation was introduced. I'd be glad to not have to push new commits to open MRs all the time to keep them valid.
Either way, it generally seems pointless to say "is removed in 12.0.0" per #19. So if we keep minor version in there, I'd vote for the middle of the options in #23:
@deprecated in drupal:11.1.0 and is removed from drupal:12. %extra-info%.
@see %cr-link%
Fix formatting bugs with deprecation messages involving __METHOD__ and __FUNCTION__ to always use `() is ...`
The functional test fails in https://git.drupalcode.org/issue/drupal-3481778/-/pipelines/367140 are random, but the fail in Unit is legit. Opened MR threads with suggestions.
Almost there, thanks!
-Derek
The CR looks much better now, thanks! Back to RTBC.
Nice! Love it. Not sure how I missed this issue, but glad to see it mentioned in Slack just now.
All my feedback is addressed. I opened 📌 Deprecate the $use_info_parser parameter to ExtensionParser::scanDirectory() Active for the followup proposed in comments 14-16.
Meanwhile, first pass at saving credits:
@alexpott for all the code.
@berdir for the issue write up and various discussions that lead to this.
@smustgrave, @daffie, @catch for reviews.
myself for reviews, metadata cleanup and opening the follow-up so this can be closed and forgotten without loose ends.
Doesn't seem like the comment from @nicxvan qualifies.
Back to RTBC.
Thanks!
-Derek
Oh, does this need a CR? I guess that'd be the only other possible thing to do here.
I read the MR changes closely, and the issue summary and comments.
@kristiaanvandeneynde makes a compelling case that RenderCacheTest
is really broken. There were already a couple of @todo comments in there about removing it. 😅
The actual change to stop the special case context for UID 1 makes sense to me. grepping core confirms that this and core/tests/Drupal/Tests/Core/Session/SuperUserAccessPolicyTest.php are the only places that mention is-super-user
. In that test, it's only used to label cases inside a data provider array, not for any actual code, assertions, etc.
I renamed the MR to be self-documenting, but otherwise, all looked great.
I don't see anything left to do here but commit it. RTBC++
Thanks!
-Derek
Thanks! Resolved 2 of the open threads.
For the last one, yeah, https://www.drupal.org/node/3490771 → needs some help:
- This is no longer true:
Warning: If you later add procedural hooks and need them to be scanned, you must delete this container parameter.
Setting hooks_converted to false will still prevent scanning, you must DELETE the parameter to re-enable scanning. - We should add something about the special non-hook hooks like hook_install() and friends. I don't actually know the gory details enough to fix it myself, but would be happy to review for clarity once done.
- The instructions for both "No procedural hooks converted to OOP hooks" and "The module still has procedural hooks" are identical, duplicate, and therefore confusing. Both cases are the same, and from the perspective of a developer reading the CR, the difference is irrelevant. The bottom line is there are still procedural hooks, regardless of if some of them have been moved or not. I think we should merge these two sections.
Once those edits are done, this is RTBC to me.
Meanwhile, saving credit for @berdir and myself for detailed reviews, and the aforementioned epic Slack thread. 😂
Opened a bunch of mostly trivial nits / suggestions. A few points of substance.
I nearly reviewed every line. I'll confess I started to glaze over and didn't completely verify that in the cases where we're moving functions around in .install or .module files that the new code is identical to the old.
Resolved all the open MR threads. Then closely reviewed the changes. Opened 3 new suggestions, 2 for pedantic nits, one with a real question about the `$use_file_cache` parameter to the constructor.
After reading the MR diff, here's a first stab at a better title and summary. Further refinements welcome.
Haven't looked at the code. But we can't be ready to commit this if the title and the summary are "Do X or Y". Which is it? 😅
Makes sense, thanks.
Do we want to remove the routes and deprecate all the underlying functions and classes in 11.2.x, then completely remove it all in 12.0.x? Or are you thinking we directly remove everything in 11.2.x?
Thanks again,
-Derek
At #3463226-25: Use the new equivalent updates API to prevent updates from 10.4.0 to 11.0.0 → , @catch raised the possibility we might want another pair of equivalent updates to prevent downgrading from 10.5.x to 11.1.x. Should we open another follow-up for that under this meta?
Thanks for working on this!
GitLab thinks this needs a rebase due to conflicts.
Meanwhile, I opened some MR threads, mostly with pedantic nits.
I bet a lot (though not all) of the trouble from update.module will go away once 📌 Deprecate/remove the ability to update a module from a URL and authorize.php Active lands. 😉
Blocker is in
We never remove API changes in a minor or patch release, right? Should it just say:
Deprecated in drupal:11 and removed in drupal:12
?
https://git.drupalcode.org/project/drupal/-/merge_requests/6290#note_423326 is about an actual (minor) bug. NW for that. I did open a bunch of other threads, mostly with suggestions, none of them blocking.
Thanks for opening this! Very helpful to be able to collect all these efforts under a single parent issue.
I'm following the protocols that we use for the coding standards committee (of which I am a member). Even though this is indeed a decided policy, we're not supposed to mark this 'fixed' until all the follow-ups exist.
I don't have time for a deep-dive on this, so for now, doing the quick/easy thing of opening an issue in coder:
📌
Enforce UpperCamelCase case values in PHP enum definitions
Active
We can decide there if that's really the best way to enforce this, and if not, move the issue to the core queue and rescope it to enable some existing sniff in the wild or whatever.
Cheers,
-Derek
Saving credit per #27
FYI: https://www.drupal.org/project/pathologic/releases/2.0.0-alpha3 → is now out, with the only change being D11 compatibility.
For clarity, the “cron-driven sudo” step that’s already supported is not via Drupal’s hook cron, which “might be triggered by any user”. I/we are talking about good ole *nix crontab, and specifically setting up the script completely outside of Drupal.
Point 2 in remaining tasks is already done. Adding links.