Drupal version

Drupal 9

Drupal Rector version

0.12.2

Problem / Motivation

The @param is correctly replaced but the param strict tiping is full namespaced. It should add a use statement.

    * Until the News page is ready we temporarily redirect to the search page.
    * This way our users can already find the news they are looking for.
    *
-   * @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
+   * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
    *   Response event.
    */
-  public function onKernelRequest(GetResponseEvent $event) {
+  public function onKernelRequest(\Symfony\Component\HttpKernel\Event\RequestEvent $event) {
     // Retrieve the request path, and do inbound processing so that language
     // prefixes are removed.
     $request = $event->getRequest();

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

It seems to be an upstream Rector issue. If I run PHPCBF after, this is fixed.

claudiu.cristea’s picture

Title: Wong handling of Event namespace » Wrong handling of Event namespace
Status: Active » Closed (works as designed)

Closed as is easily fixable by running PHPCBF after rector