api-platform / core

The server component of API Platform: hypermedia and GraphQL APIs in minutes
https://api-platform.com
MIT License
2.4k stars 859 forks source link

Metadata YamlExtractor incompatible with Symfony4 #1497

Closed cristi-contiu closed 6 years ago

cristi-contiu commented 6 years ago

Hello everyone.

I ran into an issue using the YAML format mapping on a Symfony4 project: The Metadata YamlExtractor uses the Yaml::PARSE_KEYS_AS_STRINGS constant, which, according to the Symfony upgrade guides was deprecated in Symfony 3.4 and removed in Symfony 4.

Annotation mappings work just fine.

From the upgrade guides, it looks like it's enough to remove the use of this constant and keep only the Yaml::PARSE_CONSTANT but I am not sure how this will play out regarding compatibility with older versions of symfony/yaml.

Thank you

dunglas commented 6 years ago

Fixed in #1497.