PHP_CodeSniffer icon indicating copy to clipboard operation
PHP_CodeSniffer copied to clipboard

Throw warning when user tries to change unavailable ini setting

Open jrfnl opened this issue 9 months ago • 0 comments

Is your feature request related to a problem?

Follow up on #416, which was fixed via #1024.

If a user tries to change an unavailable ini setting, this will currently be silently ignored.

Typically, unavailable ini settings are either a typo - think: short_open_tags vs short_open_tag - or due to the user trying to change an ini setting on a PHP extension which is not loaded.

Describe the solution you'd like

As discussed in #416, it would be good to warn users when this is happening, but without it affecting the exit code, which is currently not possible for code executed in the Config class.

Once the MessageCollector class has been introduced into the Config class, it should be possible to start throwing a notice or warning for this.

jrfnl avatar Apr 18 '25 10:04 jrfnl