Problem/Motivation

Follow-up to #3299853: Apply #[\AllowDynamicProperties] attribute to base classes to make PHP 8.2 log size sane from #3309748-4: Define missing object properties on non-testing classes for PHP 8.2

We can apply 4 attributes to prevent contrib testing bloating CI logs

Lots of plugins has undefined properties so having #[\AllowDynamicProperties] can help it silence out

Proposed resolution

Apply #[\AllowDynamicProperties] attribute to following classes and add follow-ups to #3299855: [META] Get rid of #[\AllowDynamicProperties] attribute

Remaining tasks

- discuss possible side effects (for ex. inability to get deprecation warnings because attribute applied to base class)
- agree and commit with backport to 9.5

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

no

Comments

andypost created an issue. See original summary.

andypost’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB

Maybe ViewsExecutable could be fixed but not sure we allowed to add properties at the stage of release

catch’s picture

I think this is a good idea, we can try to remove it again later.

One thing I'm not clear on - is this attribute 'permanent' in PHP or is it also going to be deprecated later? But if we have an active effort to clean this up over time that might not matter by the time we get there anyway.

andypost’s picture

StatusFileSize
new1.42 KB
new2.2 KB

Let's see how many pass with this way

berdir’s picture

> One thing I'm not clear on - is this attribute 'permanent' in PHP or is it also going to be deprecated later? But if we have an active effort to clean this up over time that might not matter by the time we get there anyway.

Replied in slack already, I think that's an open discussion, original plan was AFAIK that it is is a BC layer. We do already have a meta issue to remove them.

andypost’s picture

StatusFileSize
new1.91 KB

Let's see how many failures will left after #3309748-11: Define missing object properties on non-testing classes for PHP 8.2

Very probably we should add attribute to ViewUI as well

andypost’s picture

StatusFileSize
new365 bytes
new2.55 KB
berdir’s picture

Status: Needs review » Reviewed & tested by the community

  • catch committed cd3902b on 10.0.x
    Issue #3311383 by andypost, Berdir: Apply #[\AllowDynamicProperties]...
  • catch committed 0f5ce77 on 9.5.x
    Issue #3311383 by andypost, Berdir: Apply #[\AllowDynamicProperties]...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.1.x and cherry-picked back through to 9.5.x, thanks!

  • catch committed f7e9cbb on 10.1.x
    Issue #3311383 by andypost, Berdir: Apply #[\AllowDynamicProperties]...
andypost’s picture

berdir’s picture

> through to 9.5.x

Note that we actually didn't backport a bunch of PHP 8.2 changes, including specifically #3299853: Apply #[\AllowDynamicProperties] attribute to base classes to make PHP 8.2 log size sane, not sure if you want to do that still.

catch’s picture

I had sort of given up on PHP 8.2 compatibility in Drupal 9, but it is looking like we might get close, if not all the way there. Went ahead and backported that one.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.