Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions recipe/magento2.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use Deployer\Exception\RunException;
use Deployer\Host\Host;

use function Deployer\Support\array_is_list;

const CONFIG_IMPORT_NEEDED_EXIT_CODE = 2;
const DB_UPDATE_NEEDED_EXIT_CODE = 2;
const MAINTENANCE_MODE_ACTIVE_OUTPUT_MSG = 'maintenance mode is active';
Expand Down
12 changes: 12 additions & 0 deletions src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ function array_merge_alternate(array $original, array $override)
return $original;
}

/**
* Polyfill for the array_is_list function introduced in PHP 8.1.
*
* @param array $array The array to check.
* @return bool Returns true if the array is a list, false otherwise.
*/
function array_is_list(array $array): bool
{
$keys = array_keys($array);
return $keys === array_keys($keys);
}

/**
* Determines if the given string contains the given value.
*/
Expand Down