Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface stubs have relative namespace #2016

Closed
ruudboon opened this issue Nov 18, 2019 · 1 comment
Assignees
Labels
bug

Comments

@ruudboon
Copy link
Member

@ruudboon ruudboon commented Nov 18, 2019

Generating stubs for the file below using the latest zephir from the master branch

namespace Phalcon\Storage\Adapter;

abstract class AbstractAdapter implements AdapterInterface
{
}

Will generate a stub like this

<?php
namespace Phalcon\Storage\Adapter;

abstract class AbstractAdapter implements Phalcon\Storage\Adapter\AdapterInterface
{
}

Expected result:

<?php
namespace Phalcon\Storage\Adapter;

abstract class AbstractAdapter implements \Phalcon\Storage\Adapter\AdapterInterface
{
}

This also occurs when extending interfaces

namespace Phalcon\Mvc;

interface ViewInterface extends ViewBaseInterface
{
}

Generated stub

<?php
namespace Phalcon\Mvc;
interface ViewInterface extends Phalcon\Mvc\ViewBaseInterface
{

}

Expected

<?php
namespace Phalcon\Mvc;
interface ViewInterface extends \Phalcon\Mvc\ViewBaseInterface
{

}
ruudboon added a commit to ruudboon/ide-stubs that referenced this issue Nov 18, 2019
@sergeyklay sergeyklay added the bug label Nov 20, 2019
@sergeyklay

This comment has been minimized.

Copy link
Member

@sergeyklay sergeyklay commented Nov 20, 2019

Fixed in the development branch. Feel free to open a new issue if the problem appears again. Thank you for the bug report.

@sergeyklay sergeyklay closed this Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.