Problem/Motivation
Drupal core is deprecating Doctrine-style annotations such as @Block, @ContentEntityType, and @ConfigEntityType in favour of native PHP attributes. Annotation support will be removed in Drupal 13.
og_menu should migrate where its supported core range (^10.5 || ^11.1.2 || ^12.0) allows it.
Proposed resolution
Convert OgMenuBlock from @Block to #[Block], which is supported across the module's full core range.
Add #[ConfigEntityType] and #[ContentEntityType] to OgMenu and OgMenuInstance while retaining their existing annotations. Entity type attribute discovery was introduced in Drupal 11.2, so the annotations are still required for Drupal 10.5 through 11.1.x.
Drupal's dual discovery mechanism prefers attributes when supported and falls back to annotations on older cores. This matches the approach already used by OG and other contrib modules.
Remaining tasks
Remove the remaining entity annotations once og_menu drops support for Drupal core versions earlier than 11.2.
Verify PHPStan, PHPCS, and the full kernel/unit test suite continue to pass without new deprecation notices.
Issue fork og_menu-3623456
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 #4
joelpittetMerged into 2.x