VersioncontrolEntityController is a precursor to DrupalDefaultEntityController and quite a bit of code is the same. When working on #2168239: Store, and use, commit hashes of packaged projects, I got to a notice in VersioncontrolEntityController::cacheGet(). I tried this out in case it solved the issue, it did not; so this is only lightly tested.

This updates VersioncontrolEntityController::cacheGet() to match DrupalDefaultEntityController::cacheGet(). In the future, VersioncontrolEntityController might be replaced with DrupalDefaultEntityController, especially if this helps clean up for a D8 upgrade.

(My notice was with 'branches' in $conditions. Since that’s not a normal property, the conditions checking code wouldn’t work well. I worked around it by using the ['may cache' => FALSE] option.)

CommentFileSizeAuthor
#2 2761637.diff1.77 KBdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm created an issue. See original summary.

drumm’s picture

Here is the patch.

drumm’s picture

Status: Active » Needs review

  • marvil07 committed 9c46ae6 on 7.x-1.x authored by drumm
    Issue #2761637 by drumm: Update VersioncontrolEntityController::cacheGet...
marvil07’s picture

Status: Needs review » Fixed

I now only vaguely remember the differences between what @sdboyer introduced in 2010 during TGGM and what was on to-be-D7 at the time that was added to D6 versioncontrol :-)

Yes, the plan for D8 would be to reuse as much as possible from core; in D7 port we by-passed the re-use on purpose, but I do not remember those details neither now.

The change looks good, it's now included; thanks for the detailed explanation!

Status: Fixed » Closed (fixed)

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