Problem/Motivation

syntax error, unexpected 'AccountInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in docroot/modules/contrib/auto_username/src/Form/AutoUsernameSettingsForm.php on line 26

Steps to reproduce

Drupal version : 9.3.22
PHP V 7.3

Proposed resolution

Typed properties were introduced in PHP 7.4. In order to make the module for php 7.3.x remove properties type hints
i made simple patch for this action

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

ScriptCircle created an issue. See original summary.

g.mustapha’s picture

Assigned: g.mustapha » Unassigned

  • g.mustapha authored db3e3129 on 8.x-1.x
    Issue #3315236 by g.mustapha: syntax error typed properties not...
jayelless’s picture

Status: Patch (to be ported) » Fixed

@g.mustapha. Thanks for picking this up. I will apply this to the existing 8.x-1.x branch, but this change will not be in the 2.0.x branch that is being created to support D10 development.

g.mustapha’s picture

happy to contribute :)

jayelless’s picture

@g.mustapha Thanks for the offer, but the reason that the patch will not be in the 2.0.x branch is that D10 does not support older versions of PHP. It requires at least PHP 8.1, with 8.1.6 and above recommended.

Status: Fixed » Closed (fixed)

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

liam morland’s picture

Version: 8.x-1.3 » 8.x-1.x-dev

At this point, when Drupal 8 and 9 are out-of-support, it would be reasonable to drop pre-Drupal 10 support and revert this change.

g.mustapha’s picture

yeh true