Skip to content

Commit

Permalink
Merge pull request #72 from laminas-api-tools/1.10.x-merge-up-into-1.…
Browse files Browse the repository at this point in the history
…11.x_LavFVX7C

Merge release 1.10.1 into 1.11.x
  • Loading branch information
weierophinney authored Jun 29, 2021
2 parents 0a7331b + e967638 commit eb4091f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 105 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"require": {
"php": "^7.3",
"php": "^7.3 || ~8.0.0",
"laminas-api-tools/api-tools": "^1.4",
"laminas-api-tools/api-tools-admin-ui": "^1.3.9",
"laminas-api-tools/api-tools-api-problem": "^1.3",
Expand Down Expand Up @@ -56,6 +56,7 @@
"webmozart/assert": "^1.10"
},
"require-dev": {
"ext-sqlite3": "*",
"alcaeus/mongo-php-adapter": "^1.2",
"laminas/laminas-coding-standard": "~2.3.0",
"laminas/laminas-config": "^2.6 || ^3.2",
Expand Down
162 changes: 59 additions & 103 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/Model/ModuleVersioningModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
use function file_put_contents;
use function in_array;
use function is_array;
use function is_bool;
use function is_dir;
use function is_int;
use function is_readable;
use function is_string;
use function is_writable;
use function mkdir;
use function opendir;
Expand Down Expand Up @@ -375,11 +378,19 @@ protected function changeVersionArray($data, $previous, $version)
{
$result = [];
foreach ($data as $key => $value) {
if (is_int($key)) {
$key = (string) $key;
}
$newKey = $this->changeVersionNamespace($key, $previous, $version);
if (is_array($value)) {
$result[$newKey] = $this->changeVersionArray($value, $previous, $version);
} else {
$result[$newKey] = $this->changeVersionNamespace($value, $previous, $version);
if (is_bool($value) || is_int($value) || $value === null) {
$value = (string) $value;
}
if (is_string($value)) {
$result[$newKey] = $this->changeVersionNamespace($value, $previous, $version);
}
}
}
return $result;
Expand Down

0 comments on commit eb4091f

Please sign in to comment.