Fatal error: unexpected identifier "INCLUDED_GROUP"

Created on 18 October 2024, 2 months ago

Problem/Motivation

Uncaught PHP Exception ParseError: "syntax error, unexpected identifier "INCLUDED_GROUP", expecting "="" at /[...]/modules/contrib/condition_path/src/Plugin/Condition/RequestPathInclexcl.php line 23

Steps to reproduce

  1. Upgrade to v3.0.0
  2. Attempt to configure a block in the block layout - or open anything that would include the condition_path plug-in
  3. Php exception

Proposed resolution

The problem looks be the use of the typed constant 'string' in src/Plugin/Condition/RequestPathInclexcl.php:
protected const string INCLUDED_GROUP = 'included';
and
protected const string EXCLUDED_GROUP = 'excluded';

Typed constants are a PHP 8.3+ feature (my site is on 8.2). The compatibility declaration for condition_path says PHP 8.1, so I recommend not using them.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom kmv

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024