I just updated to 4.1.5 with composer on a D9 site which was otherwise fully up to date, running on PHP 7.3. Then running update.php produces a fatal error:

ParseError: syntax error, unexpected 'EventDispatcherInterface' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in Composer\Autoload\includeFile() (line 27 of /home/rp/sites/default/web/modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionManager.php)

Whilst it is clear that I probably shouldn't still be running PHP 7.3, the fact remains that version 4.1.4 doesn't generate this error, and there's nothing in the release notes to indicate that 4.1.5 should not work fine with 7.3.

Comments

upperholme created an issue. See original summary.

joelpittet’s picture

I can't see where this happening, seems a bit strange. I'm running a test on 7.3 to see what's happening https://www.drupal.org/pift-ci-job/2484115

Can you try getting composer to re-install it?

graber’s picture

Priority: Critical » Normal

That's true, PHP 7.3 does not support class property type hinting: https://stackoverflow.com/a/37263548
However, Drupal 9.4 and higher doesn't support PHP 7.3 (see https://www.drupal.org/docs/system-requirements/php-requirements)

We can have a patch here for those that insist to stay with PHP 7.3 or older but VBO needs to move along with Drupal core.

I'll update core_version_requirement in the .info.yml file to ^9.4 || ^10 in the meanwhile.

My best recommendation to users that want to use latest VBO is to update PHP to 7.4 at least.

graber’s picture

Ok, not sure really what is the average PHP version and average core version used by VBO users. For the module progress it'd be best to use the latest possible core and last supported PHP but we need to use what'll be best for VBO users.

Any input welcome.

joelpittet’s picture

Priority: Normal » Critical

If we can get away with making it BC and it doesn't interrupt features we want or need. I'd suggest making it as BC as possible (to an extent). Strongly agree it should be no less than 7.3 because that is what core supports. Yes, if we don't support PHP 7.3 we should be explicit about it and maybe a new major/minor release should be in order since it's breaking change... I could be swayed on this because it's a bit murky...

Tricky when OS's promise security fixes beyond EOL of PHP.

@upperholme can you put together a patch to make it work in PHP 7.3?

@Graber, I support whatever decision you go with, just putting in my 2 cents

graber’s picture

Thank you for your input Joel.

Yes, PHP 7.3 is EOL now https://www.php.net/supported-versions.php. However, there may be a lot of sites with PHP 7.3 and core < 9.4 or even lower with core just showing a warning.

Ok, 4.1.6 will be released this Friday latest with all those property type hints removed (with limited support at the same time meaning I'll look at RTBC issues only) but we'll have 4.2 that'll not support PHP < 7.4 and core < 9.4.

graber’s picture

Status: Active » Fixed

Ahh, right, I believe this is fixed now.

tobiasb’s picture

@Graber
The composer.json for 4.2.x should contains the required php version. D9.4 does not require php 7.4 or can be run with php 7.3.

#2917655: [9.4.x only] Drop official PHP 7.3 support in Drupal 9.4

graber’s picture

You're right. I can click the "merge" button once it exists.

Status: Fixed » Closed (fixed)

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