Updated the generator phpdoc to help identifier magic methods#307
Updated the generator phpdoc to help identifier magic methods#307pimjansen merged 1 commit intoFakerPHP:mainfrom pimjansen:feature/updated-refs-generator
Conversation
|
For the ones that get worse, this is due the fact that no return type has been specified on the methods itself. Do we want to drag this into scope or not? If yes then we need to modify those blocks as well |
|
@localheinz can you assist in the weird phpstan error? Can't resolve it somehow. Also when running it locally im getting phpstan errors. Could be the fact that its running php 8 locally though. |
bram-pkg
left a comment
There was a problem hiding this comment.
Ignored error pattern #^Return typehint of method Faker\\Provider\\me_ME\\Address\:\:localCoordinates\(\) has invalid type Faker\\Provider\\latitude\.$# in path /home/runner/work/Faker/Faker/src/Faker/Provider/me_ME/Address.php was not matched in reported errors.
Maybe that error should be fixed
| * @example array('77.147489', '86.211205') | ||
| * | ||
| * @return array | latitude, longitude | ||
| * @return float[] |
There was a problem hiding this comment.
| * @return float[] | |
| * @return array{0: float, 1: float} |
| * | ||
| * @return void; |
There was a problem hiding this comment.
| * | |
| * @return void; |
|
Can you verify whether you have Xdebug enabled? Disabling it should fix the error. As @bramceulemans suggested, you should be able to regenerate the baseline afterwards! |
|
What do you think about running the script that updates the DocBlock in GitHub Actions? This way we could ensure that
|
Could do but maybe its a bit too much magic and it reduces the actual understanding what everything does imo. Concerning the issue, the error is a bit odd since the method actually is no phpdoc defined that gives the error. But let me run without xdebug |
|
@localheinz seems that PHPstan version is not running fine on PHP8. Lets modify that in the future. I will downgrade locally to 7.4 instead where it runs fine |
|
Do you known when this will be released ? |
|
Unknown yet. Since its not a bug we are not pushing an extra release for this |
|
It's still pretty inconvenient. Please consider it, unless you're close to your next release. Also you should probably not close issues like #303 until this is merged into main: it gives the false impression the issue is fixed while it isn't. You can use closing keywords in your PR description like "Fix #303" for it to automatically happen upon merge. |
|
@pimjansen any chance to tag a release including that fix ? It's been more than 2 months since the fix was done now. |
|
|
There's one thing that got worse in this update: |
|
Hey, something else is broken here. Was using the |
What is the reason for this PR?
As mentioned in #303 there are some problems with static code analysis for our deprecation warnings in 1.14. With this PR i did some reflection and generated a new PHPDoc to match the actual code itself
Author's checklist
Review checklist