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
Comment #2
dmitry.korhovComment #3
Kate.Y commentedLooks fine.
Comment #4
gabesulliceThis is a typo or got truncated by the tool. This should read, "The URL of the remote."
Comment #5
msutharsFixed the typo, Also fix some drupal-check warnings.
protected $corsConfig;is not used anywhere in controller so I removed it.