PHP classes in the same namespace are not detected correctly · Issue #64 · SublimeCodeIntel/SublimeCodeIntel · GitHub
Skip to content

PHP classes in the same namespace are not detected correctly #64

Description

@simensen

Assuming that AppWrapper is in the \My\Silex\Application namespace as well, the following confuses the code hinting:

<?php
namespace My\Silex\Application;

use \Silex\Application;
use \Silex\ControllerProviderInterface;
use \Silex\ControllerCollection;

class AppControllerProvider implements ControllerProviderInterface
{
    public function connect(Application $appOrig)
    {
        $app = new AppWrapper($appOrig);
       // $app-> triggers "could not resolve first part of 'AppWrapper'
    }
}

Meanwhile, the following works just fine (but is not and should not be required):

<?php
namespace My\Silex\Application;

use \Silex\Application;
use \Silex\ControllerProviderInterface;
use \Silex\ControllerCollection;

class AppControllerProvider implements ControllerProviderInterface
{
    public function connect(Application $appOrig)
    {
        $app = new \My\Silex\Application\AppWrapper($appOrig);
        // $app-> triggers code completion as expected
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions