Merge Requests

More

Recent comments

🇺🇸United States nicxvan

I took a look, in general it looks like this is going in an interesting direction. I ran the test only job and it fails as expected.

I did not review the test.

Had a few questions.

🇺🇸United States nicxvan

I've been eyeing 📌 Extension System, Part IV: Properly register all installed extensions/namespaces during container generation Needs work because it's likely on the road to getting oop hooks in themes which will let us clean up a fair bit around preprocess.

🇺🇸United States nicxvan

I've been eyeing 📌 Extension System, Part IV: Properly register all installed extensions/namespaces during container generation Needs work because it's likely on the road to getting oop hooks in themes which will let us clean up a fair bit around preprocess.

🇺🇸United States nicxvan

I think this is ready again, I'll give @donquixote a chance to respond, but this cleans up the extensions and gives us a way to tie to documentation.

We can also add to it if we want to extend further.

🇺🇸United States nicxvan

This looks great! I have to review more closely, but this already covers the three I was reviewing.

🇺🇸United States nicxvan

I think @godot is on to something. I pushed up a test case based on the original report and could not reproduce it manually or in the test.

🇺🇸United States nicxvan

Do we still want this? How will it work when core modules are moved to contrib?

🇺🇸United States nicxvan

I think this is safe to close, there is no rollback method that is mentioned in the issue summary, a different solution was committed.

🇺🇸United States nicxvan

Is this safe to close now?

🇺🇸United States nicxvan

If I am not mistaken I think for batch we already can use methods as callbacks.

We could explicitly deprecate the procedural option or just let the .module deprecation take care of it and mention how to move them in that CR.

Still need to look at the other two.

🇺🇸United States nicxvan

This is so much cleaner! It allows the documentation to be declarative, removes the workaround in extending Hook attributes and will allow us to drop Implements hook_form_FORM_ID_alter while maintain the api links.

🇺🇸United States nicxvan

Are you able to provide a test case so we can reproduce and fix this?

🇺🇸United States nicxvan

There is something going on with the file system, all of the failures are related to that, I don't see what is missing in the conversion though.

🇺🇸United States nicxvan

nicxvan changed the visibility of the branch 11.x to hidden.

🇺🇸United States nicxvan

If we do remove this do we want to remove it from all hooks?

If I am being honest the only novel thing it provides is the ability to specify another class and method as the implementation, but I'm not sure why you'd need to do that.

As for the main reason is so you can place the attribute on the class, but then you have to have an __invoke method. Since we already have that restriction, why not drop method entirely, then if someone does not want a specially named class they use __invoke which already have to do.

🇺🇸United States nicxvan

I really like the direction this is going!

Two comments on the MR that need to be addressed then I think we can mark this as ready.

There are a few other comments, but they have been responded it in a way I think we can consider closed.

This cleans up the extensions a lot and lets us still get the documentation for the api module.

🇺🇸United States nicxvan

I think there is something to be said for keeping them close so it's easier to switch between a and I'm not sure it's that much more complex, but I don't have a super strong opinion on this.

🇺🇸United States nicxvan

I'm not sure if we want to move this to the gathering stage.

🇺🇸United States nicxvan

Constructors do not need documentation if everything is typed I think.

I agree DI should not be a blocker.

🇺🇸United States nicxvan

I think this is ready, all of my comments have been addressed and this means work all of the changes the actual registry is smaller than 11.1!

🇺🇸United States nicxvan

Also wonder why we're marking child issues as related.

I've never been super clear on the difference so I usually default to related.

As for system_requirements, I'd love to get that in, but it's massive, and I feel like the template preprocess conversions will be easier to get in.

🇺🇸United States nicxvan

Probably needs sign off for the api change.

🇺🇸United States nicxvan

We just need to keep the api module in mind, see the linked issue support for OO hooks in classes Active we need some way to tie the sub attribute to the correct hook documentation.

🇺🇸United States nicxvan

PackageManagerRequirements has some minor duplication as well.

🇺🇸United States nicxvan

Ok, I think this is ready.

I tested manually both in 11.x and this branch locally.
I tested block and view contextual links and tested with both mouse and keyboard. As far as I can tell both act exactly the same.

I searched for references to backbone, the only references remaining are for toolbar. There are no more references in contextual.

Javascript is not my forte as mentioned, but I am familiar with it, reviewing the code directly I see nothing that looks amiss.

As far as I can tell both larowlan and _nod have worked on this to a non trivial extent.

The only thing I didn't check that may be worth it is performance. I'm not super familiar with JS performance testing so I'll leave that up to a committer to determine if it's necessary.

_nod's comment in 56 make me think the change has been addressed as far as I can tell.

🇺🇸United States nicxvan

That is not true, we backported Hook to 10.4 as well so phpstan would not complain, we backported the attributes here too.

In this case the Order classes are required otherwise there would be a fatal, and since we backported Hook already we need to backport those as well.

None of the plumbing for collection or ordering was backported, why are you concerned about backporting these classes?

🇺🇸United States nicxvan

This looks great, test is more thorough and I see you managed to fix empty hook implementations not being cached at the same time!

Created 📌 Better document when to use setModuleList Active

🇺🇸United States nicxvan

support for OO hooks in classes Active is where some of the discussion happened too

🇺🇸United States nicxvan

@donquixote pointed out the missing paramter.

🇺🇸United States nicxvan

Created 📌 [10.5.x] Add BC stubs for Hook ordering. Active because creating 10.5 from here was too out of date.

