Skip to content

Commit

Permalink
Merge pull request #788 from KnpLabs/fix-tests
Browse files Browse the repository at this point in the history
fix tests
  • Loading branch information
garak authored Apr 30, 2024
2 parents 2f60ea2 + 2b9b216 commit e251513
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ parameters:

-
message: "#^Parameter \\#1 \\$name of method Twig\\\\Environment\\:\\:render\\(\\) expects string\\|Twig\\\\TemplateWrapper, string\\|null given\\.$#"
count: 3
count: 4
path: src/Twig/Extension/PaginationRuntime.php

5 changes: 2 additions & 3 deletions src/Twig/Extension/PaginationRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ public function rel_links(
?array $queryParams = [],
?array $viewParams = [],
): string {
dump($template ?: $pagination->getRelLinksTemplate());
dump($this->processor->render($pagination, $queryParams ?? [], $viewParams ?? []));
return $env->render(
$template ?: $pagination->getRelLinksTemplate(),
$this->processor->render($pagination, $queryParams ?? [], $viewParams ?? [])
Expand Down Expand Up @@ -99,7 +97,8 @@ public function sortable(
public function filter(
Environment $env,
SlidingPaginationInterface $pagination,
array $fields, ?array $options = [],
array $fields,
?array $options = [],
?array $params = [],
?string $template = null,
): string {
Expand Down
1 change: 1 addition & 0 deletions tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function testCustomConfig(): void
'pagination' => '@KnpPaginator/Pagination/foo.html.twig',
'filtration' => '@KnpPaginator/Pagination/bar.html.twig',
'sortable' => '@KnpPaginator/Pagination/baz.html.twig',
'rel_links' => '@KnpPaginator/Pagination/rel_links.html.twig',
],
'page_range' => 15,
'page_limit' => 100,
Expand Down

0 comments on commit e251513

Please sign in to comment.