From 82ee28ba6d22ced8a98cb1b03ac2d835e1b57d7e Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 04:29:33 -0500 Subject: [PATCH 1/9] chore: require PHP 7.4 --- .github/workflows/ci.yml | 5 ++- README.md | 90 +--------------------------------------- composer.json | 3 +- 3 files changed, 8 insertions(+), 90 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca15c6..208883d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] + php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] runs-on: ${{ matrix.operating-system }} @@ -29,3 +29,6 @@ jobs: - name: Run tests run: ./vendor/bin/phpunit + + - name: Verify documentation + run: ./vendor/bin/mddoc --dry-run=true .mddoc.xml.dist diff --git a/README.md b/README.md index 95ccfc8..c0edf2b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A collection of global `array_*` functions appending to the native PHP set. ## Requirements -- **php**: >=7.2.0 +- **php**: >=7.4.0 ## Installing @@ -19,90 +19,4 @@ Install the latest version with: composer require 'quorum/array-functions' ``` -## Array Functions - -### Function: \array_flatten - -```php -function array_flatten(array $array [, $allow_duplicates = false]) -``` - -##### Parameters: - -- ***array*** `$array` - The Array to be Flattened -- ***bool*** `$allow_duplicates` - Should the array allow duplicates - -##### Returns: - -- ***array*** - The resulting array or NULL on failure - -Given an array, find all the values recursively. - -### Function: \array_blend - -```php -function array_blend(array $arrays [, array $keys = null]) -``` - -##### Parameters: - -- ***array*** `$arrays` - An array of arrays. -- ***array*** | ***null*** `$keys` - The merged array. - -##### Returns: - -- ***array*** - The resulting blended array - -Given an array of arrays, merges the array's children together. - -### Function: \array_key_array - -```php -function array_key_array(array $arrays, $key) -``` - -##### Parameters: - -- ***array*** `$arrays` - An array of similarly keyed arrays -- ***int*** | ***string*** `$key` - The desired key - -##### Returns: - -- ***array*** - The flattened array - -Given an array of similarly keyed arrays, returns an array of only the values of the key. - -### Function: \array_keys_array - -```php -function array_keys_array(array $arrays, $keys) -``` - -##### Parameters: - -- ***array*** `$arrays` - An array of similarly keyed arrays -- ***array*** | ***int*** | ***string*** `$keys` - The key or array of keys to return - -##### Returns: - -- ***array*** - The array of arrays with just the selected keys - -Given an array of similarly keyed arrays, returns an array of only the selected keys. - -### Function: \array_key_refill - -```php -function array_key_refill(array $array, array $keys [, $fill = array()]) -``` - -##### Parameters: - -- ***array*** `$array` - A Keyed array -- ***array*** `$keys` - The keys that must exist -- ***mixed*** `$fill` - The desired value to fill with - -##### Returns: - -- ***array*** - -Given a keyed array, fills any missing values. +## Array Functions \ No newline at end of file diff --git a/composer.json b/composer.json index 967729e..b501db1 100644 --- a/composer.json +++ b/composer.json @@ -21,9 +21,10 @@ } ], "require": { - "php" : ">=7.2.0" + "php" : ">=7.4.0" }, "require-dev": { + "donatj/mddoc": "^0.13.0", "phpunit/phpunit": "~8|~9|~11" }, "autoload" : { From 167c4c09d4d5866ff5cce709ad0ae605ca3635f4 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 05:40:29 -0500 Subject: [PATCH 2/9] chore: update MDDoc to 0.14 --- README.md | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++- composer.json | 2 +- 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c0edf2b..28e0ab5 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,90 @@ Install the latest version with: composer require 'quorum/array-functions' ``` -## Array Functions \ No newline at end of file +## Array Functions + +### Function: \array_flatten + +```php +function array_flatten(array $array, $allow_duplicates = \false) +``` + +##### Parameters + +- ***array*** `$array` - The Array to be Flattened +- ***bool*** `$allow_duplicates` - Should the array allow duplicates + +##### Return Value + +- ***array*** - The resulting array or NULL on failure + +Given an array, find all the values recursively. + +### Function: \array_blend + +```php +function array_blend(array $arrays, array $keys = \null) +``` + +##### Parameters + +- ***array*** `$arrays` - An array of arrays. +- ***array*** | ***null*** `$keys` - The merged array. + +##### Return Value + +- ***array*** - The resulting blended array + +Given an array of arrays, merges the array's children together. + +### Function: \array_key_array + +```php +function array_key_array(array $arrays, $key) +``` + +##### Parameters + +- ***array*** `$arrays` - An array of similarly keyed arrays +- ***int*** | ***string*** `$key` - The desired key + +##### Return Value + +- ***array*** - The flattened array + +Given an array of similarly keyed arrays, returns an array of only the values of the key. + +### Function: \array_keys_array + +```php +function array_keys_array(array $arrays, $keys) +``` + +##### Parameters + +- ***array*** `$arrays` - An array of similarly keyed arrays +- ***array*** | ***int*** | ***string*** `$keys` - The key or array of keys to return + +##### Return Value + +- ***array*** - The array of arrays with just the selected keys + +Given an array of similarly keyed arrays, returns an array of only the selected keys. + +### Function: \array_key_refill + +```php +function array_key_refill(array $array, array $keys, $fill = array()) +``` + +##### Parameters + +- ***array*** `$array` - A Keyed array +- ***array*** `$keys` - The keys that must exist +- ***mixed*** `$fill` - The desired value to fill with + +##### Return Value + +- ***array*** + +Given a keyed array, fills any missing values. \ No newline at end of file diff --git a/composer.json b/composer.json index b501db1..340a87e 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "php" : ">=7.4.0" }, "require-dev": { - "donatj/mddoc": "^0.13.0", + "donatj/mddoc": "^0.14.0", "phpunit/phpunit": "~8|~9|~11" }, "autoload" : { From 0ab46ad4fc8b037990cad094aed4c43671968eff Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:04:24 -0500 Subject: [PATCH 3/9] Update donatj/mddoc version to 0.14.1 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 340a87e..7dfe4f5 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "php" : ">=7.4.0" }, "require-dev": { - "donatj/mddoc": "^0.14.0", + "donatj/mddoc": "^0.14.1", "phpunit/phpunit": "~8|~9|~11" }, "autoload" : { From 9f551588de9ef67ff16eb7eb796b5b4b68e85349 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 24 Oct 2026 11:06:21 +0000 Subject: [PATCH 4/9] Regenerate README with MDDoc 0.14.1 Co-authored-by: donatj <133747+donatj@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28e0ab5..dfe1640 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ composer require 'quorum/array-functions' ### Function: \array_flatten ```php -function array_flatten(array $array, $allow_duplicates = \false) +function array_flatten(array $array, $allow_duplicates = false) ``` ##### Parameters @@ -41,7 +41,7 @@ Given an array, find all the values recursively. ### Function: \array_blend ```php -function array_blend(array $arrays, array $keys = \null) +function array_blend(array $arrays, array $keys = null) ``` ##### Parameters From 2d0dd18d9798b6c743fb347fb4e511f542985bb4 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:09:42 -0500 Subject: [PATCH 5/9] Update author names and emails in composer.json --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 7dfe4f5..1934f8c 100644 --- a/composer.json +++ b/composer.json @@ -4,15 +4,16 @@ "license" : "MIT", "authors" : [ { - "name" : "Jesse Donat", + "name" : "Jesse G. Donat", "role" : "Developer", "email" : "donatj@gmail.com", "homepage": "https://donatstudios.com" }, { "name" : "Ray Minge", + "email" : "ray@rayminge.com", "role" : "Developer", - "homepage": "http://oranj.io" + "homepage": "https://oranj.io" }, { "name" : "Jon Henderson", From 4be453770f858a5cafd1a9e77848ada5b3e812a5 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:11:14 -0500 Subject: [PATCH 6/9] Update mddoc command to remove dry-run argument --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 208883d..010e5a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,4 +31,4 @@ jobs: run: ./vendor/bin/phpunit - name: Verify documentation - run: ./vendor/bin/mddoc --dry-run=true .mddoc.xml.dist + run: ./vendor/bin/mddoc --dry-run From eb62eeff754662977817d14232c7332f63d70634 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:12:27 -0500 Subject: [PATCH 7/9] Update phpunit version constraints in composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 1934f8c..d80981a 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ }, "require-dev": { "donatj/mddoc": "^0.14.1", - "phpunit/phpunit": "~8|~9|~11" + "phpunit/phpunit": "~9|~11" }, "autoload" : { "files": ["src/array.php"] From 1873e451ec77e1a10cc15303b902f965f2621fc6 Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:19:04 -0500 Subject: [PATCH 8/9] chore: improve Composer metadata --- composer.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d80981a..d426e5f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,12 @@ { "name" : "quorum/array-functions", - "description": "useful array functions", + "description": "Additional global PHP array functions for flattening, merging, selecting, and refilling arrays.", + "keywords" : [ + "array", + "array functions", + "array utilities", + "php" + ], "license" : "MIT", "authors" : [ { @@ -30,5 +36,8 @@ }, "autoload" : { "files": ["src/array.php"] + }, + "config" : { + "sort-packages": true } } From 33fd9d1f894cab893fa410931446e27dea30a19d Mon Sep 17 00:00:00 2001 From: Jesse Donat Date: Sat, 24 Oct 2026 06:20:36 -0500 Subject: [PATCH 9/9] chore: refine Composer keywords --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d426e5f..f566721 100644 --- a/composer.json +++ b/composer.json @@ -4,8 +4,7 @@ "keywords" : [ "array", "array functions", - "array utilities", - "php" + "array utilities" ], "license" : "MIT", "authors" : [