Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Parent Issue
#2359437: [meta] Remove entity_load* family of functions usage from the code base
Problem/Motivation
There are cases where entities of the tour entity type are retrieved using the functional loader, entity_load()
Proposed resolution
Replace calls to entity_load('tour', ...)
with Tour::load*()
Comment | File | Size | Author |
---|---|---|---|
#3 | 2723631.patch | 1.52 KB | pbuyle |
Comments
Comment #2
pbuyle CreditAttribution: pbuyle at Floe design + technologies commentedI'm at DrupalCon NOLA and looking into this.
Comment #3
pbuyle CreditAttribution: pbuyle at Floe design + technologies commentedI found two occurrences of
entity_load(_multiple(_by_properties)?)?\('tour'
. The attached patch removes them.Comment #5
pbuyle CreditAttribution: pbuyle at Floe design + technologies commentedTests are passing now.
Comment #6
Mile23OK, not sure what's up with the tests, re-running.
Comment #7
John Cook CreditAttribution: John Cook commentedUpdated summary.
Comment #8
John Cook CreditAttribution: John Cook commentedAfter applying the patch from #3, there are no more occurences of entity_load*\('tour'
Comment #10
valthebaldIt's better not to set the status to RTBC until testbot gives its ok
Comment #11
John Cook CreditAttribution: John Cook commented@valthebald the test had passed when I set it to RTBC. I think the testbot is in a bad mood ;)
Resetting to Needs Review to run the tests.
Comment #12
Mile23The way to run the tests now is to click 'add tests' in the test results.
I just ran them which is why it failed.
If you click on the result, it shows you a log of what failed. In this case, I think it might be unrelated, since that migrate test has been flaking out in general.
Comment #14
Mile23It looks like the problem test was fixed: #2725755: Fatal error: Cannot redeclare class Drupal\Tests\migrate\Unit\TestMigration
Re-running the test.
Comment #16
John Cook CreditAttribution: John Cook commentedAs the testbot has given the green light, setting back to RTBC for #3.
Comment #17
catchCommitted 4bc14c7 and pushed to 8.2.x. Thanks!