Repository navigation
Release 5.0.0
Major Refactory
Summary
This pull request includes several important changes to the project, focusing on updating dependencies, and improving documentation. The most significant changes include rewriting the base objects by adding new features and tools, updating the PHP version, adding Psalm for static analysis, and revising the README and documentation files.
Dependency and Tooling Updates:
- Updated the PHP version in the workflow to include 8.3 and removed older versions (7.4, 8.0) in
.github/workflows/phpunit.yml. - Added Psalm static analysis tool to the workflow and configuration files (
.github/workflows/phpunit.yml,.run/Psalm.run.xml,psalm.xml) [1] [2] [3]. - Updated
composer.jsonto require PHP 8.1 or higher and addedext-simplexmlandvimeo/psalmas dependencies.
Documentation Improvements:
- Overhauled the
README.mdto provide a more comprehensive description of the Serializer library's capabilities and updated usage examples [1] [2] [3]. - Added new documentation files for
ObjectCopyandObjectCopyInterfaceto explain their usage and provide examples (docs/objectcopy.md,docs/objectcopyinterface.md) [1] [2]. - Created a detailed guide for the
Serializeclass, including examples and customization options (docs/serialize.md).
Codebase Simplification:
- Replaced
BindableObjectandBindableInterfacewithObjectCopyinBaseModeland removed the old classes (src/BaseModel.php,src/BindableInterface.php,src/BindableObject.php) [1] [2] [3].
Configuration Updates:
- Updated
phpunit.xml.distto include the latest PHPUnit schema and coverage configuration. - Added a run configuration for PHPUnit in
.run/PHPUnit.run.xml.
These changes collectively improve the project's compatibility with newer PHP versions, enhance code quality through static analysis, and provide clearer documentation for users and developers.
The list of Breaking Changes Methodos
SerializerObject to Serialize
| From | To |
|---|---|
| class SerializerObject | class Serialize |
| SerializerObject::isSerializingNull | Serialize::isCopyingNullValues |
| SerializerObject::withDoNotSerializeNull | Serialize:withDoNotParseNullValues |
| SerializerObject::serialize | Serialize::toArray |
| SerializerObject::instance() | Serialize::from() |
| - | Serialize::fromJson() |
| - | Serialize::fromYaml() |
| - | Serialize::fromPhpSerialize() |
| - | Serialize::toJson() |
| - | Serialize::toYaml() |
| - | Serialize::toXml() |
| - | Serialize::toPhpSerialize() |
BindableInterface, BinderObject and BindableObject to ObjectCopy
| From | To |
|---|---|
| interface BindableInterface | interface ObjectCopyInterface |
| BindableInterface::bindFrom | ObjectCopyInterface::copyFrom |
| BindableInterface::bindTo | ObjectCopyInterface::copyTo |
| class BindableObject | class ObjectCopy |
| class BinderObject | class ObjectCopy |