🇺🇸United States nicxvan

When composer is on a different server like ci you can run into issues.

I ran into an issue a while back where I installed search api and it had a php requirement I had locally in ddev and in the CI tooling but not production so the site broke, this key would have prevented it. Most modules use hook requirements though for this a key might be easier.

🇺🇸United States nicxvan

Some things are missing in the CR and the proxy class likely needs to be regenerated.

Also had a question on the new service.

🇺🇸United States nicxvan

I did a first pass here, nothing jumped out immediately, it's pretty clever, I definitely need to run through some things to better understand some bits though.

🇺🇸United States nicxvan

This looks great, I confirmed it deprecates what it claims, all messages look right.
Confirmed the CR outlines all deprecations.
All deprecation messages look correct.

🇺🇸United States nicxvan

Added a few questions, I could do suggestions for some reason so here is a patch with the changes I was testing.

🇺🇸United States nicxvan

📌 [Plan] Determine how to deprecate procedural hooks. Active is where we discussed procedural hook deprecation.

If I am being honest I'm not sure I see how we can directly deprecate procedural hooks, it will more likely be a side effect of deprecating .module files. There just isn't a clean way to know whether a function is a hook or not. We can throw a message runtime in LegacyHook, but that seems riskier than we would want to be.

Side note, hook_module_implements_alter and hook_hook_info are also strange deprecations because we are just removing them in 12.

🇺🇸United States nicxvan

I think Don meant set module list would not have an effect.

The code in the update is not important to test around either. It is explicitly to prevent views from loading way to many things during update before certain registries can be cleaned or set up.

Module weight still should matter, there is an issue for alters and module weight we still need tests for. But this is not the issue.

🇺🇸United States nicxvan

I can roll a 10.5 specific if someone doesn't before me.

🇺🇸United States nicxvan

I think am easier way around this is to deprecate and replace the things inside the files.

.module has very few things that are required in it. We can make this oop then just deprecate .module entirely.

🇺🇸United States nicxvan

Well, hook_hook_info is now deprecated is there another way to do this?

🇺🇸United States nicxvan

I think we will likely deprecate the inclusion of .module first.

🇺🇸United States nicxvan

Is this eligible for the no test policy?

🇺🇸United States nicxvan

This can be closed as duplicate once credit is assigned.

🇺🇸United States nicxvan
ThemeHandler::rebuildThemeData()

is deprecated, can we close this?

🇺🇸United States nicxvan

Do we still want to do this?

🇺🇸United States nicxvan

I think this actually belongs in the devel module.

This definitely isn't an extension system.

Moving it to layout builder for now because the devel module doesn't support issues.

🇺🇸United States nicxvan

This one can be closed it no longer exists!

🇺🇸United States nicxvan

Since composer is the only recommended way to install can we close this?

🇺🇸United States nicxvan

It's in, I think we can close this, just not sure on credit.

🇺🇸United States nicxvan

I think we can close this.

🇺🇸United States nicxvan

There are no arrays that don't have the shape defined. After the hook ordering issue.

🇺🇸United States nicxvan

Ok I need to actually write the CR.

I'm not sure how I feel about making it protected, it is technically api now, not sure why we want to restrict this further.

I also am not sure about the deprecation message either.

🇺🇸United States nicxvan

The hook order issue and preprocess issue both got in and both affected module handler.

🇺🇸United States nicxvan

@longwave indicated we might be able to do this without tests, but the work in 🐛 HookCollectorPass registers event listeners but they do not follow the required calling convention Active makes this unnecessary I think.

🇺🇸United States nicxvan

I wonder how much this will help when you have test module discovery on.

🇺🇸United States nicxvan

Is this eligible for backport to 10.x?

I updated who the CR targets and did a quick review of the 11.x MR

🇺🇸United States nicxvan

Nightwatch fails often, you can rerun it.

As for test only, you don't usually need a separate branch, there is a test only job, it's at the bottom of the list of tests.

If you run that it will run your tests without the fix or feature.

It should fail.

🇺🇸United States nicxvan

But in general, we should always use the phpstan-like array type doc for any new array property, parameter or return we introduce.

I do not agree, but this discussion should happen in a coding standards issue.

Feel free to link one or create one if one doesn't already exist.

🇺🇸United States nicxvan

I created an MR with the fix @godotislate suggested in slack.
I'm not sure that this is really testing the fix now though since it's a new moduleHandler instance.

To be honest I'm not sure if this fix needs a test for the new bugfix policy, this will be very hard to test, it's easy to see it's missing though.

🇺🇸United States nicxvan

nicxvan changed the visibility of the branch 11.x to hidden.

🇺🇸United States nicxvan

I can merge it into a dev version

🇺🇸United States nicxvan

Sharing the modules you have installed is a good first step, we need to identify the cause so we can fix it properly.

🇺🇸United States nicxvan

Yes, I created that one for you to test with. That reverts the only change I made in this issue after your work.

🇺🇸United States nicxvan

No problem, everyone starts somewhere!

To find the actual version installed you want to look for that entry in composer.lock

            "name": "doctrine/deprecations",
            "version": "1.1.3",

composer require doctrine/deprecations:1.1.3 should work. The #support channel in drupal slack is probably a better place to get assistance.

🇺🇸United States nicxvan

Tests just started, but this should be our target, if there is a module like block_content that only has template_preprocess we can take care of it in that issue.

Production build 0.71.5 2024