Преглед изворни кода

[EventDispatcher] Removed temporary code

Jordi Boggiano пре 14 година
родитељ
комит
ba8758b4c2

+ 1 - 8
src/Symfony/Bundle/FrameworkBundle/Debug/TraceableEventDispatcher.php

@@ -76,14 +76,7 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
     protected function doDispatch($listeners, $eventName, Event $event)
     {
         foreach ($listeners as $listener) {
-            // TODO: remove this before final release, temporary transitional code
-            if (is_object($listener) && method_exists($listener, $eventName)) {
-                $listener->$eventName($event);
-                trigger_error('Event listeners should now be registered using a complete callback as the listener instead of just an instance. Adjust your code ASAP.', E_USER_DEPRECATED);
-            } else {
-                // only this call should remain
-                call_user_func($listener, $event);
-            }
+            call_user_func($listener, $event);
 
             $info = $this->getListenerInfo($listener, $eventName);
 

+ 1 - 9
src/Symfony/Component/EventDispatcher/EventDispatcher.php

@@ -163,15 +163,7 @@ class EventDispatcher implements EventDispatcherInterface
     protected function doDispatch($listeners, $eventName, Event $event)
     {
         foreach ($listeners as $listener) {
-            // TODO: remove this before final release, temporary transitional code
-            if (is_object($listener) && method_exists($listener, $eventName)) {
-                $listener->$eventName($event);
-                //trigger_error('Event listeners should now be registered using a complete callback as the listener instead of just an instance. Adjust your code ASAP.', E_USER_DEPRECATED);
-            } else {
-                // only this call should remain
-                call_user_func($listener, $event);
-            }
-
+            call_user_func($listener, $event);
             if ($event->isPropagationStopped()) {
                 break;
             }