pattern-lab / patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
http://patternlab.io/
MIT License
43 stars 62 forks source link

\PatternLab\Config::setOption() won't set to a falsey value #172

Open andriokha opened 5 years ago

andriokha commented 5 years ago

Hi,

Thanks for this fantastic product!!

I'm new to PL and in writing a listener plugin I wanted to create a test that could update a configuration option to false. It doesn't work because at the start of \PatternLab\Config::setOption() there's this:

https://github.com/pattern-lab/patternlab-php-core/blob/009399c5cb175f1d5a1fafc7b07abc1f2d13a0a3/src/PatternLab/Config.php#L276-L278

Also \PatternLab\Config::updateOption() just passes through to ::setOption().

It's quite an explicit check, so I guess it is/was there for a reason, but I'm not sure what that might be (:

Is that a bug? Am I doing things wrong?!

TIA