update 1.0.8.0
Commits for version update
This commit is contained in:
@@ -97,9 +97,13 @@ class RegisterListenersPass implements CompilerPassInterface
|
||||
|
||||
// We must assume that the class value has been correctly filled, even if the service is created by a factory
|
||||
$class = $container->getParameterBag()->resolveValue($def->getClass());
|
||||
|
||||
$interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
|
||||
|
||||
if (!is_subclass_of($class, $interface)) {
|
||||
if (!class_exists($class, false)) {
|
||||
throw new \InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface));
|
||||
}
|
||||
|
||||
|
2
vendor/symfony/event-dispatcher/Event.php
vendored
2
vendor/symfony/event-dispatcher/Event.php
vendored
@@ -37,7 +37,7 @@ class Event
|
||||
*
|
||||
* @see Event::stopPropagation()
|
||||
*
|
||||
* @return bool Whether propagation was already stopped for this event.
|
||||
* @return bool Whether propagation was already stopped for this event
|
||||
*/
|
||||
public function isPropagationStopped()
|
||||
{
|
||||
|
@@ -161,9 +161,9 @@ class EventDispatcher implements EventDispatcherInterface
|
||||
* This method can be overridden to add functionality that is executed
|
||||
* for each listener.
|
||||
*
|
||||
* @param callable[] $listeners The event listeners.
|
||||
* @param string $eventName The name of the event to dispatch.
|
||||
* @param Event $event The event object to pass to the event handlers/listeners.
|
||||
* @param callable[] $listeners The event listeners
|
||||
* @param string $eventName The name of the event to dispatch
|
||||
* @param Event $event The event object to pass to the event handlers/listeners
|
||||
*/
|
||||
protected function doDispatch($listeners, $eventName, Event $event)
|
||||
{
|
||||
@@ -178,7 +178,7 @@ class EventDispatcher implements EventDispatcherInterface
|
||||
/**
|
||||
* Sorts the internal list of listeners for the given event by priority.
|
||||
*
|
||||
* @param string $eventName The name of the event.
|
||||
* @param string $eventName The name of the event
|
||||
*/
|
||||
private function sortListeners($eventName)
|
||||
{
|
||||
|
@@ -26,7 +26,7 @@ interface EventDispatcherInterface
|
||||
* @param string $eventName The name of the event to dispatch. The name of
|
||||
* the event is the name of the method that is
|
||||
* invoked on listeners.
|
||||
* @param Event $event The event to pass to the event handlers/listeners.
|
||||
* @param Event $event The event to pass to the event handlers/listeners
|
||||
* If not supplied, an empty Event instance is created.
|
||||
*
|
||||
* @return Event
|
||||
@@ -49,7 +49,7 @@ interface EventDispatcherInterface
|
||||
* The subscriber is asked for all the events he is
|
||||
* interested in and added as a listener for these events.
|
||||
*
|
||||
* @param EventSubscriberInterface $subscriber The subscriber.
|
||||
* @param EventSubscriberInterface $subscriber The subscriber
|
||||
*/
|
||||
public function addSubscriber(EventSubscriberInterface $subscriber);
|
||||
|
||||
|
28
vendor/symfony/event-dispatcher/GenericEvent.php
vendored
28
vendor/symfony/event-dispatcher/GenericEvent.php
vendored
@@ -37,8 +37,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Encapsulate an event with $subject and $args.
|
||||
*
|
||||
* @param mixed $subject The subject of the event, usually an object.
|
||||
* @param array $arguments Arguments to store in the event.
|
||||
* @param mixed $subject The subject of the event, usually an object
|
||||
* @param array $arguments Arguments to store in the event
|
||||
*/
|
||||
public function __construct($subject = null, array $arguments = array())
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Getter for subject property.
|
||||
*
|
||||
* @return mixed $subject The observer subject.
|
||||
* @return mixed $subject The observer subject
|
||||
*/
|
||||
public function getSubject()
|
||||
{
|
||||
@@ -59,9 +59,9 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Get argument by key.
|
||||
*
|
||||
* @param string $key Key.
|
||||
* @param string $key Key
|
||||
*
|
||||
* @return mixed Contents of array key.
|
||||
* @return mixed Contents of array key
|
||||
*
|
||||
* @throws \InvalidArgumentException If key is not found.
|
||||
*/
|
||||
@@ -77,8 +77,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Add argument to event.
|
||||
*
|
||||
* @param string $key Argument name.
|
||||
* @param mixed $value Value.
|
||||
* @param string $key Argument name
|
||||
* @param mixed $value Value
|
||||
*
|
||||
* @return GenericEvent
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Set args property.
|
||||
*
|
||||
* @param array $args Arguments.
|
||||
* @param array $args Arguments
|
||||
*
|
||||
* @return GenericEvent
|
||||
*/
|
||||
@@ -116,7 +116,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* Has argument.
|
||||
*
|
||||
* @param string $key Key of arguments array.
|
||||
* @param string $key Key of arguments array
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* ArrayAccess for argument getter.
|
||||
*
|
||||
* @param string $key Array key.
|
||||
* @param string $key Array key
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
@@ -142,8 +142,8 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* ArrayAccess for argument setter.
|
||||
*
|
||||
* @param string $key Array key to set.
|
||||
* @param mixed $value Value.
|
||||
* @param string $key Array key to set
|
||||
* @param mixed $value Value
|
||||
*/
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
@@ -153,7 +153,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* ArrayAccess for unset argument.
|
||||
*
|
||||
* @param string $key Array key.
|
||||
* @param string $key Array key
|
||||
*/
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
@@ -165,7 +165,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
|
||||
/**
|
||||
* ArrayAccess has argument.
|
||||
*
|
||||
* @param string $key Array key.
|
||||
* @param string $key Array key
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -28,7 +28,7 @@ class ImmutableEventDispatcher implements EventDispatcherInterface
|
||||
/**
|
||||
* Creates an unmodifiable proxy for an event dispatcher.
|
||||
*
|
||||
* @param EventDispatcherInterface $dispatcher The proxied event dispatcher.
|
||||
* @param EventDispatcherInterface $dispatcher The proxied event dispatcher
|
||||
*/
|
||||
public function __construct(EventDispatcherInterface $dispatcher)
|
||||
{
|
||||
|
Reference in New Issue
Block a user