make test Symfony back and forth compatible

This commit is contained in:
Tomas Votruba 2019-06-05 17:45:09 +02:00
parent f6cfcfa1d1
commit 4a3fee7223
2 changed files with 4 additions and 1 deletions

View File

@ -4,11 +4,13 @@ namespace Rector\Symfony\Tests\Rector\MethodCall\MakeDispatchFirstArgumentEventR
use Rector\Symfony\Tests\Rector\MethodCall\MakeDispatchFirstArgumentEventRector\Source\CustomEvent;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Contracts\EventDispatcher\Event;
class KeepStringEventConstant
{
public function run(EventDispatcher $eventDispatcher)
{
/** @var Event|CustomEvent $customEvent */
$customEvent = new CustomEvent();
$eventDispatcher->dispatch(CustomEvent::NAME, $customEvent);
}
@ -27,6 +29,7 @@ class KeepStringEventConstant
{
public function run(EventDispatcher $eventDispatcher)
{
/** @var Event|CustomEvent $customEvent */
$customEvent = new CustomEvent();
$eventDispatcher->dispatch($customEvent, CustomEvent::NAME);
}

View File

@ -17,4 +17,4 @@ parameters:
php_version_features: '7.1'
services:
Rector\CodingStyle\Rector\Namespace_\ImportFullyQualifiedNamesRector: ~
# Rector\CodingStyle\Rector\Namespace_\ImportFullyQualifiedNamesRector: ~