Skip to content

Releases: chevere/parameter

2.0.3

18 Mar 17:30
fad921c

Choose a tag to compare

  • Added false type
  • Improved Union assertCompatible method
  • Fixed toParameter support for union, ?

Full Changelog: 2.0.2...2.0.3

2.0.2

04 Mar 15:12
128b634

Choose a tag to compare

  • Added takeOne helper
  • Improved validated helper callable support

Full Changelog: 2.0.1...2.0.2

2.0.1

01 Mar 12:48
31812aa

Choose a tag to compare

  • Added support for labels #17
  • Added reflectionToParameter helper
  • Added class-string hint to ObjectParameterInterface participants
  • Added empty-array handling as wildcard array type
  • Fixed reflection attribute handling

Full Changelog: 2.0.0...2.0.1

2.0.0

21 Feb 12:52
11a668e

Choose a tag to compare

  • Added assertReturn() attribute helper (#29)
  • Added castUnion to cast values according to an inferred union type
  • Added castValues to 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 CastInterface to TypedInterface (#26)
  • Renamed valid() to assertArguments() (#28)
  • Renamed attributes to use underscore naming (to match functions)
  • Treated void as null and added default handling for mixed returns

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

12 Sep 19:28
f91e8ba

Choose a tag to compare

  • Added ArgumentsStringInterface
  • Added FSP support to datetime function
  • Added attribute MixedAttr

Full Changelog: 1.1.3...1.2.0

1.1.3

30 Aug 18:17
ab4fad5

Choose a tag to compare

Full Changelog: 1.1.2...1.1.3

1.1.2

19 Jun 22:40
acb2510

Choose a tag to compare

  • Fixed removal of extraneous nested arguments

Full Changelog: 1.1.1...1.1.2

1.1.1

20 Feb 15:31
4914eaa

Choose a tag to compare

  • Added support for empty array on iterables 4914eaa
  • Improved default arguments handling 27c12b5

Full Changelog: 1.1.0...1.1.1

1.1.0

14 Feb 12:18
fe603d1

Choose a tag to compare

Full Changelog: 1.0.7...1.1.0

1.0.7

23 Jan 19:04
6a23c6c

Choose a tag to compare

Full Changelog: 1.0.6...1.0.7