[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [kdevelop] [Bug 325985] New: PHP: Fully support namespaces
From:       Andrew Udvare <audvare () gmail ! com>
Date:       2013-10-14 2:07:27
Message-ID: bug-325985-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=325985

            Bug ID: 325985
           Summary: PHP: Fully support namespaces
    Classification: Unclassified
           Product: kdevelop
           Version: 4.5.1
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: PHP
          Assignee: kdevelop-bugs-null@kde.org
          Reporter: audvare@gmail.com

The KDevelop PHP extension works well with code that makes no use of
namespaces, but when namespaces are used, very few things work, especially
across classes and using use statements.

In short, just like the C++ built-in plugin, support namespaces but also accept
the as keyword in the use statement to resolve the same class.

<?php
namespace VendorName/SomeComponent;

use Doctrine\Collections\ArrayCollection;

class Puzzle extends ArrayCollection
{
}

Another file:
<?php
namespace VendorName/SomeComponent;

use SomeLibrary\Piece as TheirPieceImpl;

class Piece extends TheirPieceImpl
{
}

If another file does this:
use SomeLibrary\Piece;
use VendorName\SomeComponent\Puzzle;

$puzzle = new Puzzle();
$piece = new Piece('a');
$puzzle->addPiece($piece->(ctrl+space)); // expect method completion here

It would be acceptable if 2 classes were named the same entirely and found in
the hierarchy that the first be the one to get methods and properties from. But
the main goal here is that typing Puzzle() is treated the same as typing
VendorName/SomeComponent\Puzzle() due to the use statement.

Reproducible: Always

Steps to Reproduce:
1. Open project that uses namespaces
2. Attempt to auto-complete a method with a class that is mentioned via use
statement

Actual Results:  
Only Kate auto-completion results appear.

Expected Results:  
KDevelop's auto-complete results should appear (method names, properties, etc).

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic