Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
plugin system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Dec 2013 at 12:35 UTC
Updated:
29 Jul 2014 at 23:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
amateescu commentedAnd a patch.
Comment #3
amateescu commented1: dat-2147503.patch queued for re-testing.
Comment #5
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 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 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 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/