-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Bump PHPStan level to 2 #721
Conversation
src/Document/CategoryManager.php
Outdated
@@ -24,7 +24,7 @@ public function getPager(array $criteria, $page, $limit = 10, array $sort = []) | |||
{ | |||
$parameters = []; | |||
|
|||
$query = $this->getRepository() | |||
$query = $this->getDocumentManager() |
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.
I think this would be something like:
$query = $this->getDocumentManager()->createQueryBuilder();
$query->field('enabled')->equals($criteria['enabled'] ?? true);
$pager = new Pager();
$pager->setMaxPerPage($limit);
$pager->setQuery(new ProxyQuery($query));
// ...
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.
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.
Yeah, this looks fine and I would say it has never worked before, those methods did not exist in the odm 😕
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.
Fixed in #724.
Thank you so much.
Thanks @phansys ! |
Subject
Bump PHPStan level to 2.
I am targeting this branch, because these changes respect BC.
Changelog
To do