Skip to content
Snippets Groups Projects
Verified Commit 56e9f8a8 authored by Dave Long's avatar Dave Long
Browse files

Issue #2366129 by andypost, stefan.r, smustgrave, vacho:...

Issue #2366129 by andypost, stefan.r, smustgrave, vacho: RegisterStreamWrappersPass and other have broken compiler pass for multiple tags
parent 885932a2
No related branches found
No related tags found
9 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest,!6720Revert "Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave:...
Pipeline #97412 passed with warnings
Pipeline: drupal

#97416

    ......@@ -20,11 +20,18 @@ public function process(ContainerBuilder $container) {
    $stream_wrapper_manager = $container->getDefinition('stream_wrapper_manager');
    foreach ($container->findTaggedServiceIds('stream_wrapper') as $id => $attributes) {
    foreach ($container->findTaggedServiceIds('stream_wrapper') as $id => $tags) {
    $class = $container->getDefinition($id)->getClass();
    $scheme = $attributes[0]['scheme'];
    $stream_wrapper_manager->addMethodCall('addStreamWrapper', [$id, $class, $scheme]);
    // Loop through all the tags for this stream wrapper as we may have
    // multiple schemes.
    foreach ($tags as $attributes) {
    $scheme = $attributes['scheme'];
    $stream_wrapper_manager->addMethodCall('addStreamWrapper', [
    $id,
    $class,
    $scheme,
    ]);
    }
    }
    }
    ......
    ......@@ -15,3 +15,8 @@ services:
    class: Drupal\file_test\StreamWrapper\DummyExternalReadOnlyWrapper
    tags:
    - { name: stream_wrapper, scheme: dummy-external-readonly }
    stream_wrapper.dummy_multiple:
    class: Drupal\file_test\StreamWrapper\DummyMultipleStreamWrapper
    tags:
    - { name: stream_wrapper, scheme: dummy1 }
    - { name: stream_wrapper, scheme: dummy2 }
    <?php
    namespace Drupal\file_test\StreamWrapper;
    /**
    * Helper class for testing the stream wrapper registry.
    *
    * Dummy stream wrapper implementation (dummy1://, dummy2://).
    */
    class DummyMultipleStreamWrapper extends DummyStreamWrapper {}
    ......@@ -324,6 +324,8 @@ public function testModuleStreamWrappers() {
    file_exists('dummy://');
    $stream_wrappers = \Drupal::service('stream_wrapper_manager')->getWrappers();
    $this->assertTrue(isset($stream_wrappers['dummy']));
    $this->assertTrue(isset($stream_wrappers['dummy1']));
    $this->assertTrue(isset($stream_wrappers['dummy2']));
    }
    /**
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment