ConfigServiceProvider icon indicating copy to clipboard operation
ConfigServiceProvider copied to clipboard

Yaml parser

Open vitxd opened this issue 9 years ago • 3 comments

Hello, not sure is something I'm doing wrong or what, but I can't make the yaml parser work with the library used as is. With a minor change in your code however, YamlConfigDriver line 14, I managed to make it work.

Basically instead of passing the filename to the Yaml::parse method I pass the file_get_contents it works like a charm.

Should I do a pull request?

vitxd avatar Feb 08 '16 08:02 vitxd

I just noticed you already have a pull request for that

https://github.com/igorw/ConfigServiceProvider/pull/46/files

vitxd avatar Feb 09 '16 00:02 vitxd

Seconding this; the YAML parser is broken as is but the pull request linked by @vitxd fixes it.

ollyollyollyltd avatar Mar 01 '16 10:03 ollyollyollyltd

I have the same issue and managed to deal with it. The PR is not the appropriate fix I think.

This lib suggests to install symfony/yamland does not require it. When composer checks for dependencies it doesn't care that the lib suggests to install ~2.1. You may have another dependency dealing with symfony/yaml in 3.* and thus composer installs an according version. The Yaml parser in v3 changed the way it takes it inputs (yaml string instead of file path) which breaks this lib.

You should require "symfony/yaml" in a v2 version in your project in order to fix the issue. Composer update will potentially fail if one of our depencies is strict about needing a v3 version of symfony/yaml but this is normal.

SelrahcD avatar Apr 05 '16 10:04 SelrahcD