The \Drupal\rest_example\Controller\RestExampleClientController class extends \Drupal\Core\Controller\ControllerBase, but the only method it uses from that class is config().
Instead of extending ControllerBase, RestExampleClientController should:
- Implement
\Drupal\Core\DependencyInjection\ContainerInjectionInterface - Use
\Drupal\Core\Messenger\MessengerTrait - Use
\Drupal\Core\StringTranslation\StringTranslationTrait - Define a property for the configuration factory service
RestExampleClientController actually accesses ControllerBase::$configFactory before it is initialized with the effect of accessing a method on NULL.
Changing the class as described here fixes that bug too.
Issue fork examples-3458249
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
avpadernoComment #5
avpadernoComment #6
avpadernoComment #7
avpaderno