Skip to content

Commit

Permalink
Merge branch 'release/3.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
therouv committed Mar 23, 2022
2 parents c0e6270 + 3e2a3b2 commit 33931e9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea
/.php_cs.cache
/phpunit.xml
/composer.lock
/phpunit.xml
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Release 3.5.1 (2022-03-23)

* Add compatibility to new `symfony/yaml` releases to fix config export command when using `--hierarchical=y` option.
* Allow `symfony/yaml:^6.0`.

## Release 3.5.0 (2021-03-13)

* Use `\Magento\Framework\Console\CommandListInterface` instead of `\Magento\Framework\Console\CommandList` (#40) [@therouv](https://github.com/therouv)
Expand Down
8 changes: 5 additions & 3 deletions Model/File/Writer/YamlWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use Magento\Framework\App\Filesystem\DirectoryList;
use Symfony\Component\Yaml\Dumper;
use Symfony\Component\Yaml\Yaml;

class YamlWriter extends AbstractWriter
{
Expand All @@ -19,9 +20,10 @@ protected function _write($filename, array $data)
{
// Prepare data
if (true === $this->getIsHierarchical()) {
$yaml = new Dumper();
$yaml->setIndentation(2);
$content = $yaml->dump($data, 5, 0, false, true);
$flags = 0;
$flags |= Yaml::DUMP_OBJECT;

$content = (new Dumper(2))->dump($data, 5, 0, $flags);
} else {
$content = $this->generateYaml($data);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Import/Export core_config_data values in Magento 2",
"require": {
"php": "^7.2",
"symfony/yaml": "^3.4|^4.0|^5.0",
"symfony/yaml": "^3.4|^4.0|^5.0|^6.0",
"magento/module-config": "*",
"magento/module-store": "*",
"magento/framework": "*"
Expand Down

0 comments on commit 33931e9

Please sign in to comment.