Problem/Motivation

Fix references to the deprecated Entity class. It was renamed to EntityBase.

During the search for references I've found some more inconsistencies, which I hope could be fixed together.

Steps to reproduce

Proposed resolution

Use this to search for instances grep -r "[/*].*[ \]Entity::" core | grep -v processStubRow | grep -v validateArgument | grep -v config_test

Remaining tasks

Review

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3094865

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hchonov created an issue. See original summary.

hchonov’s picture

Status: Active » Needs review
Issue tags: +Novice
StatusFileSize
new23.37 KB
berdir’s picture

+++ b/core/tests/Drupal/Tests/Core/Entity/EntityUnitTest.php
@@ -249,7 +249,7 @@ public function testLanguage() {
   public function setupTestLoad() {
     // Base our mocked entity on a real entity class so we can test if calling
-    // Entity::load() on the base class will bubble up to an actual entity.
+    // EntityBase::load() on the base class will bubble up to an actual entity.
     $this->entityTypeId = 'entity_test_mul';

these unit tests also still reference the wrong class in @coversDefaultClass, which breaks them when removing the BC layer, currently fixing that in #3069696: Remove BC layers from the entity system.

hchonov’s picture

Oh, I've missed that one. But as Entity actually extends from EntityBase and does not override any methods it should be fine to adjust the comments that we are testing EntityBase methods right?

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

This issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.

At this time we would need a D10.1.x patch or MR for this issue.

Also probably will have to recheck the repo if there are other occurrences

Please do not just reroll

_utsavsharma’s picture

StatusFileSize
new2.02 KB
new2.02 KB

Patch for D10.1.x.

_utsavsharma’s picture

Status: Needs work » Needs review
smustgrave’s picture

how did you check for other occurrences per #11

smustgrave’s picture

Removing credit the patch has nothing to do with this ticket it seems.

smustgrave’s picture

_utsavsharma’s picture

Sorry my bad @smustgrave.
I will read the comments properly from now on.

smustgrave’s picture

Status: Needs review » Needs work

Still need the D10 version of the patch.

_utsavsharma’s picture

StatusFileSize
new20.79 KB
new20.79 KB

Patch for 10.1.x.

nikhil_110’s picture

Status: Needs work » Needs review
StatusFileSize
new1.34 MB

Patch #19 Successfully applied... attached screenshot.

smustgrave’s picture

Status: Needs review » Needs work

@Nikhil_110 screenshot of the patch applying is not needed as the tests running show us that.

#19 the interdiff and patch are the same so not sure what was captured. Seems some size was lost from #2 if that could documented why please.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone made their first commit to this issue’s fork.

quietone’s picture

Issue summary: View changes
quietone’s picture

Category: Task » Bug report
Status: Needs work » Needs review

This is a bug because the documentation is incorrect. And thus, it is rather strict on making the minimal change to correct the documentation.

smustgrave’s picture

Status: Needs review » Needs work

Thank for the grep @quietone

MR appears to need manual rebase.

quietone’s picture

Status: Needs work » Needs review

Thanks, I rebased.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Using the grep provided by @quietone believe all instances have been updated.

catch’s picture

Status: Reviewed & tested by the community » Needs work

Couple of comments on the MR.

quietone’s picture

Status: Needs work » Needs review
berdir’s picture

Status: Needs review » Needs work

Reviewed. Tagging this with "Novice" seems.. brave, lots of special cases here to think about.

quietone changed the visibility of the branch 3094865-fix-references-to to hidden.

quietone changed the visibility of the branch 3094865-fix-references-to to active.

quietone’s picture

Status: Needs work » Needs review

@Berdir, thanks for the review. I responded to all the comments.

Good point about the novice tag, so I will remove it.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @quietone, the adjustments looks good to me. I changed "a Action entity" to "an Action entity", think it's still OK for me to RTBC this then.

  • catch committed 0fd4bdcb on 11.x
    Issue #3094865 by quietone, _utsavsharma, hchonov, Berdir, smustgrave,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Doesn't cherry-pick cleanly to 11.0.x, so just marking fixed.

Status: Fixed » Closed (fixed)

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