Skip to content

Release 5.0.0

Latest
Compare
Choose a tag to compare
@byjg byjg released this 27 Oct 15:47
· 1 commit to master since this release
4d5e54d

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.json to require PHP 8.1 or higher and added ext-simplexml and vimeo/psalm as dependencies.

Documentation Improvements:

  • Overhauled the README.md to provide a more comprehensive description of the Serializer library's capabilities and updated usage examples [1] [2] [3].
  • Added new documentation files for ObjectCopy and ObjectCopyInterface to explain their usage and provide examples (docs/objectcopy.md, docs/objectcopyinterface.md) [1] [2].
  • Created a detailed guide for the Serialize class, including examples and customization options (docs/serialize.md).

Codebase Simplification:

  • Replaced BindableObject and BindableInterface with ObjectCopy in BaseModel and removed the old classes (src/BaseModel.php, src/BindableInterface.php, src/BindableObject.php) [1] [2] [3].

Configuration Updates:

  • Updated phpunit.xml.dist to 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