We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey there! I appreciate the work y'all do, and wanted to report a probable bug behavior I found.
I am on PHP 8.3.13, using the 2.2.4 version of the yaml extension — each the latest stable version, as of this writing.
$ php -v # PHP 8.3.13 (cli) (built: Nov 4 2024 23:34:58) (NTS) # Copyright (c) The PHP Group # Zend Engine v4.3.13, Copyright (c) Zend Technologies $ php -r 'echo phpversion() . "\n";' # 8.3.13 $ php -r 'echo phpversion("yaml") . "\n";' # 2.2.4
Given a file input.yaml (with line 6 being a blank line present, but omitted by GitHub):
input.yaml
--- root: node: - list item ...
We can parse and emit said file with the following code:
php -r 'echo yaml_emit(yaml_parse_file("input.yaml"));' > output.yaml
rendering output.yaml (with line 6 again being a blank line):
output.yaml
Note the newly incorrect indentation of the list item on line 4. yamllint throws an error for the same line.
yamllint
$ yamllint -v # yamllint 1.35.1 $ yamllint output.yaml # output.yaml # 4:3 error wrong indentation: expected 4 but found 2 (indentation)
I've got a workaround on my end, though it's specific to my rather esoteric use case — but I figured I'd do my due diligence and report the issue.
The text was updated successfully, but these errors were encountered:
This is a stylistic difference rather than a bug. Your project has adopted a style rule that is valid but not necessary.
Sorry, something went wrong.
Neither the program ingesting my yaml nor yamllint are my projects. That said, how do I tell yaml_emit not to stylistically mangle my input?
yaml_emit
No branches or pull requests
Hey there! I appreciate the work y'all do, and wanted to report a probable bug behavior I found.
I am on PHP 8.3.13, using the 2.2.4 version of the yaml extension — each the latest stable version, as of this writing.
Given a file
input.yaml
(with line 6 being a blank line present, but omitted by GitHub):We can parse and emit said file with the following code:
rendering
output.yaml
(with line 6 again being a blank line):Note the newly incorrect indentation of the list item on line 4.
yamllint
throws an error for the same line.I've got a workaround on my end, though it's specific to my rather esoteric use case — but I figured I'd do my due diligence and report the issue.
The text was updated successfully, but these errors were encountered: