Problem/Motivation
There's todo in codebase pointing there
It was added because core required PHP < 5.4 before and can't use RecursiveCallbackFilterIterator
https://git.drupalcode.org/project/drupal/-/blob/9.1.x/core/lib/Drupal/C...
* @todo Use RecursiveCallbackFilterIterator instead of the $acceptTests
* parameter forwarding once PHP 5.4 is available.
* https://www.drupal.org/node/2532228
Proposed resolution
Use iterator to filter tests instead of separate method (needs to detail)
Remaining tasks
patch, review, commit
User interface changes
no
API changes
TBD
Data model changes
no
Release notes snippet
no
| Comment | File | Size | Author |
|---|
Issue fork drupal-2532228
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:
- 2532228-use-recursivecallbackfilteriterator-instead
changes, plain diff MR !4312
Comments
Comment #2
markdorisonComment #3
dawehnerLet's see whether this works.
I left
\Drupal\Core\Extension\Discovery\RecursiveExtensionFilterIteratorin for now, maybe someone used to use it in some other context. For the new class I tagged it with@internal, because its really just a detail.Comment #5
markhalliwellComment #11
berdirStill applied with git apply -3, just a reroll.
Comment #12
andypostComment #15
neclimdulRelating blacklist property changes. Will need a reroll and updates after it lands.
Comment #16
andypostupdated IS, re-queued last patch
Comment #17
andypostComment #22
longwaveParenting this under the PHP 8.1 meta, we definitely no longer support PHP 5.3 :)
Comment #23
andypostrework patch a bit
Comment #24
quietone commentedThis is just a reroll.
Comment #25
smustgrave commentedSeems to be having some build issues. Not seen that one before.
Comment #26
andypostUpdate for 10.1 and added deprecation test, locally it works))
Comment #27
andypostsomething is wrong, 7 tests failed
https://dispatcher.drupalci.org/job/drupal_patches/167702/testReport/
Comment #28
andypostThis way it pass locally
Drupal\Tests\Core\Database\DatabaseTestand more inline with previous implementationComment #29
andypostAnd a bit of clean-up
Comment #31
smustgrave commentedDeprecation test looks good.
Think this would need it's own change record though. https://www.drupal.org/node/3162143 doesn't appear to address what's happening here.
Comment #32
andypostAdded CR https://www.drupal.org/node/3343023
Comment #33
smustgrave commentedLightning speed!
Changes look good to me.
Comment #35
smustgrave commentedRandom ckeditor triggering tests again.
Comment #37
andypostRequeued
Comment #38
quietone commentedDoing RTBC queue triage.
The change record should have more detail. A before and after section with a code example is usually included for deprecations to help the developer. Adding tag.
Shall we type hint $accept_tests.
The deprecation style done here is for Abstract classes, interfaces, traits, and classes with a private constructor but the constructor is not private. I think this should be using the style for concrete classes.
I did not do a thorough review of the code.
Comment #40
spokjeComment #42
spokjeUpdated CR, switched to MR-workflow (note: first commit was a straight-up reroll of patch #32), type-hinted the living daylights out of all and everything and switched to the recommended deprecation-through-constructor.
I think I've addressed all concerns raised by @quietone in #38, so put this on NR.
Comment #43
spokjeComment #44
smustgrave commentedDeprecation looks good and CR has the requested before/after section so moving back to RTBC.
Comment #45
longwaveSome nitpicky comments, but I think we can perhaps remove the
acceptTests()method entirely and simplify this a bit.Comment #46
spokjeComment #47
spokjeThanks @longwave, resolved all threads.
Comment #48
smustgrave commentedSeems the threads by @longwave have been resolved.
Comment #49
longwaveCommitted c343195 and pushed to 11.x. Thanks!
Also published the change record.