squizlabs/PHP_CodeSniffer — pull request #167 by wimg (2013-11-02 21:21:33+00:00)
Title: Added: parameter to allow defining runtime settings, to be used only once

Allows specifying specific key-value pair settings, which can then be retrieved by the sniffs.
Use case : in the PHPCompatibility standard, it allows you to specify which PHP version you want to check on

See https://github.com/squizlabs/PHP_CodeSniffer/pull/159 for initial discussion

Taking the --config-set functionality in account, I discovered that PHP_CodeSniffer::setConfigData which is being used by --config-set has a 3rd parameter which allows defining that this parameter is not to be written to the config file, but only used during this runtime. This is perfect for what we need.
I created --runtime-set although the name ofcourse can be easily changed (temp-set, run-set, ...)