Download the PHP package tetthys/domain-kernel without Composer
On this page you can find all versions of the php package tetthys/domain-kernel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tetthys/domain-kernel
More information about tetthys/domain-kernel
Files in tetthys/domain-kernel
Download tetthys/domain-kernel
More information about tetthys/domain-kernel
Files in tetthys/domain-kernel
Vendor tetthys
Package domain-kernel
Short Description Domain exception and error reason kernel for Tetthys ecosystem.
License
Package domain-kernel
Short Description Domain exception and error reason kernel for Tetthys ecosystem.
License
Please rate this library. Is it a good library?
Informations about the package domain-kernel
Minimal Example — Pure PHP (4 Files)
This guide shows the absolute minimum needed to use:
FailureReasonenumServiceFailureExceptionServiceFailable+abortWith()- A simple service (
ItemService)
No framework. No repository layer. No external dependencies.
1. Directory Layout
That’s all you need.
2. File: src/Exceptions/ItemFailureReason.php
3. File: src/Exceptions/ItemFailure.php
4. File: src/Service/ItemService.php
5. File: example.php
6. Running the Example
Output:
7. What You Actually Need
Only four things:
✔ A failure reason enum
✔ A service-specific failure exception
✔ A service class using ServiceFailable + abortWith()
✔ A try/catch around your service call
This is the smallest possible real-world usage example of tetthys/domain-kernel
and can be directly applied to any other domain (OrderService, AuthService, etc.).
All versions of domain-kernel with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3
The package tetthys/domain-kernel contains the following files
Loading the files please wait ...