Skip to content

use !empty() instead of isset() to check framework.validation.cache value #7631

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

Closed
wants to merge 1 commit into from

Conversation

craue
Copy link
Contributor

@craue craue commented Apr 11, 2013

No description provided.

@craue
Copy link
Contributor Author

craue commented Apr 12, 2013

Just to explain my intention for this...

I wanted to set framework.validation.cache to apc as a default by using a parameters.yml entry, while still being able to override the value and switch off this cache using a parameters_custom.ini entry if APC is not available. But in ini files, you cannot set something to null explicitly, it will just result in an empty string.

I've migrated to parameters_custom.yml as a workaround in the meantime, but it might be useful for others.

@stof
Copy link
Member

stof commented Apr 13, 2013

@craue Use a YAML file instead of an ini file...

@craue
Copy link
Contributor Author

craue commented Apr 13, 2013

@stof: I already do (now). Did you actually read my comment above?

@stof
Copy link
Member

stof commented Apr 13, 2013

Actually, the IniFileLoader is flawed. It only allows configuring parameters, and only string parameters (no boolean, no array, no null, no numbers...)

@craue
Copy link
Contributor Author

craue commented Apr 13, 2013

Afaik, arrays are possible, but that's OT now. So we will just drop that PR?

@craue
Copy link
Contributor Author

craue commented Apr 14, 2013

I guess the IniFileLoader itself won't be fixed/improved, right? It looks as its usage is discouraged altogether. Maybe it should be deprecated then.

@fabpot
Copy link
Member

fabpot commented Apr 14, 2013

The ini loader is great to configure strings, so we need to keep it. But documentation should probably be updated to warn people about its limitations. Can you close this PR and open a new one on symfony/Symfony-docs instead? Thanks.

@craue
Copy link
Contributor Author

craue commented Apr 14, 2013

Is there any documentation for IniFileLoader already? If so, I'm unable to find it.

@stof
Copy link
Member

stof commented Apr 14, 2013

I don't think it is documented

@craue
Copy link
Contributor Author

craue commented Apr 14, 2013

Then I'm not sure where to start.

@fabpot
Copy link
Member

fabpot commented Apr 20, 2013

I've just opened a ticket on the documentation.

@fabpot fabpot closed this Apr 20, 2013
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.

3 participants