Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow-up from https://www.drupal.org/node/2572699#comment-12271753.
The line:
for ($id = $original_id; $container->hasAlias($id); $id = (string) $container->getAlias($id));
should be more readable.
Comment | File | Size | Author |
---|---|---|---|
#10 | 2911498_10.patch | 988 bytes | Mile23 |
#10 | interdiff.txt | 749 bytes | Mile23 |
#7 | 2911498_7.patch | 1.42 KB | Mile23 |
Comments
Comment #2
dawehnerCan you explain why this is confusing for you? For me this is a normal for loop.
Comment #3
mfernea CreditAttribution: mfernea at AmeXio commentedI guess the problem is that the loop doesn't have a body.
As mentioned in the issues summary this is a follow-up on @catch's request as
Comment #4
dawehnerAh I see, this makes more sense. Thank you for the clarification.
Just a random idea ..., this could be a while loop inside a helper method ... I think this would make things clearer.
Comment #6
Mile23We're moving this file around in #2907169: Break KernelTestBase dependency on Simpletest, deprecate stub BC traits
Comment #7
Mile23A patch. Includes updates to the class docblock.
Comment #8
borisson_This is a lot more readable, great work here!
Comment #9
alexpottThis is not quite right. It calls a test method's containerBuild method when a container is being built. It does not trigger a rebuild. Also this only makes sense in a KernelTestBase as this class could never affect the site under test.
Comment #10
Mile23OK. We'll split the difference, literally.
Reverted the docblock update and filed #2953098: Split TestServiceProvider into two service providers so that we can further separate the side-effects and prepare for simpletest deprecation.
Comment #12
Mile23Setting to NR after testbot hiccup.
Comment #13
borisson_Back to rtbc, this is more readable and the part of the patch that @alexpott had issues with is removed.
Comment #15
alexpottUpdating issue credit for comments that affected the patch. Also crediting @catch since this tidy up was @catch's idea.
Comment #16
alexpottCommitted c7b8d93 and pushed to 8.6.x. Thanks!