Skip to content

Fixes for visibility level > 1

Fixing issues with rendering menus when visibility level is > 1.

  1. Original issue patch was incompatible with relative visibility added by #3366930. Re-worked logic of both to handle visibility at all levels.
  2. Added tests to confirm original issues in #3224816 were resolved. (And does so without needing Block context to be patched!)
  3. Added tests to confirm NEW issues when level > 1 and visibility is relative introduced by https://www.drupal.org/i/3366930. (Depth calculation logic when relative visibility is invoked was reversed, but not caught by existing tests.)
  4. Improved human readability of the many tests involved in testing level, depth and relative_visibility ("follow" setting in Menu Block).
  5. Fix general phpcs and phpstan issues.

Closes #3224816

Merge request reports

Loading