Releases: ScriptFUSION/Mapper
Releases · ScriptFUSION/Mapper
2.3.0 – Join enhancement
2.2.0 – TryCatch data parameter for exceptions
- Added
$dataparameter toTryCatchexception handler callback.
2.1.0 – Replace
- Added
Replacestrategy.
2.0.0 – Copy v2
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; makesTranslatestrategy obsolete. - Added data override parameter to
Copy; makesWalkstrategy obsolete. CollectionMappernow accepts any expression type instead of justMapping.MapperAwarenow implementsKeyAware.MapperAwareTraitnow usesKeyAwareTrait.
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
Translatecan simply be replaced withCopy. - Every occurrence of
Walkcan be replaced withCopyby 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
- Added support for stategies and mappings in
Copypath. - Deprecated
Translate.
1.5.0 – Debug
- Added
Debugstrategy.
1.4.0 – CollectionMapper key propagation
- Added key propagation to
CollectionMapper. - Minor BC
CollectionMapperreturns collection keys verbatim instead of numbering them from zero.
1.3.0 – IfElse
- Added
IfElsestrategy. (@markchalloner)
1.2.0 – Key propagation
- Added optional key propagation through
Mapper. - Added
CopyKeystrategy,KeyAwareinterface andKeyAwareTrait. - Added
Joinstrategy. - Added
Translatestrategy. - Added key and context parameters to
Filterstrategy callback.
1.1.0 – TryCatch
- Added
TryCatchstrategy. (@a-barzanti)