This is a maintenance patch ( For Drupal9! )

Regarding classes that extend FormBase and ControllerBase

We should drop code of of the form \Drupal::config and call the equivalent method provided by the base class.

-    $config = \Drupal::config('adsense.settings');
+    $config = $this->config('adsense.settings');

The patch is small, single minded and should be quick to review.

CommentFileSizeAuthor
#2 2969171-2.patch2.17 KBmartin107

Comments

martin107 created an issue. See original summary.

martin107’s picture

Assigned: martin107 » Unassigned
Status: Active » Needs review
StatusFileSize
new2.17 KB

Here is the patch

jcnventura’s picture

Status: Needs review » Needs work

There's a few more ConfigFormBase derived classes.

  • jcnventura committed f273ab7 on 8.x-1.x authored by martin107
    Issue #2969171 by martin107, jcnventura: Use $this->config() where...
jcnventura’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.