Support for "modules", similar to zend expressive?

Hi @raffster

I use a very similar aproach like Nikola Poša has written down in his blog post.

  • The project root directories complies with the php-pds/skeleton.
  • I put my “modules”, the core of my application, into the src/Domain directory.
  • Then I structure the src/Domain sub-directories by “module”. e.g. src/Domain/Customer
  • Per module I create sub-directories per “type”. For example I put all repositories of the “Customer” module into a specific repository directory. For example: src/Domain/Customer/Repository/CustomerListRepository.php.
  • For the business logic (validation, calculation, file creation, etc…) I create specific “Service” classes for each use case. A service class should have only one public method.

More details about how to structure the src/Domain sub-directories: https://blog.juliobiason.net/thoughts/things-i-learnt-the-hard-way/#organize-projects-by-data-type-not-functionality

Example: https://github.com/odan/slim4-skeleton/tree/master/src/Domain/User