I'm using Rector to migrate a project from Symfony 4.2 to 4.3. Thank you for this great tool.
Here is one strange result (I stripped down useless lines) :
---------- begin diff ----------
--- Original
+++ New
@@ -6,7 +6,7 @@
-use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
+use \Symfony\Component\HttpKernel\Event\ExceptionEvent;
class ExceptionSubscriber implements EventSubscriberInterface
@@ -39,11 +39,11 @@
}
/**
- * @param GetResponseForExceptionEvent $event
+ * @param \Symfony\Contracts\EventDispatcher\Event $event
*/
- public function processException(GetResponseForExceptionEvent $event): void
+ public function processException(\Symfony\Component\HttpKernel\Event\ExceptionEvent $event): void
{
$this->logger->error($event->getException()->getMessage(), [
----------- end diff -----------
Applied rectors:
* Rector\Rector\Class_\RenameClassRector
Rector suggests ExceptionEvent in method signature, but Event in doc block.
Then my IDE complains about PHPdoc not being in sync with method signature.
In my case ExceptionEvent is right, Event being too generic (I need $event->getException()).
I'm using Rector to migrate a project from Symfony 4.2 to 4.3. Thank you for this great tool.
Here is one strange result (I stripped down useless lines) :
Rector suggests
ExceptionEventin method signature, butEventin doc block.Then my IDE complains about PHPdoc not being in sync with method signature.
In my case
ExceptionEventis right,Eventbeing too generic (I need$event->getException()).