-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
INI values with embedded commas parsed incorrectly #392
Comments
@bishopb For example, this would work. ini-values: xdebug.mode="develop,gcstats,coverage", date.timezone=UTC Before I merge this, can you test this using the develop branch (shivammathur/setup-php@develop) |
Confirmed, the patch works as described. Thank you! |
To get the XDebug 3 INI setting we need, we require a bug fix branch from upstream. Switch to that for now. @see shivammathur/setup-php#392
@bishopb Thanks for testing. Merged and updated |
Upstream fixed a bug with parsing comma-separated INI values, but requires quoting the value. This commit adds that necessary quoting. @see shivammathur/setup-php#392
@shivammathur This seems to have broken a build where pcov.directory and pcov.exclude are set in ini-values. I've attempted with the escape and without, as well as with single quotes, but nothing seems to work any more - it was working up until a few days ago. |
@shivammathur
Yes, I believe the quotes are required for pcov to properly parse the exclude. And in case it helps, the error I'm getting in the actions readout: /opt/hostedtoolcache/linux.sh: line 343: syntax error near unexpected token `(' |
working on a fix |
@smichae
Test-workflow: https://github.com/shivammathur/test-setup-php/actions/runs/487480158/workflow On a side note |
Describe the bug
XDebug 3 supports an
xdebug.mode
INI setting whose values may be a comma-separated list: for example,xdebug.mode=develop,gcstats,coverage
.However, SPC fails to correctly parse this INI option:
That's because the CSVArray method unconditionally splits on a comma, without first understanding that the comma is used in the value itself.
Version
v1
orv2
.v2
v1
Runners
Operating systems
Ubuntu, MacOS, and Windows
PHP versions
5.5+, though this particular issue with xdebug.mode only applies to 7.3+ with XDebug 3.
To Reproduce
In YAML, this would be represented as:
Expected behavior
When support for INI values with commas is available, I would expect the INI file to have a single INI value added, whose value is exactly as given. Thus, if the INI given is "x=a,b" I would expect the INI file to have exactly that one line. Today, however, the INI file gets two lines: "x=a" followed by "b".
Additional Context
There are many other INI values that could technically have a comma in them: any ones dealing with file paths, dates, times, monetary values, MIME types, user-facing prompts, and PDO DSN. For a concrete example, consider url_rewriter.hosts:
Consequently, I don't think this is a niche problem, but rather one that is an edge case.
Are you willing to submit a PR?
Yes.
The text was updated successfully, but these errors were encountered: