From d11ccef046b97bdd230664652afd07dfba0253b1 Mon Sep 17 00:00:00 2001 From: Artem Kotelnikov Date: Sun, 9 Mar 2025 13:51:34 +0700 Subject: [PATCH 1/3] Fix php8.4 deprecations --- src/Fp/Functions/Callable/Compose.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Fp/Functions/Callable/Compose.php b/src/Fp/Functions/Callable/Compose.php index 075cb4d6..c7b947d5 100644 --- a/src/Fp/Functions/Callable/Compose.php +++ b/src/Fp/Functions/Callable/Compose.php @@ -63,14 +63,14 @@ function compose( callable $aToB, callable $bToC, - callable $cToD = null, - callable $dToF = null, - callable $fToG = null, - callable $gToH = null, - callable $hToI = null, - callable $iToJ = null, - callable $jToK = null, - callable $kToL = null, + ?callable $cToD = null, + ?callable $dToF = null, + ?callable $fToG = null, + ?callable $gToH = null, + ?callable $hToI = null, + ?callable $iToJ = null, + ?callable $jToK = null, + ?callable $kToL = null, ): callable { $callableChain = filterNotNull([$aToB, $bToC, $cToD, $dToF, $fToG, $gToH, $hToI, $iToJ, $jToK, $kToL]); From dd867959fe6e686a4fec483a0cdde9b01ccccb1b Mon Sep 17 00:00:00 2001 From: Artem Kotelnikov Date: Sun, 9 Mar 2025 14:00:41 +0700 Subject: [PATCH 2/3] Bump action/cache to v3 version --- .github/workflows/php.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 8c54df41..375bff9f 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -10,17 +10,17 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Install dependencies - run: composer install --prefer-dist --no-progress + - name: Install dependencies + run: composer install --prefer-dist --no-progress - - name: Cache Composer dependencies - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ github.sha }} + - name: Cache Composer dependencies + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ github.sha }} psalm: runs-on: ubuntu-latest @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2 - name: Restore cached composer dependencies id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: vendor key: ${{ runner.os }}-php-${{ github.sha }} @@ -52,18 +52,18 @@ jobs: - name: Restore cached composer dependencies id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: vendor key: ${{ runner.os }}-php-${{ github.sha }} - name: Run test suite run: php vendor/bin/phpunit - -# - name: Check PhpUnit coverage percentage -# run: php vendor/bin/coverage-check build/logs/clover.xml 85 + + # - name: Check PhpUnit coverage percentage + # run: php vendor/bin/coverage-check build/logs/clover.xml 85 - name: Upload coverage results to Coveralls env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: php vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v + run: php vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v \ No newline at end of file From eaf17027d97d0bdcb8a3f7693578e1d5b2ef6d51 Mon Sep 17 00:00:00 2001 From: Artem Kotelnikov Date: Sun, 9 Mar 2025 14:37:40 +0700 Subject: [PATCH 3/3] Fix psalm --- src/Fp/Collections/NonEmptySetTerminalOps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fp/Collections/NonEmptySetTerminalOps.php b/src/Fp/Collections/NonEmptySetTerminalOps.php index f99c0c19..fde6d176 100644 --- a/src/Fp/Collections/NonEmptySetTerminalOps.php +++ b/src/Fp/Collections/NonEmptySetTerminalOps.php @@ -575,7 +575,7 @@ public function filterMap(callable $callback): Set; * * @template TVO * - * @param callable(TV): Option $callback + * @param callable(mixed...): Option $callback * @return Set */ public function filterMapN(callable $callback): Set;