Skip to content
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

Setting php.ini values in ruleset.xml #560

Closed
marczych opened this issue Apr 21, 2015 · 2 comments
Closed

Setting php.ini values in ruleset.xml #560

marczych opened this issue Apr 21, 2015 · 2 comments

Comments

@marczych
Copy link

I'm putting all of my configuration into the ruleset.xml file (it's actually phpcs.xml so the docs should probably be updated) which has been great so far. However, I can't seem to set php.ini values in there because the format is -d key=value but <arg name="d" value="key=value" /> spits out an argument like --d=key=value which is invalid. I'm specifically trying to increase the memory limit because it doesn't work on my project otherwise.

Is there a way to set php.ini values from the xml file?

@gsherwood
Copy link
Member

Is there a way to set php.ini values from the xml file?

Not yet. I'll look at adding one using a custom tag.

it's actually phpcs.xml so the docs should probably be updated

The name isn't important for ruleset files unless you are not actually telling PHPCS where to find the ruleset. In that case, it will look for one called phpcs.xml in the current directory. All ruleset files have exactly the same format.

@gsherwood
Copy link
Member

I've added support for this now. It will be released in 2.5.0 (hopefully this week). You can set an ini setting using this format:

<ini name="name" value="value" />

Or, if just setting the value to TRUE:

<ini name="name" />

Proper example:

<ini name="memory_limit" value="64M" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants