Skip to content

Commit

Permalink
Merge pull request #31 from Jeckel-Lab/feature/doc
Browse files Browse the repository at this point in the history
Update doc
  • Loading branch information
jeckel committed Jan 3, 2022
2 parents bf4758d + 44db109 commit d413fc3
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,39 +205,3 @@ In each layer, when we need to throw an Exception, we create a new class corresp

- extends one of the [SPL exception](https://www.php.net/manual/en/spl.exceptions.php) or another (more generic) exception from the same namespace.
- implements the exception interface of the current layer.


## Old Documentation

### Core

- **[CommandDispatcher](src/Core/CommandDispatcher/)**: Define all contract for the **command bus** implementation with
- **[Command](src/Core/CommandDispatcher/Command/Command.php)**
- **[CommandHandler](src/Core/CommandDispatcher/CommandHandler/CommandHandler.php)**
- **[CommandResponse](src/Core/CommandDispatcher/CommandResponse/CommandResponse.php)**

### Domain



- **[Dto](src/Domain/Dto/Dto.php)**: main **Dto** contract (empty for now, used to define typings)
- **[Entity](src/Domain/Entity/Entity.php)**: main **Entity** contract (empty for now, used to define typings)
- **[DomainEventAwareInterface](src/Domain/Entity/DomainEventAwareInterface.php)**: Define how entities handle Events, and for `Event` type ([Trait](src/Domain/Entity/DomainEventAwareTrait.php) also available)
- **[Event](src/Domain/Event/Event.php)**: **Event** contract, force immutability, used by `CommandResponse`, `Entity` (EventAware) and `CommandBus`
- **[Exception](src/Domain/Exception/)**: Define a collection of Domain exceptions, all immutable
- **[Identity](src/Domain/Identity/Identity.php)**: Main contract for entity's **Identities** with exceptions, forced immutability and `Equality` interface
- **[ValueObject](src/Domain/ValueObject/ValueObject.php)**: force immutability on ValueObject, implements `toScalar` and `__toString` methods. See [psalm templating](https://psalm.dev/docs/annotating_code/templated_annotations/) documentation for more info.
- **[Equality](src/Domain/Equality.php)**: define `equal` method, required for Identity, but can be also use for entities and value objects.

### Infrastructure
- **[Exception](src/Infrastructure/Exception/)**: Define basics Infrastructure exceptions (with forced immutability)
- **[Clock](src/Infrastructure/System/Clock.php)**: Define clock contract to return the current time as a mockable service

### Presentation
- **[Exception](src/Presentation/Exception/)**: Define basics Presentation exceptions (with forced immutability)

## Resources

Please also read some Psalm documentation:
- [psalm template](https://psalm.dev/docs/annotating_code/templated_annotations/)
- [psalm immutable](https://psalm.dev/articles/immutability-and-beyond)

0 comments on commit d413fc3

Please sign in to comment.