-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Duplicate namespaces in resources/stubs #38
Comments
Hi @Faboslav.
|
Oh, i am ignoring it all right, but PSALM and PHPStan doesnt know that. |
You can ignore vendor directory via psalm config <?xml version="1.0"?>
<psalm>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm> |
But i want to resolve that error which Is generated by PSALM caused by two identical namespaces in this package, which Is in general bad practice, right? |
It is possible to make annotations with named arguments like this: #34 |
What, do we understand each other? Annotations are working great, but why do we need to have two identical namespaces? That Is highly unusual right? And static analytic can't deal with that. |
Psalm does not check fake attributes (stubs) because they are not added in composer.json psr-4 section. Psalm sees this signature annotated/src/Annotation/Column.php Line 54 in 57be2ac
and says that your definition There are two solutions: |
Okay, i get it now, thanks for your explanation and patience. |
No problem. By the way. Instead of full ignoring some project files you can configure suppression for the <?xml version="1.0"?>
<psalm
...
>
...
<issueHandlers>
...
<InvalidNamedArgument>
<errorLevel type="suppress">
<directory name="vendor/cycle/annotated/src/Annotation" />
</errorLevel>
</InvalidNamedArgument>
</issueHandlers>
</psalm> |
Fixed in annotated v3.0.0 (Cycle ORM v2.0) |
Oh this is cool, thank you for your hard work! |
For example there is
namespace Cycle\Annotated\Annotation;
located inresources/stubs
and also insrc/Annotation
. This can't be right, right? It is messing with psalm and other alike tools. Is there any solution for that?Error generated by psalm looks like this:
It is probably using the first occurence in alphabet for that namespace?
The text was updated successfully, but these errors were encountered: