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

Require non-whitelisted namespaces to use an alias #1619

Open
TravisCarden opened this issue Sep 7, 2023 · 0 comments
Open

Require non-whitelisted namespaces to use an alias #1619

TravisCarden opened this issue Sep 7, 2023 · 0 comments

Comments

@TravisCarden
Copy link

This is almost (but not quite) a request for the opposite of SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces:

I want to require all third-party namespaces to use aliases. To that end, I would like a rule that forces all namespaces to use one, with a configurable whitelist. I could imagine something like this, for example:

<rule ref="SlevomatCodingStandard.Namespaces.RequireNamespaceAliases">
    <properties>
        <property name="namespacesAllowedWithoutAliases" type="array">
            <element value="MyOrg\MyProject"/>
        </property>
    </properties>
</rule>
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

No branches or pull requests

1 participant