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.
This is the first issue of the DAT initiative!
In core/lib/Drupal/Core/Plugin/Context/Context.php
we have a reference to the EntityWrapper class, which is no longer with us. Let's fix it.
Comment | File | Size | Author |
---|---|---|---|
#1 | dat-2147503.patch | 1.21 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedAnd a patch.
Comment #3
amateescu CreditAttribution: amateescu commented1: dat-2147503.patch queued for re-testing.
Comment #5
amateescu CreditAttribution: amateescu commented1: dat-2147503.patch queued for re-testing.
Comment #6
dawehnerI guess we never run this code at the moment? Don't we need tests then? If not, here is a RTBC.
Comment #7
amateescu CreditAttribution: amateescu commentedI don't think we can test a condition that tries to match a class that doesn't exist anymore :)
Comment #8
dawehnerWell, previously the code never want into that part of the if statement, otherwise it would have failed. Would it be possible to have $is_complex = TRUE and go to that bit of the code?
Comment #9
amateescu CreditAttribution: amateescu commentedApparently, even if we got to that code path, we wouldn't get any error for a class that doesn't exist: http://3v4l.org/9OZpP
Comment #10
webchickYay less code and less @todos! Committed and pushed to 8.x.
Curious. Do you think it'd be possible at all to somehow write an automated test that checked for unused "use" statements? I'm sure there's gotta be other ones lurking around, and we seem to only find them on an ad-hoc basis.
Comment #11
amateescu CreditAttribution: amateescu commentedInteresting idea. Seems that it's quite easy to do manually by someone using PhpStorm: http://blog.jetbrains.com/webide/2013/03/optimize-imports-for-php/