Closed (fixed)
Project:
ALTCHA
Version:
1.1.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2025 at 15:14 UTC
Updated:
19 Jan 2026 at 06:49 UTC
Jump to comment: Most recent
We are running Drupal 10.5.8 on PHP 8.2. After installing altcha 1.1.0-rc1, I get a syntax error on, for instance, running 'drush updatedb':
PHP Parse error: syntax error, unexpected identifier "SAAS_API_CHALLENGE_PATH", expecting "=" in /Users/bbulger/espo/local/espodocker/www/drupal9/web/modules/contrib/altcha/src/Form/AltchaSettingsForm.php on line 23
The problem seems to be the type on the constant in the AltchaSettingsForm class:
const string SAAS_API_CHALLENGE_PATH = '/api/v1/challenge';
Typing the constant is not valid prior to PHP 8.3.
The real question is, are there other dependencies that require PHP 8.3, or can I just patch these declarations until we upgrade?
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
Comment #2
robindh commentedThere shouldn't be any other dependencies that require php 8.3. These type declarations are something that unfortunately slipped in with features for the latest release candidate.
According to phpstorm, there are 8 incompatibilities in 4 files:
When these are patched, there shouldn't be any more php 8.2 incompatibility problems. Feel free to create a merge request!
Comment #5
elfakhar commentedRemoved PHP 8.3 typed constants to ensure PHP 8.2 compatibility. Would appreciate a review when someone has time
Thank you
Comment #6
elfakhar commentedComment #8
robindh commentedMerged in 1.0.x, thanks! Will be included in the 1.1.0 release