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

ReferenceUsedNamesOnly allows partial uses in annotation even when denied #1635

Open
janedbal opened this issue Nov 1, 2023 · 0 comments
Open

Comments

@janedbal
Copy link
Contributor

janedbal commented Nov 1, 2023

Given this config

<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
        <properties>
            <property name="allowPartialUses" value="false"/>
            <property name="searchAnnotations" value="true"/>
        </properties>
</rule>

And this analysed file

<?php

use Gedmo\Mapping\Annotation as Gedmo;

/**
 * @Gedmo\SoftDeleteable
 */
class SomeEntity {}

new Gedmo\SoftDeleteable();

I'm getting error only on line 10 (new), not on line 6 (annotation).

-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 10 | ERROR | Partial use statements are not allowed, but referencing Gedmo\SoftDeleteable found.
    |       | (SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.PartialUse)
-----------------------------------------------------------------------------------------------------------
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