Download the PHP package backbrain/php-automapper without Composer
On this page you can find all versions of the php package backbrain/php-automapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download backbrain/php-automapper
More information about backbrain/php-automapper
Files in backbrain/php-automapper
Package php-automapper
Short Description PHP port of the popular automapper.org library
License MIT
Homepage https://backbrainhq.github.io/php-automapper/
Informations about the package php-automapper
PHP AutoMapper
PHP AutoMapper is a library designed to simplify the mapping of data between objects, inspired by the popular .NET library AutoMapper. It aims to reduce boilerplate code necessary for transferring data from one object structure to another, making your PHP application cleaner and maintenance easier.
Note: This project is still in alpha development and may not yet support all features of the original AutoMapper library. Interfaces and methods may change even in minor releases until a stable version v1.x is reached.
Installation
Use Composer to install PHP AutoMapper into your project:
Features
PHP AutoMapper strives to implement the core functionalities of the original .NET AutoMapper library. Here's a list of supported features:
- [x] Convention-based mapping
- [x] Custom value resolvers
- [x] Nested object mapping
- [x] Conditional property mapping
- [x] Custom value converters
- [x] Before and after mapping actions
- [x] Support for AutoMapper profiles
- [ ] Reverse mapping
- [ ] Inline mapping configuration
- [x] Mapping to existing objects
Please note that due to differences between C# and PHP, not all features from the original AutoMapper library are applicable or have been implemented at this stage.
Documentation
For a detailed documentation, please refer to the PHP AutoMapper Documentation site.
For general usage patterns and understanding AutoMapper concepts, please refer to the original AutoMapper documentation:
The concepts and configurations explained in the original documentation serve as a basis for understanding how to use PHP AutoMapper effectively. Where PHP AutoMapper diverges or extends the original library's functionality, specific documentation and examples will be provided within this project's wiki or documentation directory.
Usage Example
Here's a simple example of how to use PHP AutoMapper to map data between two objects. For more examples and detailed usage instructions, please refer to the examples directory.
The dump shows the new ProfileDTO with the mapped properties:
For more examples and detailed usage instructions, please refer to the examples directory.
Contributing
Contributions to PHP AutoMapper are welcome! Whether it's adding new features, improving existing ones, or writing documentation, your help is appreciated. Please refer to the CONTRIBUTING.md file for guidelines on how to contribute to this project.
Commit messages
We are using Angular Commit Message Conventions.
The <type>
must be one of the following:
feat
: A new featurefix
: A bug fixdocs
: Documentation only changesstyle
: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor
: A code change that neither fixes a bug nor adds a featureperf
: A code change that improves performancetest
: Adding missing or correcting existing testschore
: Changes to the build process or auxiliary tools and libraries such as documentation generation
License
PHP AutoMapper is open-sourced software licensed under the MIT license.
This project is not affiliated with the original AutoMapper project but is inspired by its functionality and aims to bring similar capabilities to the PHP community.
All versions of php-automapper with dependencies
psr/log Version ^3.0
psr/cache Version ^3.0
symfony/property-access Version ^6.0|^7.0
symfony/property-info Version ^6.0|^7.0
symfony/finder Version ^6.0|^7.0
symfony/expression-language Version ^6.0|^7.0
symfony/uid Version ^6.0|^7.0
symfony/clock Version ^6.0|^7.0
phpstan/phpdoc-parser Version ^1.26|^2.0
phpdocumentor/type-resolver Version ^1.8
phpdocumentor/reflection-docblock Version ^5.3
jawira/case-converter Version ^3.5
nikic/php-parser Version ^4.0|^5.0