From b0e0f7d798ebe576a7b819738f402e67a2b02391 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 24 Jan 2023 21:50:04 +0300 Subject: [PATCH 1/2] In `FilterableDataInterface::withFilterHandlers()` rename parameter to `$filterHandlers` --- CHANGELOG.md | 5 +++-- src/Reader/FilterableDataInterface.php | 4 ++-- src/Reader/Iterable/IterableDataReader.php | 4 ++-- tests/Paginator/KeysetPaginatorTest.php | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9a4cd35..8cceef04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## 1.0.1 under development -- no changes in this release. +- Chg #137: In `FilterableDataInterface::withFilterHandlers()` rename parameter `$iterableFilterHandlers` to + `$filterHandlers` (@vjik) ## 1.0.0 January 14, 2023 -- Initial release. \ No newline at end of file +- Initial release. diff --git a/src/Reader/FilterableDataInterface.php b/src/Reader/FilterableDataInterface.php index f4fe215d..0c5997b5 100644 --- a/src/Reader/FilterableDataInterface.php +++ b/src/Reader/FilterableDataInterface.php @@ -30,10 +30,10 @@ public function withFilter(FilterInterface $filter): static; /** * Returns new instance with additional handlers set. * - * @param FilterHandlerInterface ...$iterableFilterHandlers Additional iterable handlers. + * @param FilterHandlerInterface ...$filterHandlers Additional filter handlers. * * @return static New instance. * @psalm-return $this */ - public function withFilterHandlers(FilterHandlerInterface ...$iterableFilterHandlers): static; + public function withFilterHandlers(FilterHandlerInterface ...$filterHandlers): static; } diff --git a/src/Reader/Iterable/IterableDataReader.php b/src/Reader/Iterable/IterableDataReader.php index 947e553b..aa62fa01 100644 --- a/src/Reader/Iterable/IterableDataReader.php +++ b/src/Reader/Iterable/IterableDataReader.php @@ -88,12 +88,12 @@ public function __construct(private iterable $data) /** * @psalm-return $this */ - public function withFilterHandlers(FilterHandlerInterface ...$iterableFilterHandlers): static + public function withFilterHandlers(FilterHandlerInterface ...$filterHandlers): static { $new = clone $this; $new->iterableFilterHandlers = array_merge( $this->iterableFilterHandlers, - $this->prepareFilterHandlers($iterableFilterHandlers) + $this->prepareFilterHandlers($filterHandlers) ); return $new; } diff --git a/tests/Paginator/KeysetPaginatorTest.php b/tests/Paginator/KeysetPaginatorTest.php index 68999c32..e86a139f 100644 --- a/tests/Paginator/KeysetPaginatorTest.php +++ b/tests/Paginator/KeysetPaginatorTest.php @@ -532,7 +532,7 @@ public function withFilter(FilterInterface $filter): static return clone $this; } - public function withFilterHandlers(FilterHandlerInterface ...$iterableFilterUnits): static + public function withFilterHandlers(FilterHandlerInterface ...$filterHandlers): static { return clone $this; } From 36bd3e71d341600f5d5a8d2b9e955a1e8b5f968d Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 24 Jan 2023 21:52:41 +0300 Subject: [PATCH 2/2] fix bc.yml --- .github/workflows/bc.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index 75f97a7d..ba3e9ef1 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -3,13 +3,12 @@ on: - push name: backwards compatibility + jobs: roave_bc_check: - name: Roave BC Check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: fetch tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - name: Roave BC Check - uses: docker://nyholm/roave-bc-check-ga + uses: yiisoft/actions/.github/workflows/bc.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.0']