I just tried to update swiper formatter to2.0.1-beta3 and get the below error on my WSOD (I have $config['system.logging']['error_level'] = 'verbose'; in my settings.php)

The website encountered an unexpected error. Try again later.

ParseError: syntax error, unexpected identifier "SWIPER_MODULES", expecting "=" in Composer\Autoload\{closure}() (line 19 of modules/contrib/swiper_formatter/src/SwiperFormatterInterface.php).
Composer\Autoload\ClassLoader->loadClass() (Line: 55)
include('/home/keratai2/public_html/cetmen.com.tr/web/modules/contrib/swiper_formatter/src/Entity/SwiperFormatter.php') (Line: 576)
Composer\Autoload\{closure}() (Line: 427)
Composer\Autoload\ClassLoader->loadClass() (Line: 26)
swiper_formatter_requirements()
call_user_func_array() (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 416)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 109)
Drupal\system\SystemManager->listRequirements() (Line: 53)
Drupal\system\Controller\SystemInfoController->status()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 96)
Drupal\crowdsec\Middleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

I'm on php8 and Drupal10.2.5

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

RgnYLDZ created an issue. See original summary.

rgnyldz’s picture

Issue summary: View changes
aaron.ferris’s picture

Looks like typed constants, assuming < PHP8.3?

Edit - sorry, just seen PHP8. Typed constants (IIRC) are in 8.3.

Ill raise a MR/patch that should help you, but it may be that you need to patch this rather than the module be updated for backwards compatibility.

aaron.ferris’s picture

StatusFileSize
new983 bytes

aaron.ferris changed the visibility of the branch 3442327-parseerror-syntax-error to hidden.

  • nk_ committed 747a463a on 2.0.x
    Issue #3442327 by aaron.ferris, RgnYLDZ: ParseError: syntax error,...
nk_’s picture

Version: 2.0.1-beta3 » 2.0.x-dev
Status: Active » Needs review

Thanks! Patched and pushed for < PHP 8.3 compatibility.

rgnyldz’s picture

Nice work, you guys rock :)

I'll go with the dev version then.

nk_’s picture

It's published as beta4 release so you can use that as well. Make sure you run DB update script too, as explained here.

aaron.ferris’s picture

Status: Needs review » Fixed

Marking as fixed, thanks all :)

Status: Fixed » Closed (fixed)

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