PhpStorm shows 'Multiple definitions exist for class' warnings. It breaks code assistance.
Check the following screenshots.



It seems to be related to stubs defined in the package.
Declaring a model is an example.
<?php
declare(strict_types=1);
namespace Domain\Campaign\Model;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
}
Very interesting!
@mariomka We are not sure how to improve this. Can you investigate this?
The stubs in Larastan are not even php files. They have .stub extensions for this very reason.
So check your IDE settings, I believe you associated stub extension with PHP files.
@canvural Yep! I removed .stub extension from PHP file types. I don't know if this extension is set by default or maybe I added it.
Thank you all.
Most helpful comment
The stubs in Larastan are not even php files. They have
.stubextensions for this very reason.So check your IDE settings, I believe you associated
stubextension with PHP files.