- heddn Nicaragua
I made a few tweaks to the patch to allow tests to run on 10.x. And some type hints. Did full manual testing using png and jpg images in 10.1. Reviewed the module's code. Pretty simple code at work here.
- Status changed to Fixed
over 1 year ago 2:43pm 9 March 2023 - Status changed to Active
over 1 year ago 4:36am 16 March 2023 - 🇹ðŸ‡Thailand Nick Hope
Unfortunately this breaks Drupal 9.5.5 with PHP 7.4.23, and I think it's because of the PHP version.
I don't know if PHP 7.4 is officially support for D9 or not. This page → says it is supported, but my /admin/reports/status page says "Drupal requires at least PHP 8.0". I don't know which is correct.
This is the first module (of many) that I've had this problem with, so maybe the patch doesn't really require the part that is incompatible with PHP 7?
If PHP 7 really is still supposed to be supported by D8/9, and a D10-compatibility patch for ISQ cannot retain compatibility for D8/9 with PHP 7, I guess separate ISQ branches would be required for D10 and D8/9.
Happy to raise a new issue if you wish.
Full error message below:
The website encountered an unexpected error. Please try again later. ParseError: syntax error, unexpected 'static' (T_STATIC) in Composer\Autoload\includeFile() (line 39 of modules\contrib\image_style_quality\src\Plugin\ImageEffect\ImageStyleQualityImageEffect.php). Composer\Autoload\includeFile() (Line: 428) Composer\Autoload\ClassLoader->loadClass() spl_autoload_call() class_exists() (Line: 96) Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (Line: 17) Drupal\Core\Plugin\Factory\ContainerFactory->createInstance() (Line: 83) Drupal\Component\Plugin\PluginManagerBase->createInstance() (Line: 81) Drupal\Core\Plugin\DefaultLazyPluginCollection->initializePlugin() (Line: 80) Drupal\Component\Plugin\LazyPluginCollection->get() (Line: 18) Drupal\image\ImageEffectPluginCollection->get() (Line: 25) Drupal\image\ImageEffectPluginCollection->sortHelper() uasort() (Line: 90) Drupal\Core\Plugin\DefaultLazyPluginCollection->sort() (Line: 403) Drupal\image\Entity\ImageStyle->getEffects() (Line: 346) Drupal\image\Entity\ImageStyle->transformDimensions() (Line: 263) template_preprocess_image_style() call_user_func_array() (Line: 287) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 48) __TwigTemplate_725c3eac57c1d63d38008a5aee6dee46cf281e2b76b0191b0744ea2937dfed41->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 88) __TwigTemplate_8e5ae62046cbce6735196bd3b694db435c4d49688fd8723e6415057646147c0b->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 446) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 56) __TwigTemplate_0f802d884b09d6ff263d4a13023446741ce5a6293779ee523e07f37cb9a726ae->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 1161) Drupal\views\Plugin\views\field\FieldPluginBase->advancedRender() (Line: 238) template_preprocess_views_view_field() call_user_func_array() (Line: 287) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 1748) Drupal\views\Plugin\views\field\FieldPluginBase->theme() (Line: 774) Drupal\views\Plugin\views\style\StylePluginBase->elementPreRenderRow() call_user_func_array() (Line: 101) Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788) Drupal\Core\Render\Renderer->doCallback() (Line: 374) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 713) Drupal\views\Plugin\views\style\StylePluginBase->renderFields() (Line: 579) Drupal\views\Plugin\views\style\StylePluginBase->renderGrouping() (Line: 470) Drupal\views\Plugin\views\style\StylePluginBase->render() (Line: 2169) Drupal\views\Plugin\views\display\DisplayPluginBase->render() (Line: 1538) Drupal\views\ViewExecutable->render() (Line: 131) Drupal\views\Plugin\views\display\Block->execute() (Line: 1635) Drupal\views\ViewExecutable->executeDisplay() (Line: 81) Drupal\views\Element\View::preRenderViewElement() (Line: 59) Drupal\views\Plugin\Block\ViewsBlock->build() (Line: 171) Drupal\block\BlockViewBuilder::preRender() call_user_func_array() (Line: 101) Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788) Drupal\Core\Render\Renderer->doCallback() (Line: 374) Drupal\Core\Render\Renderer->doRender() (Line: 446) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 82) __TwigTemplate_ae98965f5edd2e1ec22b7d121fa96a43564523b90a2900819b9d000386bca5f6->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 479) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86) __TwigTemplate_c1fc1e06b1efb7eb88ed4ea9621504c98e494bf6050ac21968d3e85ebfcc1ac3->doDisplay() (Line: 405) Twig\Template->displayWithErrorHandling() (Line: 378) Twig\Template->display() (Line: 390) Twig\Template->render() (Line: 55) twig_render_template() (Line: 384) Drupal\Core\Theme\ThemeManager->render() (Line: 433) Drupal\Core\Render\Renderer->doRender() (Line: 204) Drupal\Core\Render\Renderer->render() (Line: 162) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 163) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() call_user_func() (Line: 142) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106) Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85) Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23) Stack\StackedHttpKernel->handle() (Line: 718) Drupal\Core\DrupalKernel->handle() (Line: 19)
- Status changed to Needs work
over 1 year ago 1:33pm 16 March 2023 - heddn Nicaragua
@Nick Hope can you provide a patch to fix this? Sorry this broke you.
- 🇹ðŸ‡Thailand Nick Hope
@heddn I don't have much coding experience so I'm not confident enough to "assign" the issue to myself, but I'll have a look at it.
- 🇫🇮Finland Kimitri
@nick-hope We ran into the same problem. The problem is that the static return type was introduced in PHP 8.0. I made a quick patch that just removes the return type from the method.
- Status changed to Fixed
over 1 year ago 3:00pm 22 March 2023 -
heddn →
committed 6b5907d0 on 8.x-1.x authored by
Kimitri →
Issue #3287987 by heddn, Kimitri: Automated Drupal 10 compatibility...
-
heddn →
committed 6b5907d0 on 8.x-1.x authored by
Kimitri →
Automatically closed - issue fixed for 2 weeks with no activity.