Fix documentation for annotations

Created on 9 April 2024, 3 months ago
Updated 9 May 2024, about 2 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 2 months ago
  • πŸ‡©πŸ‡ͺGermany Hydra
  • Status changed to Fixed 2 months ago
  • πŸ‡©πŸ‡ͺGermany Harlor Berlin

    Thx - I fixed the documentation.

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

Production build 0.69.0 2024