Fix documentation for annotations

Created on 9 April 2024, 7 months ago
Updated 9 May 2024, 6 months ago

The annotations don't work as described in the documentation:

/**
 * @FormDecorator(hook = "form_user_register_form_alter")
 */

Should be

/**
 * @FormDecorator(
 *   hook = "form_user_register_form_alter"
 * )
 */

Otherwise the hook will not be collected properly.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇩🇪Germany Hydra

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Hydra
  • 🇩🇪Germany Hydra

    nvm - that was not the issue

  • 🇩🇪Germany Hydra

    Okay now, still a documentaiton error. When using dependency injection, the documentation example does not call the parent constructor.

    Instead of:

      public function __construct(array $configuration,  $plugin_id, $plugin_definition,
        protected EntityTypeManagerInterface $entityTypeManager
      ) {}
    

    it should be:

      public function __construct(array $configuration,  $plugin_id, $plugin_definition,
        protected EntityTypeManagerInterface $entityTypeManager
      ) {
    parent::__construct(array $configuration, $plugin_id, $plugin_definition);
    }
    
  • Status changed to Needs review 7 months ago
  • Status changed to Fixed 7 months ago
  • 🇩🇪Germany Harlor Berlin

    Thx - I fixed the documentation.

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

Production build 0.71.5 2024