sirix/project-template

Sirix Template for Microservices

This package is auto-updated.

Last update: 2025-03-11 20:03:32 UTC


README

Example service that should be used as a starting point for new projects.

This template uses PHP (≥ 8.4) and integrates several libraries and frameworks out of the box.

The example is built on a modular architecture and consists of the following modules:

  • ApiGateway
  • Common
  • ExampleModule

The modules apply the principle of clean architecture, they are divided into layers:

  • Api
  • App
  • Domain
  • Infra

How to create new project based on this template

  1. Create a new project based on this template:
composer create-project sirix/project-template my-new-project-name --ignore-platform-reqs

Commands

  • To show all available commands:
./vendor/bin/laminas
  • Work with database:
./vendor/bin/laminas cycle:migrator:run
./vendor/bin/laminas cycle:migrator:rollback
./vendor/bin/laminas cycle:migrator:generate PascalCaseMigrationName
./vendor/bin/laminas cycle:cache:clear
  • Check code style, static analysis, and run tests:
composer check
  • Check code style:
composer cs-check
  • Fix code style:
composer cs-fix
  • Run static analysis:
composer rector
composer phpstan
composer deptrac-layers
command deptrac-modules
  • Run tests:
composer test