I've installed a fresh install of Drupal 10.0.0-dev with nginx 1.22.0 and PHP 8.1.8 with MariaDB 10.5.15 (using DDEV). I've composer required 2.x-dev@dev and since I've ran into the same issue like @Londova yesterday night I've applied the patch https://www.drupal.org/project/commerce/issues/3299220#comment-14623835 from here with composer-patches. I've then performed a site install and then installed all Commerce related modules except Commerce Payment Example via admin/modules at once. After confirming to install the additional mandatory modules like address, entity and so on I ran into the following error:
The website encountered an unexpected error. Please try again later.
Error: Class "Twig_Extension" not found in include() (line 10 of modules/contrib/commerce/modules/price/src/TwigExtension/PriceTwigExtension.php).
include() (Line: 571)
Composer\Autoload\includeFile('/var/www/html/web/modules/contrib/commerce/modules/price/src/TwigExtension/PriceTwigExtension.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Drupal\commerce_price\TwigExtension\PriceTwigExtension')
is_subclass_of('Drupal\commerce_price\TwigExtension\PriceTwigExtension', 'Twig\Extension\ExtensionInterface') (Line: 181)
Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->processServiceCollectorPass(Array, 'twig', Object) (Line: 116)
Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass->process(Object) (Line: 73)
Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 716)
Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1257)
Drupal\Core\DrupalKernel->compileContainer() (Line: 861)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 782)
Drupal\Core\DrupalKernel->updateModules(Array, Array) (Line: 600)
Drupal\Core\Extension\ModuleInstaller->updateKernel(Array) (Line: 236)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 175)
Drupal\system\Form\ModulesListConfirmForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 592)
Drupal\Core\Form\FormBuilder->processForm('system_modules_confirm_form', Array, Object) (Line: 320)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 152)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 670)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comments
Comment #2
jsacksick commentedShould have searched for all occurrences of \Twig_Extension, the attached patch should fix this.
Comment #5
jsacksick commentedWent ahead and committed the patch.
Comment #6
rkollerhaha you beat me to it ;) thanks for the patch! was in the course of setting up a fresh drupal 10.0.0-dev site with commerce 2.x-dev when i got the email notification. and i can confirm the twig error is gone since you already commited the patch to dev. but i ran now into a new error now, a fatal error this time. will search the issue queue if it is a known one and if not will create a new issue.
Comment #7
jsacksick commentedWhat's the issue this time? :p
Comment #8
rkollerfor reference the link to the newly created issue: https://www.drupal.org/project/commerce/issues/3300216
haven't found anything in that context for the promotion submodule.