The last D7 release of the Entity API was in February 2018.

There has only been one commit to the D7 branch since then, which was made to support PHP 8.0. See #3206793: Remove required parameter following optional parameter (PHP 8.0)

But there are many RTBC issues for D7, and some NR issues that can probably be committed as well before a new release is made.

I am opening this issue to identify which of the currently-open issues should be fixed and included in the next D7 release. As 7.x-1.x is going to be only minimally maintained until D7 EOL, I don't anticipate including any new features or any potentially disruptive changes in the new release.

If you have an interest in seeing a specific issue fixed for the next release, please post here and add that issue as a related issue, as well as adding it to the issue summary. My hope is to get a new version of Entity API released in the next few weeks, primarily for the PHP 8.0 support.

Here are a few issues to start with, I will be adding more as I work through the issue queue:
#3176637: Illegal string offset in entity.install (line 85) in combination with entitycache module
#3023044: error in entity_property_verbatim_get
#3222090: Remove required parameter following optional parameter in entity.features.inc (PHP 8.0)
#3222088: Some test cases are not being executed
#1844266: Fix multiple spelling mistakes
#1312374: Fatal error: Call to undefined function link_field_property_info_callback() in field.info.inc on line 30
#1910596: markup issues: w3c validation
#3224827: Coding standards - whitespace and punctuation
#3224847: Error in entity_entity_property_edit_form_validate()
#3249387: Miscellaneous coding standards
#3249548: Namespace dependencies in .info files
#3249556: PHP 8.1 changes

Comments

TR created an issue. See original summary.

joseph.olstad’s picture

Those two issues have patches that look ready to go. I say push em in and tag the release. Automated tests are passing.

tr’s picture

Added two new issues. It turns out that the Entity API is NOT compatible with PHP 8.0 yet. That is definitely something we need to take care of before a release - after all that's the main reason we're talking about making a release!

tr’s picture

tr’s picture

Issue summary: View changes
tr’s picture

Issue summary: View changes
tr’s picture

joseph.olstad’s picture

looks great

just one outstanding issue that I know of:

tr’s picture

Related issues: +#2886570: Add_Entity_Help
joseph.olstad’s picture

Unknown named parameter $type in FacesExtendable->__call() line 125 of rules/includes/faces.inc
from the php 8.0 test:

The entity api issue might be because the tests dependency picking up the latest tagged release of rules which doesn't have the fix instead of the dev release that does have the php 8.0 fix.

We should ask the rules maintainer to tag a php 8.0 compatible release from the php 8.0 compatible dev branch of rules
?

@TR, it looks like you have the power, you're both an entity api maintainer and a rules module maintainer!

Once rules is released and tagged, we can re-trigger the tests and prove the theory. Then if all is good, we should tag and release the latest entity module from what is in dev!

liam morland’s picture

Unknown named parameter $type in FacesExtendable->__call() line 125 of rules/includes/faces.inc

That ought to have been fixed in #3210622: [D7] PHP 8.0 introduced breaking change to call_user_func_array(). That commit is not yet in a release.

joseph.olstad’s picture

@Liam Morland, thanks for confirming this, in order to fix automated tests for the entity api module we need a new rules tagged release with the already dev included fix for php 8.0.

joseph.olstad’s picture

there's a chain of events that have to happen for us to resolve file_entity and media module php 8.0 automated test passing as media relies on file_entity, which in turn automated tests depend on the entity api which in turn relies on rules for it's automated test coverage dependency.

so , in this order:

  1. Tag and release rules 7.x-2.x branch for new tag #3210622: [D7] PHP 8.0 introduced breaking change to call_user_func_array()
  2. confirm that the new rules release fixes automated testing then Tag and release entity api 7.x-1.x branch for new tag for 7.x-1.10 #3221001: Plan for release of 7.x-1.10
  3. Confirm that the new entity api build fixes file_entity automated testing (test dependency) and then tag 7.x-2.x/7.x-3.x branch for new file_entity release #3208277: PHP 8 compatibility for file_entity
  4. confirm that the new file_entity release fixes media php 8.0 automated test coverage , review if anything needs adjusting in the media module #3208029: PHP 8.0 compatibility for Media
  5. Follow up with the core issue for php 8.0, if everything looks good, mark this issue as fixed: #3145797: [META] Make Drupal 7 core compatible with PHP 8.0
  6. Then continue working on making drupal core php 8.1 compatible #3224299: [META] Make Drupal 7 core compatible with PHP 8.1
tr’s picture

There are no blockers for an Entity API D7 release. But because there has not been a release since Feb 2018 I am trying to make sure I commit all the easy things first, BEFORE a new release, because I don't plan to make another D7 release unless absolutely necessary. There are only a few more small things that I want to fix, but I maintain many projects and right now I am dealing with the EOL of D8 for all these projects. After I have that in hand I will finish off the Entity API D7 release.

joseph.olstad’s picture

Issue tags: +PHP 8.0
joseph.olstad’s picture

Update, a new core commit was added to improve PHP 8.0 support
This might help the entity api module.

joseph.olstad’s picture

@TR, no pressure here, but since core is now php 8.1 compatible and the entity project is required by so many other modules, this is definately on the radar.

#3207984-12: PHP 8.0 compatibility for Metatag (D7)

tr’s picture

Issue summary: View changes
Issue tags: +PHP 8.1
Related issues: +#3249556: PHP 8.1 changes

I pushed the rest of the work I had pending on the module, now the only thing blocking the new release is #3249556: PHP 8.1 changes. I will try to get that issue finished today then I will roll a new release.

tr’s picture

tr’s picture

Issue summary: View changes
Related issues: +#3249387: Miscellaneous coding standards
tr’s picture

Status: Active » Fixed

Entity API 7.x-1.10 is now available.

liam morland’s picture

entity 7.x-1.10 claims to be compatible with PHP 8.0, but there is still one test failure.

Perhaps part of fixing this should be moving the issue testing default from PHP 5.3 to a newer version.

tr’s picture

@Liam Morland: This module IS compatible with PHP 8.0 and PHP 8.1.

As you can see, the test failure is with the Rules integration test (which has long existed but wasn't even being run because of some fundamental errors in entity.info.yml that I fixed in #3222088: Some test cases are not being executed), and is because the latest stable release of Rules is not yet compatible with PHP 8. The -dev release of Rules is, however, and the Entity API tests PASS with PHP 8 when using the -dev version of Rules. I have demonstrated this in the child issues by forcing DrupalCI to use the -dev version of Rules when testing.

The problem, which I've explained many times in many child issues, is that Rules depends on Entity and the Entity test depends on Rules. Chicken and egg. This release of Entity was made first because many modules depend on Entity and making Entity compatible with PHP 8 was blocking all those other modules from being compatible. But until there is a new Rules release with PHP 8 compatibility, that Entity Rules integration test will fail. I have demonstrated in the child issues that if you test with Rules -dev then the test PASSES.

All we have to do here is wait for a new Rules release, then that test failure will magically go away. It's only been 4 days since the Entity API release, and now that the Entity API dependency is PHP 8 compatible there have already been 5 commits and 1 pending patch in Rules to finish off the PHP 8 compatibility in that module. I think I'm doing pretty good here.

liam morland’s picture

Thanks for the explanation. Great work

Status: Fixed » Closed (fixed)

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