Skip to content
Snippets Groups Projects

Directory based automatic service creation

Closes #3422359

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
396 397 $definition->setAutowired($service['autowire']);
397 398 }
398 399
399 $this->container->setDefinition($id, $definition);
400 if (isset($service['autoconfigure'])) {
401 $definition->setAutoconfigured($service['autoconfigure']);
402 }
403
404 if (array_key_exists('module', $service) || array_key_exists('modules', $service)) {
405 if (array_key_exists('resource', $service)) {
406 throw new \InvalidArgumentException('Service definitions may not have a `module` or `modules` definition simultaneously with a `resource` definition.');
407 }
408
409 [$provider] = explode('.', basename($file), 2);
  • This could be

    Suggested change
    409 [$provider] = explode('.', basename($file), 2);
    409 $provider = explode('.', basename($file), 2)[0];

    Atm it seems like the nicer option, but I might change my mind about it.

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