Skip to content

fix: align named argument class → class_name for PHP 8 compatibility#73

Merged
chubes4 merged 1 commit intomainfrom
fix/class-named-arg
Mar 7, 2026
Merged

fix: align named argument class → class_name for PHP 8 compatibility#73
chubes4 merged 1 commit intomainfrom
fix/class-named-arg

Conversation

@chubes4
Copy link
Member

@chubes4 chubes4 commented Mar 7, 2026

Summary

The StepTypeRegistrationTrait::registerStepType() parameter was renamed from $class to $class_name in data-machine commit fe240d7f, but this caller still used class: as a named argument — which is a reserved word in PHP 8.

This caused a fatal error on the events site after the latest data-machine deploy:

Fatal error: Uncaught Error: Unknown named parameter $class in EventImportStep.php:32

One-character fix: class:class_name:.

The StepTypeRegistrationTrait parameter is $class_name, but the caller
used class: which is a reserved word in PHP. This caused a fatal error
on PHP 8.4 when data-machine was updated to the latest trait version.
@chubes4 chubes4 merged commit 7e471a1 into main Mar 7, 2026
1 of 2 checks passed
@chubes4 chubes4 deleted the fix/class-named-arg branch March 7, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant