-
Notifications
You must be signed in to change notification settings - Fork 399
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
Fix Collection return type in Query class template #1989
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1989 +/- ##
=========================================
Coverage 89.28% 89.28%
Complexity 8058 8058
=========================================
Files 232 232
Lines 24534 24534
=========================================
Hits 21905 21905
Misses 2629 2629
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks @tsybenko for the PR! Unfortunately the issue is not in the FQCN, the a wrong recognition of psalm class intersection (&), which triggers Phpstorm to recognise Collection as a magic function name 🙈 With FQCN, IDEs don't recognize this row complete, so we can use that to temporary fix it for psalm notation without losing information. |
@@ -77,12 +77,12 @@ | |||
* @method <?= $modelClass ?> requireOneBy<?= $column->getPhpName() ?>(<?= $column->getPhpType() ?> $<?= $column->getName() ?>) Return the first <?= $modelClass ?> filtered by the <?= $column->getName() ?> column and throws <?= $entityNotFoundExceptionClass ?> when not found | |||
<?php endforeach;?> | |||
* | |||
* @method <?= $modelClass ?>[]|Collection find(?ConnectionInterface $con = null) Return <?= $modelClass ?> objects based on current ModelCriteria | |||
* @psalm-method Collection&\Traversable<<?= $modelClass ?>> find(?ConnectionInterface $con = null) Return <?= $modelClass ?> objects based on current ModelCriteria | |||
* @method <?= $modelClass ?>[]|\Propel\Runtime\Collection\Collection find(?ConnectionInterface $con = null) Return <?= $modelClass ?> objects based on current ModelCriteria |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard Phpdoc is fine with this notation, as there is already a declaraction above in use.
Please update only psalm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard phpdoc should remain, otherwise it triggers overqualification issue in IDE.
Fixes #1975