Skip to content

Commit af0ff24

Browse files
author
CI bot
committed
Merge remote-tracking branch 'remotes/dev/master'
2 parents 51bc58b + 90d6f25 commit af0ff24

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: src/Oro/Bundle/EntityConfigBundle/Command/DebugCommand.php

+17
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Oro\Bundle\EntityConfigBundle\Entity\EntityConfigModel;
1515
use Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider;
1616
use Oro\Bundle\EntityExtendBundle\Extend\RelationType;
17+
use Oro\Component\PhpUtils\ArrayUtil;
1718
use Symfony\Component\Console\Command\Command;
1819
use Symfony\Component\Console\Input\InputArgument;
1920
use Symfony\Component\Console\Input\InputInterface;
@@ -689,6 +690,8 @@ protected function clearConfigCache()
689690
*/
690691
protected function convertArrayToString(array $array)
691692
{
693+
$array = $this->sortDataByKeys($array);
694+
692695
$replace = [
693696
false => 'false',
694697
true => 'true',
@@ -706,4 +709,18 @@ function (&$item) use ($replace) {
706709

707710
return print_r($array, true);
708711
}
712+
713+
private function sortDataByKeys(array $array): array
714+
{
715+
if (ArrayUtil::isAssoc($array)) {
716+
ksort($array);
717+
}
718+
foreach ($array as &$val) {
719+
if (is_array($val) && ArrayUtil::isAssoc($val)) {
720+
ksort($val);
721+
}
722+
}
723+
724+
return $array;
725+
}
709726
}

0 commit comments

Comments
 (0)