Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2023 at 08:41 UTC
Updated:
11 Aug 2023 at 07:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mondrakeComment #3
andypostLooks a good place to apply variadics!
It could use CR to notify module developers
Comment #4
catchThis looks like a good plan to me, and good to start using this technique for other issues eventually too.
Comment #5
smustgrave commentedThanks @catch and @andypost
Moving to NW for the change record mentioned in #3
Can mark after that.
Comment #8
mondrakeChanged to MR worflow.
Comment #9
mondrakeDid not mean to change status.
Comment #10
mondrakeAdded draft CR, https://www.drupal.org/node/3376455
Comment #11
longwaveDoes the class name need to be fully qualified here?
In the case that someone has extended FormBuilder as
\Drupal\custom_module\FormBuilderand swapped it in (or even\Drupal\custom_module\CustomFormBuilder), I think this will match and accidentally skip the deprecation? We don't always add tests for this sort of thing any more, but this is new (to us) so maybe we should here.Comment #12
mondrakeDone
Comment #13
smustgrave commentedWith CR added think this is good to add for 10.2
Comment #15
longwaveCommitted 29dc14b and pushed to 11.x. Thanks!
Also published the change record. This seems to be the only sane way to add new arguments to interfaces, so let's hope we don't run into any problems with it.
Comment #17
larowlanHi 👋
If the deprecation is ignored, will contrib and custom projects see it?
Thanks
Comment #18
mondrake#17 well for sure if a custom/contrib class implements the interface, without the to-be signature, then the DebugClassLoader will throw the deprecation.
What I'm not sure about is what happens when a custom/contrib class extends a core base class that's ignored (e.g.
Drupal\Core\Form\FormBuilder).Comment #19
mondrakeRe #18, it looks like that works. See test patch attached.
Comment #20
larowlanthanks!
Comment #21
longwaveThat's why I asked for the fully qualified class name in #11, as we can't implement this change in the core implementation yet, but all other users of the interface should be notified.
Comment #22
mondrakeFiled #3377356: Make DebugClassLoader ignored deprecations more accurate for a possible follow-up.
Comment #23
catchI missed the last week of progress here, but really nice to see this land and the first ever time we've been able to do this with the debug classloader doing what it's supposed to do!