Improve resolution of namespaced identifiers.

Authored by pprkut on Aug 14 2018, 3:21 PM.



The PST has problems matching qualified identifiers explicitely
set to global with declarations. To work around this we normalize
the namespaced identifier to be always absolute.

This means that namespace resolution inside findDeclarationImportHelper
should be correct now, but may need several calls to find the declaration
we're looking for according to the correct rules. Unfortunately, the rules
are different for classes, use declarations, functions, constants, etc.
That's why it really needs to be call-side decision on what fallbacks can
or can't be used.

BUG: 373416
FIXED-IN: 5.3.0

Diff Detail

R52 KDevelop: PHP Support
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
pprkut created this revision.Aug 14 2018, 3:21 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptAug 14 2018, 3:21 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
pprkut requested review of this revision.Aug 14 2018, 3:21 PM
brauch accepted this revision.Aug 17 2018, 9:31 AM
brauch added a subscriber: brauch.

As I said at Akademy already, I am neither familiar with the code of the PHP plugin nor with the later developments in the language itself, so I'm not a good reviewer for these patches. But since you want to get them in and nobody else seems to have time, I have read through this and I can't spot anything obviously wrong or stupid. We'll have a beta to try it out :)

This revision is now accepted and ready to land.Aug 17 2018, 9:31 AM
This revision was automatically updated to reflect the committed changes.