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

Not adding prefixes to names in the same namespace #460

Merged
merged 34 commits into from
May 10, 2021
Merged

Not adding prefixes to names in the same namespace #460

merged 34 commits into from
May 10, 2021

Conversation

marekdedic
Copy link
Contributor

@marekdedic marekdedic commented Mar 2, 2021

Basically a continuation of #457.

Here, I focus on names in same namespace, such as

namespace X\Y {
    class Foo {}
}

namespace X {
    $foo = new Y\Foo();
}

Here, Y\Foo doesn't need to be prefixed or made FQ as it is referencing something in the same namespace. So let's make php-scoper not add the prefix where it isn't necessary :)

@marekdedic marekdedic marked this pull request as ready for review April 15, 2021 08:34
@theofidry theofidry merged commit 98c92f2 into humbug:master May 10, 2021
@theofidry
Copy link
Member

Thanks a lot @marekdedic

@marekdedic marekdedic deleted the no-prefix-in-namespace branch May 20, 2021 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants