- Issue created by @catch
This might not be a drush issue? https://github.com/drush-ops/drush/issues/5848#issuecomment-1876021392
From this part of the exception thrown documented in π Uncaught exception thrown when running database updates via drush Active ,
```
Fatal error: Uncaught Symfony\Component\VarExporter\Exception\LogicException: Cannot generate lazy proxy: class "Drupal\big_pipe\StackMiddleware\ContentLength" is final. in /var/
www/html/vendor/symfony/var-exporter/ProxyHelper.php:92
Stack trace:
#0 /var/www/html/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/LazyServiceDumper.php(136): Symfony\Component\VarExporter\ProxyHelper::generateLazyProxy(Object(Reflectio
nClass), Array)
#1 /var/www/html/vendor/symfony/dependency-injection/LazyProxy/Instantiator/LazyServiceInstantiator.php(33): Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\LazyService
Dumper->getProxyCode(Object(Symfony\Component\DependencyInjection\Definition), 'http_middleware...')
#2 /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php(1086): Symfony\Component\DependencyInjection\LazyProxy\Instantiator\LazyServiceInstantiator->instantiate
```Looked at Symfony docs for Lazy Services: https://symfony.com/doc/6.4/service_container/lazy_services.html, and saw this:
Lazy services do not support final classes, but you can use Interface Proxifying to work around this limitation.
In PHP versions prior to 8.0 lazy services do not support parameters with default values for built-in PHP classes (e.g. PDO).
Suggestion there is to use interface proxying:
# config/services.yaml services: App\Twig\AppExtension: lazy: 'Twig\Extension\ExtensionInterface' # or a complete definition: lazy: true tags: - { name: 'proxy', interface: 'Twig\Extension\ExtensionInterface' }
- Merge request !6017Issue #3412168: Add back final on big pipe ContentLength with interface proxying. β (Closed) created by godotislate
Opened MR 6017 as experiment to use interface proxying per previous comment in the service declaration. Ran
drush updb
with this change and saw saw no exceptions thrown and updates ran successfully.Not sure how to reproduce the exception otherwise, so leaving it here for now.
- Status changed to Needs review
12 months ago 11:53pm 4 January 2024 Turns out it's not a Drush-specific problem, and the error was not obvious on update.php because the exception was thrown during kernel->terminate() call after page was already sent to browser. Exception does show up in the log.
Updated IS. Updated MR with proposed approach and added a unit test.
- Status changed to RTBC
12 months ago 4:48pm 7 January 2024 - πΊπΈUnited States smustgrave
Ran the test-only job
1) Drupal\Tests\Core\DependencyInjection\Compiler\StackedKernelPassTest::testProcessWithStackedKernelAndFinalHttpMiddleware Cannot generate lazy proxy for service "http_kernel.two". /builds/issue/drupal-3412168/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php:151 /builds/issue/drupal-3412168/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 /builds/issue/drupal-3412168/vendor/phpunit/phpunit/src/Framework/TestSuite.php:684 /builds/issue/drupal-3412168/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651 /builds/issue/drupal-3412168/vendor/phpunit/phpunit/src/TextUI/Command.php:144 /builds/issue/drupal-3412168/vendor/phpunit/phpunit/src/TextUI/Command.php:97 FAILURES! Tests: 3, Assertions: 15, Failures: 1.
Issue summary proposed solution match the fix.
Left a comment but that's just a curiosity and not a blocker if anyone see's that thread.
Change LGTM!
- Status changed to Needs work
12 months ago 12:27pm 12 January 2024 - π¬π§United Kingdom longwave UK
Tiny whitespace nitpick otherwise this looks good to me.
- First commit to issue fork.
- Status changed to RTBC
12 months ago 3:55pm 12 January 2024 Fixed whitespace. Moving back to RTBC since that was the only thing.
- Status changed to Fixed
12 months ago 5:55pm 12 January 2024 -
longwave β
committed c10494df on 11.x
Issue #3412168 by godotislate, catch, smustgrave, longwave: Add back "...
-
longwave β
committed c10494df on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.