Skip to content

Releases: ScriptFUSION/Mapper

2.3.0 – Join enhancement

02 Mar 12:10
2.3.0
1b8326e
Compare
Choose a tag to compare
  • Added support for single expressions returning an array in Join strategy.

2.2.0 – TryCatch data parameter for exceptions

01 Nov 19:41
2.2.0
ddc6a99
Compare
Choose a tag to compare
  • Added $data parameter to TryCatch exception handler callback.

2.1.0 – Replace

14 Jun 16:24
Compare
Choose a tag to compare
  • Added Replace strategy.

2.0.0 – Copy v2

13 Jun 09:40
2.0.0
Compare
Choose a tag to compare

As documented, Copy is the backbone of most mappings and this major release brings several improvements to Copy that make both Walk and Translate obsolete and have thus been removed in this version.

  • Added support for expression paths in Copy; makes Translate strategy obsolete.
  • Added data override parameter to Copy; makes Walk strategy obsolete.
  • CollectionMapper now accepts any expression type instead of just Mapping.
  • MapperAware now implements KeyAware.
  • MapperAwareTrait now uses KeyAwareTrait.

Breaking changes

Migrating to 2.0.0 is painless for anyone not using Walk or Translate strategies and easy even for those who are.

  • Every occurrence of Translate can simply be replaced with Copy.
  • Every occurrence of Walk can be replaced with Copy by transposing parameters.

The change to CollectionMapper is harmless for most users except those extending the mapCollection method. The method signature must be updated due to PHP's type invariance but otherwise should function exactly the same as before.

Anyone extending MapperAware must ensure they also implement KeyAware, however since most users doing this should be using MapperAwareTrait, the updates to that trait should handle this automatically.

1.6.0 – Copy path expressions

12 Jun 21:45
1.6.0
Compare
Choose a tag to compare
  • Added support for stategies and mappings in Copy path.
  • Deprecated Translate.

1.5.0 – Debug

07 Jun 21:14
1.5.0
Compare
Choose a tag to compare
  • Added Debug strategy.

1.4.0 – CollectionMapper key propagation

05 Jun 22:22
1.4.0
Compare
Choose a tag to compare
  • Added key propagation to CollectionMapper.
  • Minor BC CollectionMapper returns collection keys verbatim instead of numbering them from zero.

1.3.0 – IfElse

11 Mar 10:19
1.3.0
Compare
Choose a tag to compare

1.2.0 – Key propagation

01 Feb 12:42
Compare
Choose a tag to compare
  • Added optional key propagation through Mapper.
  • Added CopyKey strategy, KeyAware interface and KeyAwareTrait.
  • Added Join strategy.
  • Added Translate strategy.
  • Added key and context parameters to Filter strategy callback.

1.1.0 – TryCatch

06 Dec 10:30
Compare
Choose a tag to compare