Problem/Motivation

The test class in core/modules/node/tests/src/Functional/NodeRevisionsTest.php uses a regular database query instead of using an entity query.

Proposed resolution

Replace the regular database query with an entity query.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB

Patch changes the db queries to the same entity query.

daffie’s picture

StatusFileSize
new544 bytes
new1.27 KB

Forgot to add the allRevisions() part to the entity query.

snehalgaikwad’s picture

Assigned: Unassigned » snehalgaikwad
snehalgaikwad’s picture

Assigned: snehalgaikwad » Unassigned
Status: Needs review » Reviewed & tested by the community

Tested on local. Patch looks good to me.

pratik_kamble’s picture

Issue tags: +Bug Smash Initiative
pratik_kamble’s picture

Issue tags: -Bug Smash Initiative

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3151975-3.patch, failed testing. View results

daffie’s picture

Status: Needs work » Reviewed & tested by the community

Back to RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3151975-3.patch, failed testing. View results

narendra.rajwar27’s picture

Status: Needs work » Needs review
StatusFileSize
new1.3 KB
new552 bytes

patch missing ->accessCheck(FALSE).

Updating the patch.

sajid_007’s picture

StatusFileSize
new1.35 KB
daffie’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.3 KB

Reuploading the patch from comment #11, because that is the one that should be committed.
The code change looks good to me.
For me it is back to RTBC.

@sajid_007: I do not see any differences between my patch from comment #3 and your patch, with the exception of the removed empty line. Could you add an interdiff.txt with your patch. In that way the person who reviews your patch can easily see what changes you made.

alexpott’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

As #12 was added without explanation or interdiff I'm removing issue credit as this patch is not part of the final patch.

Committed and pushed 702e824664 to 9.1.x and f6a64b3e81 to 9.0.x and 884d2a50fe to 8.9.x. Thanks!

Backported to 8.9.x to keep the tests aligned.

  • alexpott committed 702e824 on 9.1.x
    Issue #3151975 by daffie, narendra.rajwar27: Replace the database query...

  • alexpott committed f6a64b3 on 9.0.x
    Issue #3151975 by daffie, narendra.rajwar27: Replace the database query...

  • alexpott committed 884d2a5 on 8.9.x
    Issue #3151975 by daffie, narendra.rajwar27: Replace the database query...

Status: Fixed » Closed (fixed)

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