-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[EventDispatcher] Add Drupal EventDispatcher #12521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+802
−0
Closed
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ec5e904
Add Drupal EventDispatcher
znerol 84c54d8
Fix namespace, apply patch from CS fixer tool
znerol eb07cb9
Rename DrupalEventDispatcher to CompiledEventDispatcher
znerol 973b0d3
Use camel-case for variable names, initialize $unsorted on declaratio…
znerol 2548230
Add test covering the EventDispatcherInterface part of CompiledEventD…
znerol 56d8ce5
Add support for tagged listeners to CompiledRegisterListenersPass
znerol 002cf8b
Use camel-case for variable names
znerol 2e39ed6
Add test coverage for CompiledRegisterListenersPass
znerol a2cd250
Complete test coverage for CompiledEventDispatcher
znerol 60845da
Fix colliding mock subscriber classes
znerol 3a4f177
PHP 5.3 does not support callables in array($object, $method) form
znerol 273a397
Fix coding style
znerol 02d84f7
Fix docs on compiled event dispatcher
znerol 0150640
Use private visibility for instance variables
d0f986d
Fix codestyle as suggested by @stof
znerol 0bee27f
Use string keys for service definition
znerol 9a9b31c
Replicate #13293
znerol b4f56ab
Fix code style
znerol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix colliding mock subscriber classes
- Loading branch information
commit 60845da0c60db3fec7e3c2d4b7407990b72855b9
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\EventDispatcher\DependencyInjection\CompiledRegisterListenersPass; | ||
|
||
class CompiledCompiledRegisterListenersPassTest extends \PHPUnit_Framework_TestCase | ||
class CompiledRegisterListenersPassTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testPassAddsConstructorArgument() { | ||
$container = new ContainerBuilder(); | ||
|
@@ -32,7 +32,7 @@ public function testPassAddsTaggedListenersAndSubscribers() { | |
$container = new ContainerBuilder(); | ||
$definition = $container->register('event_dispatcher', 'stdClass'); | ||
|
||
$container->register('test_subscriber', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService') | ||
$container->register('test_subscriber', 'Symfony\Component\EventDispatcher\Tests\DependencyInjection\CompiledSubscriberService') | ||
->addTag('kernel.event_subscriber'); | ||
|
||
$container->register('test_listener', 'stdObject') | ||
|
@@ -138,7 +138,7 @@ public function testAbstractEventListener() | |
} | ||
} | ||
|
||
class SubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface | ||
class CompiledSubscriberService implements \Symfony\Component\EventDispatcher\EventSubscriberInterface | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should add a use statement |
||
{ | ||
public static function getSubscribedEvents() | ||
{ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we don't use @coversDefaultClass and @Covers ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use those annotations. You can find some
@covers
ones but those were added a long time ago.