Skip to content
Snippets Groups Projects

Dex

Open dpi requested to merge issue/drupal-3453474:3453474-dex into 11.0.x
2 unresolved threads

Closes #3453474

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
  • dpi resolved all threads

    resolved all threads

  • core/bin/dex 0 → 100755
    35 // Drupal is highly dependent on a Request:
    36 $request = Request::createFromGlobals();
    37 $baseDomain = $context['HOST'] ?? NULL;
    38 $basePort = $context['PORT'] ?? NULL;
    39 if ($baseDomain !== NULL) {
    40 $request->server->set('SERVER_NAME', $baseDomain);
    41 $request->server->set('SERVER_PORT', $basePort ?? 80);
    42 }
    43 $kernel->getContainer()
    44 ->get('request_stack')
    45 ->push($request);
    46 // This sets things up, esp loadLegacyIncludes().
    47 $kernel->preHandle($request);
    48
    49 $app = new Application('dex', \Drupal::VERSION);
    50 $app->setCommandLoader($kernel->getContainer()->get('console.command_loader'));
    • If this were provided as a method, not of the front controller, but in Drupal (e.g. taking an Application class as a parameter), then Drush could also call it. That would be superior than having the same code from core duplicated in Drush.

    • Please register or sign in to reply
  • 47 }
    48 $reflection = $parent;
    49 }
    50
    51 $definition = new Definition($className);
    52 $definition
    53 ->setAutoconfigured(TRUE)
    54 ->setAutowired(TRUE)
    55 ->setPublic(TRUE)
    56 ->setTags(['console.command' => []]);
    57
    58 $container->setDefinition($className, $definition);
    59 }
    60
    61 // Register commands from above to the container.
    62 $commandServices = $container->findTaggedServiceIds('console.command', TRUE);
    • Old versions of Drush and Drupal Console also used to use 'console.command'. I don't know if there is any danger of overlap; I suppose if there is, then the faulty module would simply fail on Drupal 11 and need to be updated, so perhaps there is no need to be unique here. Is console.command used for uniformity with Symfony?

    • Please register or sign in to reply
  • Greg Anderson mentioned in merge request !8419

    mentioned in merge request !8419

  • Please register or sign in to reply
    Loading