KnpLabs / KnpLabs/knp-components
Conflict over doctrine output walker
- Dominant language
- PHP
- Stars
- 773
- Forks
- 139
- Avg merge
- 22h 3m
- Merged PRs (30d)
- 1
Description
In the following code the `TranslationWalker` will be replaced by KnpPaginator and won't be applied.
```php
$page = 1;
$limit = 1000;
$query = $repo->createQueryBuilder('a')
->getQuery()
->setHint(
Query::HINT_CUSTOM_OUTPUT_WALKER,
'\Gedmo\Translatable\Query\TreeWalker\TranslationWalker'
)
;
$paginator = $this->container->get('knp_paginator');
$pagination = $paginator->paginate($query, $page, $limit, ['distinct' => false]);
```
Extra check [here](https://github.com/KnpLabs/knp-components/blob/cce94c7/src/Knp/Component/Pager/Event/Subscriber/Paginate/Doctrine/ORM/QuerySubscriber.php#L43) will solve the problem.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Doctrine ORM QuerySubscriber code linked in the issue, then compare how it handles the custom output walker with the TranslationWalker example. Verify the paginator preserves the configured walker instead of replacing it, and confirm the behavior with the repository's existing tests or a focused reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100