Fix php 8.4 compatibility by adding nullable types

Closes #3603981

Merge request reports

Loading