Problem/Motivation
When running performance tests with OpenTelemetry enabled, the Symfony debug autoloader triggers deprecation message for the possibility that PHP will add return types to ArrayAccess. These aren't triggered in regular pipelines because the actual OpenTelemetry sending code doesn't run for those - depends on an environment variable.
We can just add them to the deprecation skip list.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3475533
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3475533-suppress-symfony-debug
changes, plain diff MR !9541
Comments
Comment #3
catchComment #4
smustgrave commentedSeems straight forward.
Comment #5
mondrakeOne inline comment
Comment #6
catchReplied to the comment - I think it's correct as-is.
Comment #7
mondrakeFair point, this is a PHP native class.
BTW I am now curious to understand from where the DebugClassloader is getting the potential typehint given it’s not in an annotation of a .php file. I will dig a bit.
Comment #8
mondrakeWhat is the class/method that is causing the deprecation, though? I tried removing the return types from the ArrayAccess implementation methods in
Drupal\Core\Template\Attributeand run locally theDrupal\Tests\Core\Template\AttributeTesttest, but it does not trigger in that case.Comment #9
catch@mondrake it's in the OpenTelemetry code base, not Drupal:
https://git.drupalcode.org/project/drupal/-/jobs/2818033
Comment #10
mondrakeOK but then this is an indirect deprecation, and I would suggest to add the ignore a bit below in the apposite section
Comment #11
mondrakeWith symfony/phpunit-bridge we could skip indirect deprecations; with our replacement not, at least as-is.
Comment #12
catchThat's a good idea, hadn't even noticed that section...
Made a commit for this, but for whatever reason I can't currently reproduce the deprecation notice running tests locally so not properly tested yet.
Comment #13
mondrakeTest failures seem random to me.
Would be good to run the performance tests, but I cannot trigger them manually.
Comment #14
catchKicked off a run with the OTEL_COLLECTOR environment variable set, which should be close/identical to the scheduled job.
https://git.drupalcode.org/project/drupal/-/jobs/2818376
Comment #15
mondrakeThanks
Comment #16
quietone commentedAll questions have been answered. I have updated credit.
Comment #17
larowlanRequeued pipeline
Comment #20
larowlanCommitted to 11.x - does this need a backport?
Comment #21
smustgrave commentedWith 7 months of no follow up going to say it didn’t need to be backporter?