Thanks, Kris.
I asked this question as I added a 'user configurable' file and
directory permissions settings to my dev branch of
sfAssetsLibraryPlugin.

Permissions settings seem too important to not validate and throw
helpful exceptions. So, I added validation and useful messages to
these permission settings, and I added fallback 'default' values if
the settings are invalid.

But I was concerned that it was 'not the symfony way'. I did not want
to do something too far away from typical symfony practice!
Thank you for your encouragement to validate as needed.

On Nov 28, 9:39 am, Kris Wallsmith <[EMAIL PROTECTED]
project.com> wrote:
> Hi Jill,
>
> I don't know if there's a standard way of doing what you ask. If you
> need to validate a config value it's best to just introspect it after
> calling sfConfig::get() and throw a (helpful) exception if it's not a
> valid value.
>
> Kris
>
> On Nov 24, 12:00 pm, Jill Elaine <[EMAIL PROTECTED]> wrote:
>
> > What is the recommended 'symfony way' for validation of plugin
> > configuration settings?
>
> > For example, if a plugin has config settings in app.yml, should the
> > plugin check to see if the user has entered a valid value before using
> > that value?
>
> > Or should the plugin documentation provide notes and samples, then
> > proceed as if the user has entered a valid value...and if the values
> > are not valid, then the plugin fails in some way?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to