Currently the config-transformer is using the symfony/yaml package. Instead we should use a package which is supporting to read comments from yaml files as they provide many usefull things like links to documentation.
Yaml:
# Read the documentation at https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md
flysystem:
storages:
default.storage:
adapter: 'local'
options:
directory: '%kernel.project_dir%/%VAR_DIR%/storage/default'
Expected PHP Result:
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
// Read the documentation at https://github.com/thephpleague/flysystem-bundle/blob/master/docs/1-getting-started.md
$containerConfigurator->extension('flysystem', [
'storages' => [
'default.storage' => [
'adapter' => 'local',
'options' => [
'directory' => '%kernel.project_dir%/%VAR_DIR%/storage/default',
],
],
],
]);
};
Currently the comment is missing which adds a lot of value.
I agree that this is important... but does such a YAML library exist? Or would someone need to hack together a script to "find the comments" then try to re-add them to the PHP after the fact?
Currently the
config-transformer
is using thesymfony/yaml
package. Instead we should use a package which is supporting to readcomments
from yaml files as they provide many usefull things like links to documentation.Yaml:
Expected PHP Result:
Currently the comment is missing which adds a lot of value.
Related issues: