A PHP 7 implementation of the cargo shipping domain from Eric Evans' Domain-Driven Design book, demonstrating tactical DDD patterns.
PHP DDD Cargo Sample is a reference implementation of the cargo shipping domain from Eric Evans' Domain-Driven Design book, built with PHP 7. It demonstrates how to apply DDD tactical patterns—like aggregates, entities, and value objects—in a modern PHP application to manage complex business logic in the shipping industry.
PHP developers and software architects learning or applying Domain-Driven Design, particularly those seeking a concrete, working example of DDD patterns in PHP with modern frameworks and tools.
Developers choose this project because it provides a complete, well-structured PHP 7 implementation of a classic DDD case study, using up-to-date technologies like Zend Expressive and Doctrine ORM. It bridges the gap between DDD theory and practice, offering tested, educational code rather than just theoretical concepts.
PHP 7 Version of the cargo sample used in Eric Evans DDD book
Uses PHP 7 strict type hints and PSR-7/15 middleware with Zend Expressive, ensuring code clarity and interoperability, as highlighted in the 'What Is New?' section of the README.
Demonstrates DDD tactical patterns like aggregates and value objects with Doctrine ORM embeddables, providing a concrete reference to translate theory into working code.
Features are described and tested with Behat and Mink, validating business expectations directly, as shown in the 'Behavior Driven Design' section with example feature files.
Offers a complete, annotated project structure and documentation, making it an effective learning resource for DDD workshops or self-study in PHP.
Based on PHP 7 and older versions of Zend Expressive and Doctrine, which may lack compatibility with current PHP 8+ ecosystems and security updates, limiting modern adoption.
Requires running a selenium server for Behat tests and has multiple installation steps, as noted in the documentation, which can be cumbersome for those new to the toolchain.
Admitted as an educational reference with caveats from the original Java version, missing features like authentication, scalability, and error handling needed for real-world use.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.