Releases: chevere/parameter
2.0.3
2.0.2
- Added
takeOnehelper - Improved
validatedhelper callable support
Full Changelog: 2.0.1...2.0.2
2.0.1
2.0.0
- Added
assertReturn()attribute helper (#29) - Added
castUnionto cast values according to an inferred union type - Added
castValuesto cast arguments based on declared parameter types - Added support for backed-enum string regex
- Added support for PHP 8.5
- Fixed argument ordering bug (#33)
- Improved support for positional arguments
- Removed default attribute parameter
- Renamed
CastInterfacetoTypedInterface(#26) - Renamed
valid()toassertArguments()(#28) - Renamed attributes to use underscore naming (to match functions)
- Treated
voidasnulland added default handling formixedreturns
Full Changelog: 1.2.0...2.0.0
This one was cooked at the Chevereto Cloud project, where I detected inconsistent attribute API by using the NameAttr convention which was very ugly to work with.
Helper castValues was created to support our Action to CLI mapper as in controller input everything is string, this stuff cast to the most appropriate types for a bag of arguments. castUnion works the same, it detects the union type and cast the appropriate type.
This one covers several edge cases, adds several QoL improvements derived from building systems with this lib.
This is still weak on casting nested arrays with default values, but is there anyone using such feature? If I keep "not needing" those I will remove that for v4.
1.2.0
- Added
ArgumentsStringInterface - Added FSP support to
datetimefunction - Added attribute
MixedAttr
Full Changelog: 1.1.3...1.2.0
1.1.3
1.1.2
- Fixed removal of extraneous nested arguments
Full Changelog: 1.1.1...1.1.2
1.1.1
1.1.0
- Added "one line per error" convention 17c6784
- Added array-like splat access to members ba5a59c
- Added support for positional arguments edf2de2 #22
- Added support for SensitiveParameter #18 #14 e4631cf 295c49d 7dea06c e317220
- Fixed
?unionnot being detected as union 0a00f29 - Fixed bug with missing default parameter c6ccd3b
- Improved
valMdfunction 87c53d5 - Improved default values handling 7fceeb8
- Improved docs 9355d29 fe603d1
- Improved error messages when having empty values #13
- Improved extra arguments handling b64d5ad
- Improved support for variadic parameters #21 3af8b21 7e1d3dd fd108a6
- Improved tests 56806c6 3b0a9ce 92f5bb1
- Removed ArrayAccess support 837e421
- Removed enum capturing group 31081c1
- Updated dependencies ab9d803 55ee7cb 5ec53fe fd8baab
Full Changelog: 1.0.7...1.1.0