Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AndyF created an issue. See original summary.

AndyF’s picture

Status: Active » Needs review
FileSize
6.14 KB

Thanks

dawehner’s picture

  1. +++ b/src/Plugin/Condition/Domain.php
    @@ -0,0 +1,118 @@
    +    $this->configuration['domains'] = implode("\n", $domains);
    

    Is there a reason we couldn't store a list of domains instead of store them as a string?

  2. +++ b/tests/src/Kernel/DomainTest.php
    @@ -0,0 +1,82 @@
    +class DomainTest extends KernelTestBase {
    

    Kudos for writing a test!

dawehner’s picture

It also sounds like we are missing some config dependency change missing.

AndyF’s picture

@dawehner thanks for the review!

Is there a reason we couldn't store a list of domains instead of store them as a string?

Not really, it's a hangover from basing it on \Drupal\system\Plugin\Condition\RequestPath. I've updated it.

It also sounds like we are missing some config dependency change missing.

Done, thanks!

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This looks great for me!

thalles’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
556 bytes
6.48 KB

Follow the patch!

thalles’s picture

Follow the new patch!

Status: Needs review » Needs work
thalles’s picture

Status: Needs work » Needs review
FileSize
1.81 KB
7.32 KB

Follow the patch!

AndyF’s picture

Thanks! And one last bit of follow-up cleaning: if splitting an array over multiple lines, each element should be on a separate one. If the tests run green I think this can be moved back to RTBC as the changes since #5 are small.

@thalles For what it's worth, I find the phrase "follow the patch" a little meaningless - from my PoV it would be great to describe what you're doing and why when updating an issue - but thanks for your time and attention!

AndyF’s picture

Status: Needs review » Reviewed & tested by the community

Moving to RTBC per #5, see interdiff_5-10.txt and interdiff_10-11.txt which just include a typehint for the request stack and a couple of code formatting touch-ups.

Thanks!

thalles’s picture

Thanks @AndyF!

joelpittet’s picture

Status: Reviewed & tested by the community » Closed (works as designed)

I don't think I'd like to add this to ctools as it seems a narrow case but I encourage you to add a ctools_domain module.