- Issue created by @viniciusrp
- Status changed to Closed: duplicate
4 months ago 1:37pm 16 August 2024
The Drupal 10.3 is full compatible with PHP8.3, but it should continue be compatible with PHP8.1 as well.
The ImageFieldManagerInterface interface has a type for a constant and it's available for PHP greater then 8.3, when PHP8.1 execute this interface the error below happen:
ParseError: syntax error, unexpected identifier "DEFAULT_IMAGE_DIRECTORY", expecting "=" in Composer\Autoload\{closure}() (line 17 of core/modules/image/src/ImageFieldManagerInterface.php).
Composer\Autoload\ClassLoader->loadClass('Drupal\image\ImageFieldManagerInterface') (Line: 23)
include('/var/www/html/core/modules/image/src/ImageFieldManager.php') (Line: 576)
Composer\Autoload\{closure}('/var/www/html/core/modules/image/src/ImageFieldManager.php') (Line: 427)
Composer\Autoload\ClassLoader->loadClass('Drupal\image\ImageFieldManager')
class_exists('Drupal\image\ImageFieldManager') (Line: 76)
Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0) (Line: 361)
Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass('Drupal\image\ImageFieldManager', ) (Line: 27)
Symfony\Component\DependencyInjection\Compiler\AutowireAsDecoratorPass->process(Object) (Line: 80)
Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object) (Line: 767)
Symfony\Component\DependencyInjection\ContainerBuilder->compile() (Line: 1447)
Drupal\Core\DrupalKernel->compileContainer() (Line: 971)
Drupal\Core\DrupalKernel->initializeContainer() (Line: 853)
Drupal\Core\DrupalKernel->updateModules(Array, Array) (Line: 627)
Drupal\Core\Extension\ModuleInstaller->updateKernel(Array) (Line: 534)
Drupal\Core\Extension\ModuleInstaller->uninstall(Array, 1) (Line: 91)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array) (Line: 182)
Drupal\system\Form\ModulesUninstallConfirmForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 129)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 67)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 597)
Drupal\Core\Form\FormBuilder->processForm('system_modules_uninstall_confirm_form', Array, Object) (Line: 326)
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: 638)
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: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Remove the type from constant at html/core/modules/image/src/ImageFieldManagerInterface.php:17
N/A
N/A
N/A
N/A
N/A
The image module back to be compatible with PHP8.1
Closed: duplicate
10.3 ✨