Problem/Motivation

Version 1.0.2 is supposed to work with Drupal 9. The module requires PHP >=8.0 but D9 still works on PHP 7.4, although not recommended.
I'm wondering whether the module's code has any part that requires some feature of PHP 8 that cannot be downgraded to 7.4 syntax. If not, maybe we could reduce the requirement, to wide up the target group?
What does/do the maintainer/s think?

Steps to reproduce

Try to composer require drupal/bca on a D9.4 site that runs on PHP 7.4, and you get an error message

  [InvalidArgumentException]
  Package drupal/bca has a PHP requirement incompatible with your PHP version, PHP extensions and Composer version

Proposed resolution

Reduce the PHP requirement to 7.4

Remaining tasks

  • Find parts of the module's code that only work on PHP 8.
  • Change the requirement in composer.json

User interface changes

-

API changes

-

Data model changes

-

CommentFileSizeAuthor
#5 support-php74--3300645-5.patch346 bytesefpapado

Comments

efpapado created an issue. See original summary.

efpapado’s picture

Issue summary: View changes
efpapado’s picture

Issue summary: View changes
mstrelan’s picture

I think you're right. I was initially targeting attributes instead of annotations which would require PHP 8, but we could support PHP 7 in the 1.x branch.

efpapado’s picture

Status: Active » Needs review
StatusFileSize
new346 bytes

Attached a first patch that only changes the composer.json requirement.

mstrelan’s picture

Version: 1.0.2 » 1.x-dev
Category: Support request » Task
Status: Needs review » Fixed
efpapado’s picture

Thank you! Do you think you could release 1.0.3 with this change?

mstrelan’s picture

It should be there, see https://www.drupal.org/project/bca/releases/1.0.3

I'd love to hear if you have any feedback on the module once you've had a chance to use it.

efpapado’s picture

Your module is fantastic and I believe it should become part of the core. I'm actually wondering why wasn't it done like that at the first place.

mstrelan’s picture

@efpapado thanks for the feedback. I've created #3301682: Define bundle classes via attributes if you'd like to add your support.

Status: Fixed » Closed (fixed)

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