Skip to content
Snippets Groups Projects

Fix missing menu active trail

Closes #3359511

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
99 * @param \Drupal\Core\Routing\RouteProviderInterface|null $route_provider
100 * The route provider.
90 101 * @param array $options
91 102 * (optional) Any additional database connection options to use in queries.
92 103 */
93 public function __construct(Connection $connection, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, array $options = []) {
104 public function __construct(Connection $connection, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, $route_provider = NULL, array $options = []) {
94 105 $this->connection = $connection;
95 106 $this->menuCacheBackend = $menu_cache_backend;
96 107 $this->cacheTagsInvalidator = $cache_tags_invalidator;
108 if (!$route_provider instanceof RouteProviderInterface) {
109 if (is_array($route_provider)) {
110 $options = $route_provider;
111 }
112 $route_provider = \Drupal::service('router.route_provider');
113 @trigger_error('Calling ' . __METHOD__ . '() without the $route_provider argument is deprecated in drupal:9.5.10 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3364323', E_USER_DEPRECATED);
  • added 1 commit

    • 1daf601b - Fixes code standard regression in test

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 13 commits

    Compare with previous version

  • Matthew Radcliffe added 488 commits

    added 488 commits

    Compare with previous version

  • Chris Green added 169 commits

    added 169 commits

    Compare with previous version

  • 100 * @param \Drupal\Core\Routing\RouteProviderInterface|null $route_provider
    101 * The route provider.
    91 102 * @param array $options
    92 103 * (optional) Any additional database connection options to use in queries.
    93 104 */
    94 public function __construct(Connection $connection, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, array $options = []) {
    105 public function __construct(Connection $connection, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, $route_provider = NULL, array $options = []) {
    95 106 $this->connection = $connection;
    96 107 $this->menuCacheBackend = $menu_cache_backend;
    97 108 $this->cacheTagsInvalidator = $cache_tags_invalidator;
    109 if (!$route_provider instanceof RouteProviderInterface) {
    110 if (is_array($route_provider)) {
    111 $options = $route_provider;
    112 }
    113 $route_provider = \Drupal::service('router.route_provider');
    114 @trigger_error('Calling ' . __METHOD__ . '() without the $route_provider argument is deprecated in drupal:9.5.10 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3364323', E_USER_DEPRECATED);
    • Suggested change
      Applied
      114 @trigger_error('Calling ' . __METHOD__ . '() without the $route_provider argument is deprecated in drupal:9.5.10 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3364323', E_USER_DEPRECATED);
      114 @trigger_error('Calling ' . __METHOD__ . '() without the $route_provider argument is deprecated in drupal:11.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3364323', E_USER_DEPRECATED);
    • Chris Green changed this line in version 17 of the diff

      changed this line in version 17 of the diff

    • Please register or sign in to reply
  • 460 461 $this->assertEqualsCanonicalizing($children, array_keys($this->treeStorage->loadAllChildren($id)));
    461 462 }
    462 463
    464 /**
    465 * Tests backwards compatibility layer.
    466 *
    467 * @group legacy
    468 * @dataProvider providerBackwardsCompatibilityLayer
    469 */
    470 public function testBackwardsCompatibilityLayer(bool $pass_options = FALSE): void {
    471 $this->expectDeprecation('Calling Drupal\Core\Menu\MenuTreeStorage::__construct() without the $route_provider argument is deprecated in drupal:9.5.10 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3364323');
    • Suggested change
      Applied
      471 $this->expectDeprecation('Calling Drupal\Core\Menu\MenuTreeStorage::__construct() without the $route_provider argument is deprecated in drupal:9.5.10 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3364323');
      471 $this->expectDeprecation('Calling Drupal\Core\Menu\MenuTreeStorage::__construct() without the $route_provider argument is deprecated in drupal:11.3 and will be required in drupal:12.0.0. See https://www.drupal.org/node/3364323');
    • Chris Green changed this line in version 17 of the diff

      changed this line in version 17 of the diff

    • Please register or sign in to reply
  • Chris Green added 1 commit

    added 1 commit

    Compare with previous version

  • Chris Green added 1 commit

    added 1 commit

    • a6a0d861 - Update test to account for new parameter.

    Compare with previous version

  • Chris Green added 1 commit

    added 1 commit

    Compare with previous version

  • Chris Green added 1 commit

    added 1 commit

    • fa926910 - Update deprecation target to 11.3

    Compare with previous version

  • 214 214 'SELECT "base"."fid" AS "fid", "base"."uuid" AS "uuid", "base"."langcode" AS "langcode", "base"."uid" AS "uid", "base"."filename" AS "filename", "base"."uri" AS "uri", "base"."filemime" AS "filemime", "base"."filesize" AS "filesize", "base"."status" AS "status", "base"."created" AS "created", "base"."changed" AS "changed" FROM "file_managed" "base" WHERE "base"."fid" IN (5)',
    215 215 'SELECT "name", "value" FROM "key_value" WHERE "name" IN ( "theme:umami" ) AND "collection" = "config.entity.key_store.block"',
    216 216 'SELECT "base_table"."id" AS "id", "base_table"."path" AS "path", "base_table"."alias" AS "alias", "base_table"."langcode" AS "langcode" FROM "path_alias" "base_table" WHERE ("base_table"."status" = 1) AND ("base_table"."path" LIKE "/node/1" ESCAPE \'\\\\\') AND ("base_table"."langcode" IN ("es", "und")) ORDER BY "base_table"."langcode" ASC, "base_table"."id" DESC',
    217 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.node.canonical") AND ("route_param_key" = "node=1") AND ("menu_name" = "account") ORDER BY "depth" ASC, "weight" ASC, "id" ASC',
    218 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.node.canonical") AND ("route_param_key" = "node=1") AND ("menu_name" = "main") ORDER BY "depth" ASC, "weight" ASC, "id" ASC',
    219 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.node.canonical") AND ("route_param_key" = "node=1") AND ("menu_name" = "footer") ORDER BY "depth" ASC, "weight" ASC, "id" ASC',
    217 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE·("route_name" = "entity.node.canonical") AND ("route_param_key" IN ("node=1", "node=1")) AND ("menu_name" = "account") ORDER·BY "depth" ASC, "weight" ASC, "id" ASC, "route_param_key" ASC',
    • Suggested change
      Applied
      217 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE·("route_name" = "entity.node.canonical") AND ("route_param_key" IN ("node=1", "node=1")) AND ("menu_name" = "account") ORDER·BY "depth" ASC, "weight" ASC, "id" ASC, "route_param_key" ASC',
      217 'SELECT "menu_tree"."menu_name" AS "menu_name", "menu_tree"."route_name" AS "route_name", "menu_tree"."route_parameters" AS "route_parameters", "menu_tree"."url" AS "url", "menu_tree"."title" AS "title", "menu_tree"."description" AS "description", "menu_tree"."parent" AS "parent", "menu_tree"."weight" AS "weight", "menu_tree"."options" AS "options", "menu_tree"."expanded" AS "expanded", "menu_tree"."enabled" AS "enabled", "menu_tree"."provider" AS "provider", "menu_tree"."metadata" AS "metadata", "menu_tree"."class" AS "class", "menu_tree"."form_class" AS "form_class", "menu_tree"."id" AS "id" FROM "menu_tree" "menu_tree" WHERE ("route_name" = "entity.node.canonical") AND ("route_param_key" IN ("node=1", "node=1")) AND ("menu_name" = "account") ORDER·BY "depth" ASC, "weight" ASC, "id" ASC, "route_param_key" ASC',
    • Chris Green changed this line in version 18 of the diff

      changed this line in version 18 of the diff

    • Please register or sign in to reply
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading