From 2dfb5294491215bbd25178aaea814048e5ca3adc Mon Sep 17 00:00:00 2001 From: Tanner Record Date: Tue, 4 Jun 2024 14:45:53 -0400 Subject: [PATCH 1/3] Fix method visibility --- src/Arrays/Arr.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Arrays/Arr.php b/src/Arrays/Arr.php index 24303de..b01c446 100644 --- a/src/Arrays/Arr.php +++ b/src/Arrays/Arr.php @@ -790,7 +790,7 @@ public static function map_or_discard( $keys, array $map, bool &$found = true ) * * @return array */ - function merge_recursive( array &$array1, array &$array2 ): array { + public static function merge_recursive( array &$array1, array &$array2 ): array { $merged = $array1; foreach ( $array2 as $key => &$value ) { @@ -1176,7 +1176,7 @@ public static function sort_by_priority( $array ): array { * * @return int */ - protected static function sort_by_priority_comparison( $a, $b ): int { + public static function sort_by_priority_comparison( $a, $b ): int { if ( is_array( $a ) ) { $a_priority = $a['priority']; } else { From e6cc391b11b67bfaca4f441ccb19fbc4ed08068a Mon Sep 17 00:00:00 2001 From: Tanner Record Date: Thu, 6 Jun 2024 15:41:38 -0400 Subject: [PATCH 2/3] Ensure composer requires illuminate/collections --- composer.json | 4 +++- src/Arrays/Arr.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 67f7a1b..44394cd 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,9 @@ } ], "minimum-stability": "stable", - "require": {}, + "require": { + "illuminate/collections": "^8.0" + }, "require-dev": { "codeception/module-asserts": "^1.0", "codeception/module-cli": "^1.0", diff --git a/src/Arrays/Arr.php b/src/Arrays/Arr.php index b01c446..8045561 100644 --- a/src/Arrays/Arr.php +++ b/src/Arrays/Arr.php @@ -299,7 +299,7 @@ public static function except( $array, $keys ) { /** * Determine if the given key exists in the provided array. * - * @param \ArrayAccess|array $array + * @param \ArrayAccess|Enumerable|array $array * @param string|int|float $key * * @return bool From b4edc8d0967c2d1d4368617d66e50933987693c2 Mon Sep 17 00:00:00 2001 From: Tanner Record Date: Thu, 6 Jun 2024 15:55:08 -0400 Subject: [PATCH 3/3] Try fixing slic composer install --- .github/workflows/tests-php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-php.yml b/.github/workflows/tests-php.yml index 39de58e..e6b8e04 100644 --- a/.github/workflows/tests-php.yml +++ b/.github/workflows/tests-php.yml @@ -68,6 +68,6 @@ jobs: - name: Set up StellarWP Arrays run: | ${SLIC_BIN} use arrays - ${SLIC_BIN} composer install --ignore-platform-reqs + ${SLIC_BIN} composer install - name: Run suite wpunit run: ${SLIC_BIN} run ${{ matrix.suite }} --ext DotReporter