Last active
December 4, 2019 14:55
-
-
Save ahoendgen/0730e412db7f7c45e060042db7366902 to your computer and use it in GitHub Desktop.
fix for symfony/yaml readable but for prettier broken yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'vendor/autoload.php'; | |
use Symfony\Component\Yaml\Yaml; | |
$path = 'broken_but_readable.yaml'; | |
$value = Yaml::parse(file_get_contents($path)); | |
$yaml = Yaml::dump($value); | |
file_put_contents($path, $yaml); | |
//run prettier afterwards |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment