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.

CommentFileSizeAuthor
#1 dat-2147503.patch1.21 KBamateescu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

Status: Active » Needs review
FileSize
1.21 KB

And a patch.

Status: Needs review » Needs work

The last submitted patch, 1: dat-2147503.patch, failed testing.

amateescu’s picture

Status: Needs work » Needs review

1: dat-2147503.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1: dat-2147503.patch, failed testing.

amateescu’s picture

Status: Needs work » Needs review

1: dat-2147503.patch queued for re-testing.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

I guess we never run this code at the moment? Don't we need tests then? If not, here is a RTBC.

amateescu’s picture

I don't think we can test a condition that tries to match a class that doesn't exist anymore :)

dawehner’s picture

Well, 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?

amateescu’s picture

Apparently, 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

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Yay 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.

amateescu’s picture

Interesting 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/

Status: Fixed » Closed (fixed)

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