Releases: chevere/parameter
2.0.6
2.0.5
- Added
$violationsargument toreflectionToParameters
Full Changelog: 2.0.4...2.0.5
2.0.4
- Add
_unionNullattribute
Full Changelog: 2.0.3...2.0.4
2.0.3
- Added
falsetype - Improved Union assertCompatible method
- Fixed toParameter support for union,
?
Full Changelog: 2.0.2...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