0.23.2
What's Changed
- fix: coerce string CLI inputs for
Booleanparams by @ChiragAgg5k in #52
Background
--commit=false (and other string inputs to a Boolean param) used to silently arrive at the action callback as PHP true because of implicit string-to-bool casting at the bool typehint boundary. The CLI dispatcher now coerces the validated string to a real PHP bool via filter_var, so callbacks receive what the validator says they should.
Compatibility
- Callbacks that already pass real
boolvalues are unaffected. - Callbacks that compare against literal strings like
=== 'false'will need to be updated — but those callers were almost certainly mishandling the validator's contract already. - Empty-string defaults (e.g.
->param('commit', '', new Boolean(true), …, true)used as a three-state sentinel) are preserved and continue to arrive as''.
Full Changelog: 0.23.1...0.23.2