sidus / converter-bundle
Alternative to Symfony/Serializer to convert complex data types using Yaml configuration.
0.2.6
2024-09-10 13:46 UTC
Requires
- php: >=8.0
- cleverage/process-bundle: >=3.2
- psr/log: >=2.0
- symfony/config: >=5.3
- symfony/dependency-injection: >=5.3
- symfony/event-dispatcher: >=5.3
- symfony/http-kernel: >=5.3
- symfony/options-resolver: >=5.3
- symfony/property-access: >=5.3
README
Alternative to Symfony/Serializer to convert complex data types using Yaml configuration.
Event handling order (priority)
- CheckInputTypeSubscriber (10000)
- Ensure the input type is supported
- BehaviorsHandlerSubscriber (1200)
- Attach mapping configurations from behaviors
- PropertiesExtractorSubscriber (1000)
- Extract properties from the input data based on the mapping configuration
- AutoMappingExtractorSubscriber (900)
- Automatically extract remaining properties from the input if the auto_mapping option is enabled
- TransformerSubscriber (800)
- Transform the extracted properties using the transformer configurations
- OutputCreatorSubscriber (400)
- Create the output object, either by using the constructor and the available properties or by creating a new instance without the constructor if the hydrate_object option is enabled.
- HydratorSubscriber (200)
- Hydrate the output object using the transformed properties if the hydrate_object option is enabled.
- PropertiesSetterSubscriber (0)
- Set the properties on the output object by using the PropertyAccessor
- CheckRemainingPropertiesSubscriber (-10000)
- Check if there are remaining properties in the input data that have not been processed