Skip to content
Snippets Groups Projects

Draft: Issue 3249970: Support setting service parameters via environment variables

Open Ivo Van Geertruyen requested to merge issue/drupal-3249970:issue-3249970-11x into 11.x
2 unresolved threads

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
167 167 // The exception to the above elegance: re-resolve the '%app_root%' param.
168 168 // @see \Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass
169 169 // @see \Drupal\Core\DrupalKernel::guessApplicationRoot()
170 $container->getDefinition('module_handler')->setArgument(0, '%app.root%');
170 $container->getDefinition('module_handler')
171 ->setArgument(0, '%app.root%')
172 ->setArgument(1, '%container.modules%');
  • Comment on lines +170 to +172

    Looks like the definition for the container.namespaces service needs to be re-re-resolved as well. This is feeling increasingly hacky, and the comment probably needs to expanded on, but can try this first to see if all the test pass.

    Suggested change
    Applied
    172 $container->getDefinition('module_handler')
    173 ->setArgument(0, '%app.root%')
    174 ->setArgument(1, '%container.modules%');
    172 $container->getDefinition('module_handler')
    173 ->setArgument(0, '%app.root%')
    174 ->setArgument(1, '%container.modules%');
    175 $container->getDefinition('container.namespaces')
    176 ->setArgument(0, '%container.namespaces%');
  • Please register or sign in to reply
  • added 1 commit

    • 3a2c0d4a - fix: reinject container.namespaces into container

    Compare with previous version

  • 167 167 // The exception to the above elegance: re-resolve the '%app_root%' param.
    168 168 // @see \Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass
    169 169 // @see \Drupal\Core\DrupalKernel::guessApplicationRoot()
    • Comment on lines 167 to 169

      OK, since the tests pass, comment should be updated. Maybe something like this:

      Suggested change
      Applied
      169 // The exception to the above elegance: re-resolve the '%app_root%' param.
      170 // @see \Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass
      171 // @see \Drupal\Core\DrupalKernel::guessApplicationRoot()
      169 // The exception to the above elegance: re-resolve the '%app_root%',
      170 // '%container.modules%', and '%container.namespaces%' params.
      171 // @see \Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass
      172 // @see \Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass
      173 // @see \Drupal\Core\DrupalKernel::guessApplicationRoot()
    • Please register or sign in to reply
  • added 1 commit

    • 3cb5631b - chore: adding fix for re-resolved container

    Compare with previous version

  • added 1 commit

    • 349878b9 - fix: remove duplicate definition for container.namespaces

    Compare with previous version

  • added 2 commits

    • 6b4c9078 - test: adding env var processor
    • 9c7edb46 - chore: adding the possibility to uppercase env into name parameter

    Compare with previous version

  • added 1 commit

    • 35b9156c - refactor: phpcs boolean uppercase fix

    Compare with previous version

  • added 1 commit

    • 58e23dc5 - feat: add configuration parameters with %% characters, array, binary, constant and enum

    Compare with previous version

  • Please register or sign in to reply
    Loading