Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 178861 - Using PHP 5.3 namespaces: Aliasing/Importing
Using PHP 5.3 namespaces: Aliasing/Importing
Status: RESOLVED WORKSFORME
Product: php
Classification: Unclassified
Component: Editor
6.x
All All
: P1 with 1 vote (vote)
: 7.2
Assigned To: Ondrej Brejla
issues@php
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-18 08:23 UTC by jozefh
Modified: 2012-04-24 13:23 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
no suggestion for alias (18.92 KB, image/png)
2009-12-18 08:23 UTC, jozefh
Details
No suggestion for alias 2 (9.31 KB, image/png)
2009-12-18 08:24 UTC, jozefh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jozefh 2009-12-18 08:23:11 UTC
Created attachment 92761 [details]
no suggestion for alias

No suggestion for aliased classes (?)
Please look at attached screenshots and PHP manual.
http://www.php.net/manual/en/language.namespaces.importing.php
Comment 1 jozefh 2009-12-18 08:24:42 UTC
Created attachment 92762 [details]
No suggestion for alias 2
Comment 2 rmatous 2009-12-18 08:45:01 UTC
right, not implemented yet
Comment 3 Tomas Mysik 2010-03-18 09:59:22 UTC
Will be done for NB 6.9+.
Comment 4 chEbba 2010-07-30 07:41:46 UTC
Any news?
Very important feature.
Comment 5 rmatous 2010-07-30 15:18:35 UTC
Started:
1. phase implemented:
http://hg.netbeans.org/web-main/rev/5a36d29b2309
#178861 - Using PHP 5.3 namespaces: Aliasing/Importing
- started CC for aliased types
- still missing: CC for functions and constants and type inference for aliases

Code like:
use My\Full\Classname as Another, My\Full\NSname;
use My\Full\Function as Fnc, My\Full\NSname;

Anothe| //works
$obj = new Anothe|;//works
$obj->| //doesn't work yet
Fnc| //doesn't work yet

known bugs:
no CC for "new Another" in case Another doesn't have declared constructor
CC for Classnam| should generate FQN

The 1 part can be tested on build newer than #2129:
http://bertram.netbeans.org/hudson/job/PHP-build/

Will be continued.
Comment 6 Quality Engineering 2010-07-31 03:30:51 UTC
Integrated into 'main-golden', will be available in build *201007310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/5a36d29b2309
User: Radek Matous <rmatous@netbeans.org>
Log: #178861 - Using PHP 5.3 namespaces: Aliasing/Importing
- started CC for aliased types
- still missing: CC for functions and constants and type inference for aliases
Comment 7 Quality Engineering 2010-08-05 03:20:25 UTC
Integrated into 'main-golden', will be available in build *201008050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/2ad2ba61b8e3
User: Radek Matous <rmatous@netbeans.org>
Log: #178861 - Using PHP 5.3 namespaces: Aliasing/Importing - phase II
Comment 8 Quality Engineering 2010-08-10 03:12:24 UTC
Integrated into 'main-golden', will be available in build *201008100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/33e54a70579f
User: Radek Matous <rmatous@netbeans.org>
Log: #178861 - Using PHP 5.3 namespaces: Aliasing/Importing - finished
Comment 9 pcdinh 2010-08-16 16:39:32 UTC
The support for namespace alias is not complete yet. "Go to Declaration" still does not make difference between full qualified class name and aliased one

Screen shot: http://twitpic.com/2fcors/full

--------

Product Version: NetBeans IDE Dev (Build 2010-08-11_15-32-39 )
Java: 1.6.0_21-ea; Java HotSpot(TM) Client VM 17.0-b15
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\Pcdinh\.netbeans\dev
Comment 10 Filip Zamboj 2010-09-15 12:07:00 UTC
batch reassigning
Comment 11 satazor 2012-01-01 13:22:09 UTC
It would be very usefull if we have detection of unused imports (use statements) just like java.
Comment 12 beeboo 2012-02-03 19:19:20 UTC
Is there any further updates to this? The items marked as 'not working' represent serious functionality breaks when working with heavily namespaced code (Symfony2 for example).
Comment 13 Ondrej Brejla 2012-04-24 13:23:26 UTC
Works properly for me in 7.2.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo