Skip to content

Add more native support for php constants in yaml files #719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2020
Merged

Add more native support for php constants in yaml files #719

merged 1 commit into from
Jul 29, 2020

Conversation

thedustin
Copy link

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Documented? yes
Fixed tickets #303, #304
License MIT

I would like to add "more native" support for PHP constants in YAML files by enabling the !php/const tag.

I struggled a bit while creating my first GraphQL project today, because I expected this feature to be available. Also this way the constants don‘t need to be fetched during runtime with the PHP function \constant().

This topic was already discussed in #303 but closed because of inactivity.

- Add the `Yaml::PARSE_CONSTANT` flag to the YamlParser to allow `!php/const` tags
- Add test for parsing yaml files with constants
- Adjust documentation for enums

Fix issue #303. Based on pull request #304
Copy link
Contributor

@mcg-web mcg-web left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@mcg-web mcg-web merged commit 2d5692c into overblog:master Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants