looqey/speca

Describe your specs through expressive data classes

1.1.3 2025-04-21 09:42 UTC

This package is auto-updated.

Last update: 2025-07-21 10:16:31 UTC


README

Speca is a flexible and powerful implementation of data classes designed for seamless interaction with external systems (such as API DTOs) and efficient data flow management across different domains. Inspired by domain-driven design (DDD) principles, Speca provides a structured and adaptable approach to handling data transformations.

Why Speca?

  • Automatic property population – No more manual assignments. Speca maps input arrays directly to object properties.
  • Attribute-based parsing and serialization – Fine-tune how data is handled using PHP attributes.
  • Lazy properties – Optimize performance by loading data only when needed.
  • No external dependencies – Speca is built purely on PHP's native capabilities, ensuring compatibility and minimal footprint.

With Speca, data structures become more than just objects—they represent specifications, defining how data is parsed, transformed, and serialized across your application.

Installation

Install Speca via Composer:

composer require looqey/speca

Documentation 📖

For a detailed guide on using this library, visit the 👉 official documentation

Contributing 🤝

We welcome contributions! If you have ideas, improvements, or find an issue, feel free to open an issue or submit a pull request. Your feedback and contributions help make Speca even better! 🚀

Let's shape the future of PHP data handling together! 💡🚀