[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: php-type-language/mapper

0.2.0

20 Nov 01:58
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

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] for empty(T) skipping expression.
    • See #[SkipWhenNull] for T === null skipping expression.
  • The #[MapProperty] attribute renamed to #[MapType].
  • Added debug tracing and logging options.
    • Use Configuration::$logger option for logger.
    • Use Configuration::$tracer option for tracing.
  • 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.

Types

  • Added boolean alias of bool type.
  • Added integer alias of int type.
  • Added double and real aliases of float type.
  • Added iterable, Iterator, Generator, Traversable and IteratorAggregate aliases for array normalization.
  • Added object and stdClass types.
  • Added UnitEnumType support.
  • Temporary removed non-standard non-empty-string, numeric-string, class-string, positive-int, non-negative-int, negative-int and non-positive-int. Please temporarily add aliases to the string and int 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

16 Oct 09:26
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

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 versions 0.x!