-
Notifications
You must be signed in to change notification settings - Fork 72
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
Custom phpdoc getting removed #193
Comments
Hm, I'm experiencing the same issue, where the plugin (or ide-helper) doesn't automatically create Unfortunately this is a dilemma, and the only solution I can see would be if the model stub generation (by ide-helper) would resolve types in existing PHPDoc, or just copied the imports as well. 🤔 |
@caugner I don't understand what you mean. Didn't you add |
@eithed So the reason I added |
Ah, I see, thank you for the explanation - in my case I've used the class name including namespace hence it would work, but I can see now why that will not always be the case. I guess the solution is to either:
Will try to create a PR for |
Is there any hope this issue can be resolved soon? Sadly, it renders psalm almost unusable for my use case (baked-in phpdoc generated from ide-helper vs generated from psalm-plugin). |
@frostfire64 up for a PR? |
Is your feature request related to a problem? Please describe.
When investigating an issue that was ultimately reported on barryvdh/laravel-ide-helper#1236 I've found that, within psalm plugin,
php artisan ide-helper:models
command is run with'--reset' => true,
parameter, thus removing phpdoc blocks that are provided ie withinModelStubProvider::generateStubFile
:In my case class for which I'm running psalm has following declaration:
(with
Serializer::get
returningmixed
type) and as such will be generated within_ide_helper_models.php
as this:But within
models.stubphp
, because phpdoc is ignored, it'll be generated as this:Currently I don't see any other issues when operating on the
$premium
parameter, but I can imagine that as soon as I'll try to access a property / method that exists on\App\DTO\QuoteGroup\Premium
I'll get a false positive about missing property / method when running analysis for mixed.Describe the solution you'd like
to change to:
Describe alternatives you've considered
I don't think there are any alternatives
The text was updated successfully, but these errors were encountered: