whiteoctober / Pagerfanta

Pagination for PHP.
Other
1.59k stars 2 forks source link

Class or interface Pagerfanta\Boolean does not exist #266

Closed demenkov closed 5 years ago

demenkov commented 5 years ago

https://github.com/whiteoctober/Pagerfanta/blob/f71a529c7a2711ec830396eb2bcc11d14ab0fde8/src/Pagerfanta/Pagerfanta.php#L65

Hello! When i'm try to use psalm static analyzer, it produce an error.

Class or interface Pagerfanta\Boolean does not exist

Please can you use lowercase typehints, like in other methods. Because analyzer thinks it's PSR-4 classname (starts with capital letter).

sampart commented 5 years ago

Fixed by that PR :+1: Thanks for raising this one, @demenkov

omgmashina commented 5 years ago

Hello! When do you want to release this fix?

sampart commented 5 years ago

Hi @omgmashina. We don't have a release schedule, but if you need this then I can make a new release now. Would that be helpful?

omgmashina commented 5 years ago

This would be great. I'm asking, because I see regular commits, but the last release was more than six months ago.

sampart commented 5 years ago

Sure thing, @omgmashina. This is now included in this release: https://github.com/whiteoctober/Pagerfanta/releases/tag/v2.1.0

omgmashina commented 5 years ago

And since we're talking about releases, it would be nice to also make a release of WhiteOctoberPagerfantaBundle so that these changes are included in the bundle.

sampart commented 5 years ago

Sure thing. I've made a new release since you asked: https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle/releases/tag/v1.2.4

But these changes to Pagerfanta don't require one - composer.yml for the bundle includes this line:

"pagerfanta/pagerfanta": "^1.1.0|^2.0.0",

So you can just do composer update pagerfanta/pagerfanta.

Hope this helps.

omgmashina commented 5 years ago

Maybe I do not understand something, but there are no changes about wrong type-hints in the release.

stof commented 5 years ago

@omgmashina PagerfantaBundle does not contain the Pagerfanta library. It depends on it. So there is indeed no such changes in the PagerfantaBundle release, because the bundle did not make any change for that (the existing requirement already allowed installing the new Pagerfanta release)

omgmashina commented 5 years ago

I understand, but after downloading the source code from the Pagerfanta's release page and going to the Pagerfanta class or simply opening it in the master branch, I did not see any changes about wrong Boolean type-hints.

stof commented 5 years ago

this PR was not actually about typehints but about phpdoc (the description of the issue gets it wrong)

omgmashina commented 5 years ago

I am talking about these lines.

https://github.com/whiteoctober/Pagerfanta/blob/2c5f85548646808b5ebc6a73d2048f4222fa1763/src/Pagerfanta/Pagerfanta.php#L79 https://github.com/whiteoctober/Pagerfanta/blob/2c5f85548646808b5ebc6a73d2048f4222fa1763/src/Pagerfanta/Pagerfanta.php#L103 https://github.com/whiteoctober/Pagerfanta/blob/2c5f85548646808b5ebc6a73d2048f4222fa1763/src/Pagerfanta/Pagerfanta.php#L401 https://github.com/whiteoctober/Pagerfanta/blob/2c5f85548646808b5ebc6a73d2048f4222fa1763/src/Pagerfanta/Pagerfanta.php#L411 https://github.com/whiteoctober/Pagerfanta/blob/2c5f85548646808b5ebc6a73d2048f4222fa1763/src/Pagerfanta/Pagerfanta.php#L437

stof commented 5 years ago

Well, it looks like #267 was incomplete. It fixed phpdoc for arguments, but not for return values.