sirix / project-template
Sirix Template for Microservices
0.0.1
2025-03-11 20:01 UTC
Requires
- php: ~8.4.0
- cakephp/chronos: ^3.1
- composer/package-versions-deprecated: ^1.10.99
- enqueue/amqp-lib: ^0.10.19
- enqueue/rdkafka: ^0.10.20
- guzzlehttp/guzzle: ^7.9
- laminas/laminas-cli: ^1.11
- laminas/laminas-component-installer: ^3.5
- laminas/laminas-config-aggregator: ^1.17
- laminas/laminas-diactoros: ^3.5.0
- laminas/laminas-servicemanager: ^3.23
- laminas/laminas-stdlib: ^3.20
- mezzio/mezzio: ^3.20
- mezzio/mezzio-helpers: ^5.17
- mezzio/mezzio-laminasrouter: ^3.10
- sirix/cycle-orm-factory: ^2.0
- sirix/money: ^1.0
- sirix/monolog: ^1.0
- sirix/sirix-config: ^1.0
- symfony/cache: ^7.2
- vjik/cycle-typecast: ^2.2
- yiisoft/validator: ^2.1
Requires (Dev)
- ergebnis/composer-normalize: ^2.45
- filp/whoops: ^2.16
- laminas/laminas-development-mode: ^3.13.0
- mezzio/mezzio-tooling: 2.10.x-dev
- phpunit/phpunit: ^11.5
- qossmic/deptrac: ^2.0
- roave/security-advisories: dev-master
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
- 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