Releases: php-type-language/mapper
Releases · php-type-language/mapper
0.2.0
Features
- Added discriminator mapping (see
#[DiscriminatorMap]
attribute). - Added property name mapping (see
#[MapName]
attribute). - Added localobject "normalize as array" option (see
#[NormalizeAsArray]
attribute). - Added object normalization property skipping options:
- See
#[SkipWhen]
for using skipping expressions. - See
#[SkipWhenEmpty]
forempty(T)
skipping expression. - See
#[SkipWhenNull]
forT === null
skipping expression.
- See
- The
#[MapProperty]
attribute renamed to#[MapType]
. - Added debug tracing and logging options.
- Use
Configuration::$logger
option for logger. - Use
Configuration::$tracer
option for tracing.
- Use
- Added value casting: Values for normalization are now trusted by default and attempt to convert to the specified type, instead of strictly checking.
See https://github.com/php-type-language/mapper/tree/master/tests/Feature/Type files for more information on the casting rules.
- Use
Configuration::$strictTypes
option to enable or disable casting mode.
- Use
Types
- Added
boolean
alias ofbool
type. - Added
integer
alias ofint
type. - Added
double
andreal
aliases offloat
type. - Added
iterable
,Iterator
,Generator
,Traversable
andIteratorAggregate
aliases forarray
normalization. - Added
object
andstdClass
types. - Added
UnitEnumType
support. - Temporary removed non-standard
non-empty-string
,numeric-string
,class-string
,positive-int
,non-negative-int
,negative-int
andnon-positive-int
. Please temporarily add aliases to thestring
andint
for them.
Other
- All runtime (mapping) exceptions and their hierarchy have been rewritten.
- All kernel have been rewritten (there are too many changes to list it all).
Full Changelog: 0.1.0...0.2.0
0.1.0
Please note, this is a pre-release to freeze the stable version, prepare documentation and evaluate the functionality.
Please wait for the major version
1.0.0
if you want to use it in production.
There may be backward compatibility breaks between minor versions0.x
!