Problem/Motivation

Drupal 9 is coming and we need to prepare module to be compatible with it.

vendor/bin/rector process modules/contrib/jsonapi_explorer --dry-run
Rector 0.8.x-dev@80f429b
Config file: rector.yml

 6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

1 file with changes
===================

1) modules/contrib/jsonapi_explorer/jsonapi_explorer.module

    ---------- begin diff ----------
--- Original
+++ New
@@ -1,10 +1,11 @@
 <?php

+use Drupal\Core\Url;
 function jsonapi_explorer_form_jsonapi_settings_alter(&$form) {
   if (\Drupal::currentUser()->hasPermission('use the jsonapi explorer')) {
     global $base_url;
     \Drupal::messenger()->addStatus(t('Explore your API by <a href=":href" target="_blank">visiting the explorer!</a>', [
-      ':href' => \Drupal\Core\Url::fromRoute('jsonapi_explorer.app.index', [], [
+      ':href' => Url::fromRoute('jsonapi_explorer.app.index', [], [
         'query' => [
           'location' => $base_url,
         ],
    ----------- end diff -----------



 [OK] Rector is done! 1 file would have changed (dry-run).

Comments

dmitry.korhov created an issue. See original summary.

dmitry.korhov’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB
Kate.Y’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine.

gabesullice’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Needs work
+++ b/src/Controller/AppProxyController.php
@@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse;
-   * The URL of the remo
+   * The URL of the remo.

This is a typo or got truncated by the tool. This should read, "The URL of the remote."

msuthars’s picture

Status: Needs work » Needs review
StatusFileSize
new1.9 KB
new912 bytes

Fixed the typo, Also fix some drupal-check warnings.
protected $corsConfig; is not used anywhere in controller so I removed it.