Skip to content

Commit d8dddb0

Browse files
authored
Merge pull request #1827 from XWB/knp-bump
Bump KNP package
2 parents 9b97b09 + 98ac103 commit d8dddb0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"jackalope/jackalope-doctrine-dbal": "^1.2",
5050
"jms/serializer": "^3.8",
5151
"jms/serializer-bundle": "^3.5",
52-
"knplabs/knp-components": "^2.3 || ^3.0",
52+
"knplabs/knp-components": "^2.4 || ^3.0",
5353
"pagerfanta/doctrine-mongodb-odm-adapter": "^2.4 || ^3.0",
5454
"pagerfanta/doctrine-orm-adapter": "^2.4 || ^3.0",
5555
"pagerfanta/doctrine-phpcr-odm-adapter": "^2.4 || ^3.0",

src/Subscriber/PaginateElasticaQuerySubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ protected function getSortDirection($sortField, array $options = [])
121121
}
122122

123123
// check if the requested sort field is in the sort whitelist
124-
if (isset($options['sortFieldWhitelist']) && !\in_array($sortField, $options['sortFieldWhitelist'], true)) {
124+
if (isset($options['sortFieldAllowList']) && !\in_array($sortField, $options['sortFieldAllowList'], true)) {
125125
throw new \UnexpectedValueException(\sprintf('Cannot sort by: [%s] this field is not in whitelist', $sortField));
126126
}
127127

tests/Unit/Subscriber/PaginateElasticaQuerySubscriberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testShouldThrowIfFieldIsNotWhitelisted()
121121
'defaultSortFieldName' => 'createdAt',
122122
'sortFieldParameterName' => 'ord',
123123
'sortDirectionParameterName' => 'az',
124-
'sortFieldWhitelist' => ['createdAt', 'updatedAt'],
124+
'sortFieldAllowList' => ['createdAt', 'updatedAt'],
125125
];
126126

127127
$this->expectException(\UnexpectedValueException::class);

0 commit comments

Comments
 (0)