- chore: rector run
- fix: check file existence before unlinking, suppresses warning
- fix: infinite loop in
MapperFactory
- fix: fix list handling
- fix: rethrow our exceptions in
writeTargetProperty
, fix confusing error message - fix: error when mapping null to existing target
- feat:
Map
now accepts false, for the more expressive#[Map(false)]
- refactor: remove property processor for easier future optimization
- fix: turn
NewInstanceReturnedButCannotBeSetOnTargetException
into a warning
- fix: allow interfaces as the target type of object mapper
- feat:
Map(property: null)
ignores the mapping - fix: only remove source property mapping if it maps to the same name on the target side
- refactor: refactor
ObjectToObjectTransformer
for future optimization - fix: remove unalterable check in
ObjectProcessor
to allow transformers to handle the current target value in all cases - test: test lazy constructor
- fix: double mapping if a property is in the constructor and also has a setter
- fix: remove heuristics of value object detection to reduce confusion
- fix: ensure fix for #232
- refactor: spin off
resolveTargetClass()
to separate class - perf: proxy warming
- feat: process proxies of all classes in the inheritance chain
- feat: throws exception if the paired property does not exist in the other
class if the
Map
attribute hasclass
set - perf:
Context
optimization - perf:
ObjectToObjectTransformer
optimization - perf: move
TypeResolver
outside of the hot path - perf(
ObjectCache
): use sentinel value instead of exception - feat: extra target values
- chore: rector run
- perf: warmable cache
- fix(
CacheWarmer
): usesymfony/filesystem
to dump file - fix(
PHPStan
): fix mapping metadata generation determinism - deps: remove phpstan unused public
- feat: attributes inheritance is now preserved
- chore: rector run
- perf: object mapper resolver cache prewarming
- fix: terms
- feat: transformation from
Stringable
to int, float, and bool by casting
- deps: fix
symfony/stopwatch
dependency - fix:
Map
now works with unpromoted constructor parameters - fix: restore throwing
NewInstanceReturnedButCannotBeSetOnTargetException
- fix: do not run DebugPass if symfony/stopwatch is not present
- fix: null values were skipped if the target allows dynamic properties
- build: reorganize build variables
- style: remove unused immutability check
- refactor: separate caching
- fix: no longer throws exception if the target has no setter
- test: property/object mapper second argument with unalterable object
- refactor: saner metadata factory organization
- fix: target property that is unalterable & not mutable by the host should be skipped
- build: use dotenv for test environment
- feat: target properties with
Collection
&ReadableCollection
typehint will now be lazy-loaded - chore: rector run
- chore: refactor
ObjectToObjectMetadataFactory
for clarity - chore: refactor
PropertyMappingResolver
- chore: cleanup
- feat: property path support in
Map
attributes - fix: writing using property path
- fix: data collector output for property path
- chore: naming, etc
- test: property path negative test
- fix: mapping from
stdClass
to object with mandatory constructor arguments - feat: variadic setter & constructor arguments support
- feat: string to
UnitEnum
transformation - feat: datetime format & timezone conversion
- refactor: genericize attribute handling
- feat: attributes now affects the transformation of collection members
- fix: date time format was not recognized
- test: attribute with missing class
- fix: multiple attributes found in inheritance chain now correctly handled
- feat: save all attributes in metadata, not just our attributes
- feat: datetime transformation to int & float
- feat: class attributes are now stored in the metadata
- chore: rector run
- feat: collect attributes if using property path mapping
- fix: mapping to property without setter wasn't working
- fix: mapping string with timezone to datetime should set the timezone on the target
- perf: don't call the setter if the value doesn't change
- feat:
Eager
attribute to disable proxying on target classes - perf: skip property if setting or mutating is impossible
- chore: rector run
- test: setting new instance to a target without setter
- refactor: consolidate property & property path metadata into single interface
- refactor: consolidate source & target metadata classes
- refactor: add general class metadata
- feat: support for immutable setters
- test: immutable setter without setter on parent object error
- test: immutable setter now works using 'wither' method
- fix: readonly objects no longer assumed to be value objects
- feat:
ValueObject
attribute to explicitly mark classes as value objects - feat: heuristics to detect value objects
- test: integrate profiler with phpunit
- feat: timing using Symfony stopwatch
- test: test different setter return types
- feat: support for immutable adder and remover
- feat: optional second argument for getting the existing target value
- refactor: separate dynamic properties determination to dedicated class
- refactor: add an abstraction for property read/write info extractor
- refactor: separate attributes extraction to dedicated class
- refactor: encapsulate attributes in a class
- refactor: separate value object determination to a dedicated class
- fix: improve value object detection heuristics
- chore: change hashing algorithm from sha256 to xxh128
- feat: remove
hasExistingTarget
tag attribute from object & property mapper service definition. - chore: rename term from 'value object' to 'unalterable' to reduce ambiguity
- build: makefile & workflow schedule
- fix: if array is list, don't match the targets using their keys
- test: more unalterable tests
- feat: use error handler when reading source classes with dynamic properties
- feat: handle magic
__get()
on the source side - feat: handle magic
__set()
on the target side - feat: allow attaching attribute to getters instead of the property
- perf: avoid guessing source type for the second time
- feat: add
Map
attribute to map from different source property - feat:
Map
now supports class inheritance - feat:
Map
now supports reversed mapping - refactor: refactor to
PropertyMappingResolver
for clarity - refactor: refactor for clarity
- refactor: remove unneeded
initializableTargetPropertiesNotInSource
- fix:
Map
class property is now inheritance aware - feat:
AllowDelete
now can be attached to remover methods to take effect - style: naming, etc
- fix: spaceless twig filter is deprecated
- test: modernize tests
- feat: union types support in object mappers
- feat: union types support in property mappers
- fix: mapping unset source property to not null target property
- fix: remove phpstan config remnant
- fix: Doctrine MongoDB ODM proxy class resolving (issue #106)
- feat: add
AllowTargetDelete
, similar toAllowDelete
but defined on the source side - fix: PHP 8.4 compatibility
- deps: allow updates to property-info
- fix: compatibility with
symfony/dependency-injection
7.1.4
- build: add rector
- build: add
Override
attributes where applicable - chore: satisfy static analysis
- fix: exclude
symfony/property-info
version 7.1.2 and 6.4.9, symfony/symfony#57634 - build: satisfy latest phpstan
- refactor(
ObjectMapperTable
): simplification
- build: add github-actions to dependabot
- build: update php-cs-fixer
- refactor: use
ClassUtil::getAllClassesFromObject()
forclass_parents()
+class_implements()
- feat: utilize
InheritanceMap
on the source side to determine the target class - fix: uuid packages are now not required
- feat:
ramsey/uuid
support
- test: add tests for mapping to objects with existing value
- fix: fix: Setter does not get called if the property is also in the constructor
- feat: option to remove missing members from the target object
- feat: add
IterableMapperInterface
for mapping iterables - feat: add
IterableMapperInterface
getter to the non-framework factory
- fix: property info caching if another bundle is decorating cache (#47)
- fix: Fix missing
kernel.reset
tags. - fix: Proxy generation under
opcache
and/orclassmap-authoritative
- feat:
PresetTransformer
. - fix: Typo in
RemoveOptionalDefinitionPass
- feat: Supports dynamic properties (including
stdClass
) on the source side. - fix(
Mapper
): Fix typehint. - test: test array cast to object mapping
- feat(
Context
):with()
not accepts multiple argument. - build: Deinternalize
ObjectCacheFactory
- fix(
PresetMapping
): Support proxied classes, add tests. - fix: Disallow proxy for objects with dynamic properties, including
stdClass
. - feat: Dynamic properties (
stdClass
& co) on the target side. - feat: Deprecate
ArrayToObjectTransformer
&ObjectToArrayTransformer
, replace withArrayObjectTransformer
. - fix: Fix dynamic properties in Symfony profiler panel.
- fix: Fix
PresetTransformer
. - fix: mapping to object extending
stdClass
to property with no setter. - feat:
stdClass
tostdClass
mapping should work correctly. - feat: Mapping to existing values in a dynamic property.
- perf(
ObjectToObjectTransformer
): Prevent delegating toMainTransformer
if the current value in a dynamic property is a scalar. - feat(
PresetMappingFactory
): AddfromObjectCache()
andfromObjectCacheReversed()
. - chore: Simplify remembering mapper.
- refactor: Deprecate serializer context.
- feat: null to
Traversable
orArrayAccess
is now handled & returns empty. - chore: Add
readonly
or implementResetInterface
to applicable classes.
- No changes.
- fix: Handle cases where transformed key is different from the original.
- fix: Deprecate
MapFromObjectInterface
&MapToObjectInterface
. - refactor(
MainTransformer
): Move to implementation namespace. - refactor: Move proxy creation code to
ProxyFactory
. - feat(
SubMapperInterface
): AddcreateProxy()
. - refactor(
ProxyGeneratorInterface
): RemoveProxySpecification
.
- fix(
composer.json
): Change PHP require to>=8.2
. - refactor(
Mapper
): Move under implementation namespace. - refactor: Rename
ArrayInterface
toCollectionInterface
. - refactor(
MapperFactory
): Move to top namespace. - refactor(
Transformer
): Move implementation to its own namespace.
- perf(
TypeResolver
): OptimizegetSimpleTypes
. - fix(
MainTransformer
): Reduce GC interval to 500. - build: Require PHP 8.2.
- chore: Add
final
,readonly
, andinternal
if applicable to all classes.
- fix(
MapperInterface
): Fix type-hint mismatch. - test: Add hook to override the default
Context
. - test: Test with and without scalar short circuit.
- fix: Null value to nullable target transformation (issue #4).
- fix(
DoctrineProxyGenerator
): Remove if Doctrine is not available. - fix(service definition): Add interface aliases for easy decoration.
- fix(
CachingObjectToObjectMetadataFactory
): Fix invalid cache key (issue #3).
- refactor(
Context
): Returns null instead of throwing exception if the member is not found. - refactor(
Context
): Context is nowTraversable
. - feat(
MapperOptions
): Add context object to provide mapping options. - feat(
MainTransformer
): Manual garbage collector. - feat(
ObjectToObjectTransformer
): Option to disable lazy loading. - feat(
ObjectToObjectTransformer
): Option to disable target value reading. - refactor(
MainTransformer
): Make manual GC interval a static variable. - refactor(
ObjectToObjectMetadataFactory
): RemoveContext
. - refactor(
MapperOptions
): Simplify option names. - fix: Fix deprecations.
- refactor(
ProxyGeneratorInterface
): Use class as input. Remove dependency onObjectToObjectMetadata
. - refactor(
ProxyGeneratorInterface
): Move proxy namespace to top-level namespace. - fix(
ProxyGenerator
): Prevent Doctrine entities from being proxied.
- test: Add tests for read-only targets.
- feat(
ObjectToObjectMetadata
): Store the reason if the object cannot use proxy. - style(
Profiler
): Improve layout. - feat(
Profiler
): Collect object to object metadata. - test: In 8.2, read only classes cannot be lazy.
- fix(
ObjectToObjectTransformer
): If target is lazy and its constructor contains an eager argument, then the rest of the arguments must be eager. - fix(
ObjectToObjectMetadataFactory
): If the target is not writable, skip the mapping. - feat(
Profiler
): Show mapping table. - refactor(
MappingFactory
): Separate cache warmer fromWarmableMappingFactory
. - feat(
DoctrineEagerPropertiesResolver
): Automatically identifies ID columns of a Doctrine entity.
- style(
Profiler
): Cosmetic. - refactor(
EagerPropertiesResolver
): CreateChainEagerPropertiesResolver
. - refactor(
HeuristicsEagerPropertiesResolver
): Genericize. - perf(
ProxyRegistry
): Improve proxy generation performance. - style(
ObjectToObjectTransformer
): Add comments for clarity. - dx(
DebugPass
): Remove property info caching on debug mode. - fix(
ObjectToObjectTransformer
): Disregard existing target if it is read only. - fix(
ReaderWriter
): Fix reading unset properties on a proxy.
- style: Sort
composer.json
- fix(
ObjectToObjectMetadataFactory
): Resolve proxy classes to real classes. - fix(
ProxyGenerator
): Target proxy classes now does not depend on source class name. - fix(
ProxyGenerator
): Borrow__CG__
marker for compatibility with third-party libraries. - feat(
MapperDataCollector
): Add lazy badge for lazy results. - test: Fix psalm errors.
- fix: Mixed & untyped property was not previously working.
- feat(
DataCollector
): Add target type hint information. - fix(
ObjectToObjectMetadataFactory
): Fix scalar type logic. - test: Fix psalm errors.
- fix(
MainTransformer
): Inject kernel.debug - revert(
Profiler
): Remove guessed badge because of the possibility of confusion. - perf(
ObjectToObjectTransformer
): If source is null & target accepts null, we set null on the target directly.
- refactor(
ObjectToObjectTransformer
): Refactor for future extension. - feat: Target object can now be a lazy-loading proxy.
- fix: Bump lower bound of
symfony/var-exporter
to6.4.1
&7.0.1
. - test: Add mandatory config for
symfony/framework-bundle
. - fix(
ProxyGenerator
): Handle readonly targets. - build: Require
symfony/console
. - test: Lazy loading id property from parent class.
- fix(
TraceData
): Do not throw exception on missing data. - fix(
MainTransformer
): Improve error reporting on circular references. - fix(
ObjectCache
): Change backing store toWeakMap
. - feat(
EagerPropertyResolver
): Required for future lazy feature. - perf(
ObjectToObjectTransformer
): Handle null to scalar transformation internally.
- dx(
SubMapperInterface
):map()
now accepts null input, that will return null.
- fix(
ObjectToObjectMetadataFactory
): Remove remnants. - fix(
SubMapperInterface
): Context is now null by default.
- fix: Hide toolbar icon if no mappings are recorded.
- fix: Add check if warmed files exist.
- fix(
MapperDataCollector
): Fix problem is no mappings is recorded.
- feat: Data collector.
- feat: Web profiler bundle integration.
- fix: Fix web profiler HTML.
- refactor: Namespace for
ArrayLikeMetadata
&ObjectToObjectMetadata
. - refactor(
ObjectToObjectMetadata
): Made immutable. - feat(
ObjectToObjectMetadata
): In debug mode, check if the involved classes have changed.
- fix: Add caching for
ObjectMapperTable
. - perf: Use
ObjectMapperResolver
to resolve object mapper. - perf: Incorporate inheritance mapping logic into
ObjectToObjectTransformer
.
- style: Remove remnants.
- test: Add PHPStan unused public.
- refactor(
PropertyMapper
):$sourceClass
is redundant & removed. - refactor(
PropertyMapper
): Ifproperty
is missing, use the method name, stripping the leading 'map' and lowercasing the first letter. Example:mapName
will map to the propertyname
. - feat(
PropertyMapper
): Option to addContext
&MainTransformerInterface
as extra arguments to the property mapper. - refactor(
SubMapper
): Move to its own namespace. - refactor(
SubMapper
): Use a factory to create sub mappers. - refactor(
ObjectCache
): Remove references toContext
. - refactor(
SubMapper
): Addcache()
method. - refactor: Rename
MapperPass
toRemoveOptionalDefinitionPass
- refactor: Move implementation under their own namespaces.
- refactor(
AsPropertyMapper
): Move to top attribute namespace. - refactor: Rename
PropertyMapperServicePointer
toServiceMethodSpecification
. - refactor: Rename
PropertyMapper
namespace toCustomMapper
. - refactor: Genericize
ServiceMethodSpecification
&ServiceMethodRunner
. - fix(
ObjectToObjectMetadataFactory
): HandlePropertyWriteInfo::TYPE_NONE
. - feat:
ObjectMapper
- refactor: Compiler pass namespace.
- refactor(
CompilerPass
): Reduce code duplication. - feat(
SubMapper
): Now available as additional argument inPropertyMapper
&ObjectMapper
. - test: Migrate tests to use
FrameworkBundle
.
- style(
ReaderWriter
): Cleanup. - test: Test mapping
Money
with integer backing. - style: Remove Property Access.
- fix(
ObjectCache
): Enum should not be cached. - test: Add more tests for object keys.
- fix(
ObjectToObjectTransformer
): Throw exception when trying to map internal classes. - fix(
ContextAwareExceptionTrait
): Improve exception message. - refactor(
PropertyMapping
): Include information from property read/write info. - feat: Add support for adder methods.
- refactor: Remove
AdderRemoverProxy
from support list, useArrayAccess
instead. - perf: Read & write properties directly without Property Access.
- refactor(
TraversableTransformerTrait
): Refactor for clarity. - refactor(
ArrayLikeTransformerTrait
): Rename for clarity. - refactor(
ArrayLikeMetadata
): Add$type
. - refactor(
PropertyMapping
): Add$sourceTypes
. - refactor(
TraversableToArrayAccessTransformer
): Refactor for clarity. - refactor(
ArrayLikeTransformerTrait
): Cleanup. - refactor(
MainTransformer
): Add$sourceType
so we can preserve generics information obtained from the source class. - refactor(
ArrayLikeMetadata
): Refactor for future extension. - refactor(
ArrayLikeMetadata
): Also inject source type information. - perf: Use xxh128 hash for cache keys.
- refactor(
ArrayLikeMetadata
): Add more properties. - feat(
TraversableToArrayAccessTransformer
): Add lazy capability.
- refactor: Rename
ObjectStorage
toHashTable
. - refactor(
HashTable
): Supports all variable types. - perf: Make
ArrayLikeMetadata
cacheable.
- feat: Supports object with non
int|string
keys. - refactor(
TraversableTransformerTrait
): Refactor properties to a metadata object. - feat: Fix
SplObjectStorage
iterator by wrapping it inSplObjectStorageWrapper
. - refactor(
Path
): Cleanup. - feat: Use
(key)
in the path for transformation in the keys of array-like objects.
- perf(
ObjectToObjectTransformer
): Do simple scalar to scalar mapping without delegating to theMainTransformer
. - refactor(
ObjectToObjectTransformer
): Reduce code duplication. - refactor: Reduce code duplication in
TraversableToArrayAccessTransformer
&TraversableToTraversableTransformer
.
- perf: Move instantiable check to
ObjectMappingResolver
. - refactor: Do not use
array_intersect
to determine object mapping. - dx(
ObjectMapping
): Make it mutable. - refactor(
ObjectToObjectMetadata
): Class & namespace renames for clarity. - refactor(
ObjectToObjectMetadata
): Refactor for future extension. - refactor(
ObjectToObjectMetadata
): AdddoReadSource
flag. - feat: Add
PropertyMapper
for customizing property mapping in object to object transformation.
- refactor(
ClassMethodTransformer
): Move to Transformer namespace. - revert(
TransformerRegistry
): A transformer might apply twice to the same source-target pair. - style: Use
MarkdownLikeTableStyle
in console commands. - perf(
Context
): Improve context creation. - feat: Add
NormalizerContext
&DenormalizerContext
to provide the context for normalizers & denormalizers. - dx(
Context
): Changecreate()
to use variable-length arguments.
- fix: Fix static analysis issues.
- perf(
TransformerRegistry
): Optimize sorting. - perf(
TransformerRegistry
): Optimize caching. - feat: Symfony Uid support.
- build: Remove
SymfonyUidTransformer
if Symfony UID is not installed.
- perf: Optimize
guessTypeFromVariable
- perf: Optimize
Context
&ObjectCache
- perf: Change 'simpletypes' cache to array.
- perf: Use our
PropertyAccessLite
instead of Symfony's. - fix(
CachingObjectMappingResolver
): Safeguard - perf: Use flyweight pattern for
TypeFactory
- perf(
TypeCheck
): ImproveisVariableInstanceOf
. - perf(
ScalarToScalarTransformer
): Optimize. - perf: Remove type guesser from
TypeResolver
. - perf(
ObjectCache
): Optimize using plain arrays. - perf: Optimize
ObjectCache
&Context
. - perf(
TransformerRegistry
): CacheTransformerInterface
instances. - perf: Optimize
ObjectCache
&Context
. - perf(
TypeFactory
): OptimizeobjectWithKeyValue
. - perf(
CachingTypeResolver
): Userawurlencode
instead ofmd5
.
- perf: Add caching for
TransformerRegistry
.
- fix: Add missing deps to
composer.json
- docs: Add rationale.
- fix: Add variance safeguard.
- dx: Clarity.
- style: Exception messages.
- feat: Uses transformer class names as service IDs for easier decoration.
- refactor: Move mapping logic in
ObjectToObjectTransformer
to its own service. - refactor: Move more mapping logic to
ObjectMappingResolver
. - perf: Add caching for
ObjectMappingResolver
.
- test: Reorganize test namespaces.
- fix: Fix path forming.
- fix: Add type checking for variance in
TypeMapping
andMappingEntry
. - refactor: Refactor
Transformer
for clarity. - refactor: Transformer is now lazy-loaded.
- feat: Make the fourth argument optional in
TryPropertyCommand
. - fix(
TransformerRegistry
): Non-object target type is always invariant. - dx(
SearchResult
): Now anArrayAccess
. - feat(
TryPropertyCommand
): Improve output. - dx(
TypeCheck
): Now acceptMixedType
as an argument. - test: Mapping test first version.
- refactor: rename
RefuseToHandleException
toRefuseToTransformException
. - perf(
CopyTransformer
): Move identity check to the beginning. - fix(
MainTransformer
): Fix possible bug involving an existing target. - fix(
MainTransformer
): Make sure the target has the same type as the target type. - feat(
TraversableToArrayAccessTransformer
): Now supportsArrayCollection
&ArrayIterator
. - test: Assorted tests.
- fix: Remove iterating object key because not supported in PHP.
- test: Assorted tests.
- fix:
NullTransformer
bug. - fix(
CachingMappingFactory
): Cache result in memory. - fix(
CachingMappingFactory
): Skip the cache if in debug mode.
- fix: Service definition for
TryPropertyCommand
. - feat: All exceptions now accept
$context
variable for more useful error messages. - feat: Context methods now accept
$context
variable, and pass it to exceptions. - feat: Main transformer's exception now accepts
$context
variable. - feat: More useful
TransformerReturnsUnexpectedValueException
exception message. - feat: If a transformer throws
RefuseToHandleException
, theMainTransformer
will try the next suitable transformer. - style: Remove unused vars.
- feat: Transformers now have the option to have an invariant target type.
- fix: Wrong service id for
CopyTransformer
. - fix: Remove cache file & regenerate it if it is corrupt.
- fix: PropertyAccessor
UninitializedPropertyException
error now is regarded as null.**** - fix: Transformer
SearchResult
was not properly ordered. - feat:
TryProperty
command, orrekalogika:mapper:tryproperty
in console.
- fix: Improve exception message.
- docs: Add link to documentation website.
- refactor: Consolidate boilerplate code for getting the
ObjectCache
. - refactor: Move transformer query logic to
TransformerRegistry
. - refactor: Mover more logic to
TransformerRegistry
. - refactor: Move
MainTransformer
to its own namespace. - refactor: Refactor exception.
- feat: Add attribute matching.
- refactor: Simplify object caching.
- refactor: Remove
$context
fromMapperInterface
- chore: Fix static analysis issues.
- refactor: Change context array to
Context
object. - refactor: Move
Context
to its own namespace. - style(Context): Rename
set
towith
andremove
towithout
. - refactor: Reintroduce
Context
toMapperInterface
. - feat: Inheritance support.
- perf: Add a caching layer for
TypeResolver
- feat:
TraversableToTraversableTransformer
now acceptsGenerator
as a target type - feat: Constructor arguments
- test: Custom transformer
- refactor: Move
MixedType
to contracts - refactor: Move standalone
MapperFactory
under MapperFactory namespace - refactor: Simplify
MapperInterface
- test: Fix tests due to refactor
- refactor: Move deprecated facade to Facade namespace
- refactor:
MainTransformerInterface
now only accept array$targetType
- refactor:
TransformerInterface
now accepts null$targetType
to signify mixed type. - refactor: Remove deprecated facade.
- feat: Add
CopyTransformer
to handle mixed to mixed mapping. - feat:
TraversableToTraversableTransformer
now gives aCountable
result if the source isCountable
. - revert: Revert support for
Generator
target type. Impossible to have aCountable
result. - docs: Improve documentation
- fix: Change
ObjectCache
to useWeakMap
. Should improve memory usage. - feat: Method mapper
- refactor: Use
MappingFactoryInterface
everywhere instead ofMappingFactory
- perf: Move some
TypeUtil
methods toTypeResolver
for optimization opportunities - refactor: use
ObjectCacheFactory
to generateObjectCache
instances - chore: Update
MapperFactory
to reflect framework usage - perf: Use property info caching in non-framework usage
- perf: Add mapping caching
- style: Change console command to use
rekalogika
prefix
- feat: Support Symfony 7
- fix: Fix service definition for
MapperFactory
- build: Initial release