mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 12:14:02 +01:00
Fixed Contributte events namespaces and added missing
This commit is contained in:
parent
a486f7fdbb
commit
678905bba2
@ -40,29 +40,70 @@ final class RenameEventNamesInEventSubscriberRector extends AbstractRector
|
||||
* @var string[][]
|
||||
*/
|
||||
private $netteClassConstToSymfonyClassConstMap = [
|
||||
'Contributte\Events\Extra\Event\Application::NAME' => ['Symfony\Component\HttpKernel\KernelEvents', 'REQUEST'],
|
||||
'Contributte\Events\Extra\Event\ShutdownEvent::NAME' => [
|
||||
'Contributte\Events\Extra\Event\Application\StartupEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'REQUEST',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\PresenterShutdownEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'TERMINATE',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\RequestEvent::NAME' => ['Symfony\Component\HttpKernel\KernelEvents', 'REQUEST'],
|
||||
'Contributte\Events\Extra\Event\PresenterEvent::NAME' => [
|
||||
'Contributte\Events\Extra\Event\Application\RequestEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'REQUEST',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\PresenterEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\PresenterStartupEvent::NAME' => [
|
||||
'Contributte\Events\Extra\Event\Application\PresenterStartupEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\PresenterShutdownEvent::NAME' => [
|
||||
'Contributte\Events\Extra\Event\Application\PresenterShutdownEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\ResponseEvent::NAME' => [
|
||||
'Contributte\Events\Extra\Event\Application\ResponseEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'RESPONSE',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\ErrorEvent::NAME' => ['Symfony\Component\HttpKernel\KernelEvents', 'EXCEPTION'],
|
||||
'Contributte\Events\Extra\Event\Application\ErrorEvent::NAME' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'EXCEPTION',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_STARTUP' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'REQUEST',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_SHUTDOWN' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'TERMINATE',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_REQUEST' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'REQUEST',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_PRESENTER' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_PRESENTER_STARTUP' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_PRESENTER_SHUTDOWN' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'CONTROLLER',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_RESPONSE' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'RESPONSE',
|
||||
],
|
||||
'Contributte\Events\Extra\Event\Application\ApplicationEvents::ON_ERROR' => [
|
||||
'Symfony\Component\HttpKernel\KernelEvents',
|
||||
'EXCEPTION',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Rector\NetteToSymfony\Tests\Rector\ClassMethod\RenameEventNamesInEventSubscriberRector\Fixture;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Contributte\Events\Extra\Event\PresenterStartupEvent;
|
||||
use Contributte\Events\Extra\Event\Application\PresenterStartupEvent;
|
||||
|
||||
final class SomeClass implements EventSubscriberInterface
|
||||
{
|
||||
@ -11,7 +11,7 @@ final class SomeClass implements EventSubscriberInterface
|
||||
{
|
||||
return [
|
||||
'nette.application.startup' => 'someMethod',
|
||||
\Contributte\Events\Extra\Event\Application::NAME => 'someMethod',
|
||||
\Contributte\Events\Extra\Event\Application\StartupEvent::NAME => 'someMethod',
|
||||
PresenterStartupEvent::NAME => 'someMethod',
|
||||
];
|
||||
}
|
||||
@ -24,7 +24,7 @@ final class SomeClass implements EventSubscriberInterface
|
||||
namespace Rector\NetteToSymfony\Tests\Rector\ClassMethod\RenameEventNamesInEventSubscriberRector\Fixture;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Contributte\Events\Extra\Event\PresenterStartupEvent;
|
||||
use Contributte\Events\Extra\Event\Application\PresenterStartupEvent;
|
||||
|
||||
final class SomeClass implements EventSubscriberInterface
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user