D10.3 StreamWrapperManager change to Service Locators breaks with second compiler pass

Created on 13 July 2024, 5 months ago
Updated 31 July 2024, 5 months ago

Problem/Motivation

πŸ“Œ Convert StreamWrapperManager to use a service locator Needs review made changes that now the container available to the StreamWrapperManager does not have a full container, it is provded a smaller container with closures to services available at the time of initialization (which occurs after the first compiler pass and before the second compiler pass)

Steps to reproduce

CI runs

Proposed resolution

Move S3fsRegisterStreamWrappers::process to S3fsStreamwrapperServiceProvider::register()

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmlara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @cmlara
    • cmlara β†’ committed ef7d0995 on 4.0.x
      Issue #3461207 by cmlara: D10.3 StreamWrapperManager change to Service...
  • Status changed to Fixed 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara
  • πŸ‡«πŸ‡·France dydave

    You rock Conrad! (@cmlara) πŸŽ‰

    I've been banging my head on this one over the weekend.... crashing my drush updb with an obscure error :

    /var/www/html$ drush updb
     [success] No pending updates.
     [error]  TypeError: Drupal\views\ViewExecutable::setRequest(): Argument #1 ($request) must be of type Symfony\Component\HttpFoundation\Request, null given, called in /var/www/html/web/core/modules/views/src/ViewExecutableFactory.php on line 79 in Drupal\views\ViewExecutable->setRequest() (line 1863 of /var/www/html/web/core/modules/views/src/ViewExecutable.php) #0 /var/www/html/web/core/modules/views/src/ViewExecutableFactory.php(79): Drupal\views\ViewExecutable->setRequest(NULL)
    #1 /var/www/html/web/core/modules/views/src/Entity/View.php(123): Drupal\views\ViewExecutableFactory->get(Object(Drupal\views\Entity\View))
    #2 /var/www/html/web/core/modules/views/src/EventSubscriber/RouteSubscriber.php(117): Drupal\views\Entity\View->getExecutable()
    #3 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
    #4 /var/www/html/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
    #5 /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
    #6 /var/www/html/web/core/includes/common.inc(485): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
    #7 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(87): drupal_flush_all_caches()
    #8 [internal function]: Drush\Commands\core\UpdateDBCommands->updatedb(Array)
    #9 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
    #10 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #11 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #12 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #13 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #14 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #15 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #16 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #17 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #18 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
    #19 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
    #20 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
    #21 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
    #22 {main}.
    TypeError: Drupal\views\ViewExecutable::setRequest(): Argument #1 ($request) must be of type Symfony\Component\HttpFoundation\Request, null given, called in /var/www/html/web/core/modules/views/src/ViewExecutableFactory.php on line 79 in /var/www/html/web/core/modules/views/src/ViewExecutable.php on line 1863 #0 /var/www/html/web/core/modules/views/src/ViewExecutableFactory.php(79): Drupal\views\ViewExecutable->setRequest(NULL)
    #1 /var/www/html/web/core/modules/views/src/Entity/View.php(123): Drupal\views\ViewExecutableFactory->get(Object(Drupal\views\Entity\View))
    #2 /var/www/html/web/core/modules/views/src/EventSubscriber/RouteSubscriber.php(117): Drupal\views\Entity\View->getExecutable()
    #3 [internal function]: Drupal\views\EventSubscriber\RouteSubscriber->routes()
    #4 /var/www/html/web/core/lib/Drupal/Core/Routing/RouteBuilder.php(146): call_user_func(Array)
    #5 /var/www/html/web/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
    #6 /var/www/html/web/core/includes/common.inc(485): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
    #7 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(87): drupal_flush_all_caches()
    #8 [internal function]: Drush\Commands\core\UpdateDBCommands->updatedb(Array)
    #9 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
    #10 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #11 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #12 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #13 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #14 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #15 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #16 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #17 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #18 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
    #19 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
    #20 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
    #21 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
    #22 {main}
    TypeError: Drupal\views\ViewExecutable::setRequest(): Argument #1 ($request) must be of type Symfony\Component\HttpFoundation\Request, null given, called in /var/www/html/web/core/modules/views/src/ViewExecutableFactory.php on line 79 in Drupal\views\ViewExecutable->setRequest() (line 1863 of /var/www/html/web/core/modules/views/src/ViewExecutable.php).
     [warning] Drush command terminated abnormally.
    

    The error is gone now, after upgrading to the latest dev version πŸ‘

    Thanks a lot!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024