Version: 4.1.0 (using KDE 4.5.2) OS: Linux Current PHP namespace support is restricted to - Specifying the working namespace with the 'namespace' keyword - Accessing classes etc. contained in namespaces by specifying the namespace (not by fully qualified path) Features that are still missing are - Accessing classes etc. by their fully qualified paths (starting with '\' - starting in the "global" namespace, eg. \Foo\Bar) - therefore attempts to access a class contained in a namespace while in another namespace are considered syntax errors (See http://www.php.net/manual/en/language.namespaces.global.php) - The use statement support (See https://bugs.kde.org/show_bug.cgi?id=244040, http://php.net/manual/en/language.namespaces.importing.php) Reproducible: Always
very true, I really have to fix this up and improve the halfbaked situation I shipped with 4.1 :-S bye
Some news? On Debian Sid with kdevelop-php 1.5.1-1 I've problem with namespace and not fully qualified path. Thanks :)
*** Bug 325985 has been marked as a duplicate of this bug. ***
Git commit 853286ec7c3004fc55628c10e05f1c5a5522db53 by Heinz Wiesinger. Committed on 23/09/2013 at 17:21. Pushed by wiesinger into branch 'master'. Handle global variables in namespaces correctly. PHP does not support namespaced variables. Variable declarations inside a namespace are just global declarations. REVIEW: 115117 M +6 -0 duchain/builders/declarationbuilder.cpp M +25 -13 duchain/expressionvisitor.cpp M +2 -1 duchain/expressionvisitor.h M +42 -1 duchain/tests/uses.cpp M +3 -0 duchain/tests/uses.h http://commits.kde.org/kdev-php/853286ec7c3004fc55628c10e05f1c5a5522db53
Git commit 536a3a186bd937642095fd99079e24a2a98939c7 by Heinz Wiesinger. Committed on 19/01/2014 at 16:21. Pushed by wiesinger into branch 'master'. Fix support for PHP namespaces. Make sure use declarations actually find their original declarations and implement lookup for definitions within the same namespace but in a different file. Also handle name conflicts. Related: bug 244040 REVIEW: 115158 M +34 -9 duchain/builders/declarationbuilder.cpp M +110 -62 duchain/helper.cpp M +9 -0 duchain/helper.h M +11 -0 duchain/tests/expressionparser.cpp M +1 -0 duchain/tests/expressionparser.h M +26 -15 duchain/tests/uses.cpp http://commits.kde.org/kdev-php/536a3a186bd937642095fd99079e24a2a98939c7
The namespaces support seems to be pretty stable at the moment so I'm closing this