Closed ezzatron closed 6 years ago
This PR adds interfaces to the list of types that can be imported from the global namespace.
You might remember me from 4 years ago (😮) when I raised #13/#14, and I can't believe it's taken me so long to submit a PR to fix this!
Basically, when #13 was addressed, you ended up using get_declared_classes(), which covers classes, but not interfaces. To include interfaces you also need get_declared_interfaces().
Note that ever since PHP 5.4, there is also get_declared_traits(), but there are currently no traits in the PHP standard library, and since it would require some tricks to continue 5.3 support, I decided not to add that in this PR.
Hey ! Welcome back @ezzatron !
I can't believe it took me so long to merge your work ! Sorry for that and thank for the PR !
This PR adds interfaces to the list of types that can be imported from the global namespace.
You might remember me from 4 years ago (😮) when I raised #13/#14, and I can't believe it's taken me so long to submit a PR to fix this!
Basically, when #13 was addressed, you ended up using get_declared_classes(), which covers classes, but not interfaces. To include interfaces you also need get_declared_interfaces().
Note that ever since PHP 5.4, there is also get_declared_traits(), but there are currently no traits in the PHP standard library, and since it would require some tricks to continue 5.3 support, I decided not to add that in this PR.