Skip to content
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

Error while sorting pagination due to signature inconsistency with Doctrine interface. #330

Closed
clementvtrd opened this issue Mar 8, 2024 · 1 comment · Fixed by #329
Closed
Assignees
Labels

Comments

@clementvtrd
Copy link
Contributor

clementvtrd commented Mar 8, 2024

While using the knp_pagination_sortable function in Twig template, it throws the following exception due to an inconsistency in Doctrine.

Fatal error: Declaration of Knp\Component\Pager\Event\Subscriber\Sortable\Doctrine\ORM\Query\OrderByWalker::walkSelectStatement(Doctrine\ORM\Query\AST\SelectStatement $AST): string must be compatible with Doctrine\ORM\Query\TreeWalkerAdapter::walkSelectStatement(Doctrine\ORM\Query\AST\SelectStatement $selectStatement): void in /app/vendor/knplabs/knp-components/src/Knp/Component/Pager/Event/Subscriber/Sortable/Doctrine/ORM/Query/OrderByWalker.php on line 37

Here is a little project with a simple movie CRUD where the issue has been reproduced: KnpLabs/knp_pagination_sortable_issue

@clementvtrd clementvtrd added the bug label Mar 8, 2024
@clementvtrd clementvtrd linked a pull request Mar 8, 2024 that will close this issue
@clementvtrd
Copy link
Contributor Author

Hi @Grafikart 👋.

I saw your tutorial on Symfony Pagination and we suggested the above fix so that the next viewers won't have any issues with the KnpPaginatorBundle anymore.

@garak garak closed this as completed in #329 Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants