Problem/Motivation

As mentioned in #8 on #3161582-8: EntityContextDefinition breaks the context system testing at D9 fails for rules/tests/src/Unit/Integration/RulesEntityIntegrationTestBase.php on line 52

Uncaught require_once( .... /drupal/core/includes/entity.inc): failed to open stream: No such file or directory

This file no longer exists at core 9.0.

Steps to reproduce

Run tests at Core 9.0

Proposed resolution

Remove this line. Tests run OK at 8.8, 8.9 and 9.0 without it. It must have been required for some previous version of the unit test, but is no longer needed now.

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

Patch.

jonathan1055’s picture

I know this won't work, but just trying it at D9 to see how it fails.

jonathan1055’s picture

StatusFileSize
new9.59 KB
jonathan1055’s picture

So, that worked nicely. Might be the first green fully passing Rules test suite at D9 on drupal.org. [but TR has done the real work here]

Obviously, patch #2 is the one to commit, patch #4 was just a try-out, and those fixes are done elsewhere. But good to know we can run at D9 now :-)

jonathan1055’s picture

Status: Active » Needs review

Needs Review, but I'd say this could be RTBC

  • TR committed bf4463d on 8.x-3.x authored by jonathan1055
    Issue #3162246 by jonathan1055: Remove require_once includes/entity.inc...
tr’s picture

Status: Needs review » Fixed
Parent issue: #3162076: [meta] D9 compatibility » #3089502: [meta] Rules deprecated code

All of the functions in entity.inc (entity_load(), entity_create(), etc.) had been deprecated as of Drupal 8.8.0 (or earlier). So we actually needed to include entity.inc while core Drupal 8.7 was still supported. Now that D8.7 is done with it is safe to remove this.

Committed #2.

Status: Fixed » Closed (fixed)

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