gacela-project / gacela
Gacela helps you separate your project into modules
Fund package maintenance!
2.1.0
2026-08-09 07:22 UTC
Requires
- php: >=8.3
- gacela-project/container: ^2.0.2
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- ergebnis/composer-normalize: ^2.50
- friendsofphp/php-cs-fixer: ^3.95
- infection/infection: ^0.34
- nikic/php-parser: ^5.4
- phpbench/phpbench: ^1.4
- phpmetrics/phpmetrics: ^2.9
- phpstan/phpstan: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^12.5
- psalm/plugin-phpunit: ^0.19.7
- symfony/console: ^7.0 || ^8.0
- symfony/dependency-injection: ^7.0 || ^8.0
- symfony/var-dumper: ^7.0 || ^8.0
- vimeo/psalm: ^6.16
Suggests
- gacela-project/gacela-env-config-reader: Allows to read .env config files
- gacela-project/gacela-yaml-config-reader: Allows to read yml/yaml config files
- phpunit/phpunit: Allows to extend Gacela\Framework\Testing\GacelaTestCase in your tests
- symfony/console: Allows to use vendor/bin/gacela script
This package is auto-updated.
Last update: 2026-08-09 20:11:28 UTC
README
Gacela — build modular PHP applications
Gacela normalizes module boundaries so parts of your application communicate through a single entry point, without leaking internals.
Each module is built from four pillars — only the first two are required:
- Facade — public API, the only way in
- Factory — creates internal services
- Provider — wires external dependencies (optional)
- Config — reads project config (optional)
Installation
composer require gacela-project/gacela
Requires PHP 8.3+. Coming from 1.x? See UPGRADE.md.
Module structure
app/
├── gacela.php
├── config/
└── src/
└── ModuleA/
├── Facade.php
├── Factory.php
├── Provider.php
└── Config.php
CLI
vendor/bin/gacela init # scaffold gacela.php vendor/bin/gacela make:module App/Blog # scaffold a module vendor/bin/gacela # every command
Modules can be inspected, validated and prepared for production — see CLI commands.
Documentation
Start with getting started, then
getting a dependency — the one that answers "how do I
reach that from here". docs/ is the full index; the rest:
- Upgrading from 1.x
- CLI commands
- Container configuration — bindings, contextual bindings, attributes, hooks
- Caching and cacheable methods
- Static analysis (PHPStan / Psalm)
- Module health checks
- Events
- Testing
- Opcache preload and production performance
- Full reference: gacela-project.com
- Symfony bundle — bootstrap Gacela from the kernel, reach Symfony services,
bin/console gacela:* - Examples:
- gacela-example
- symfony-gacela-example — Gacela with Symfony 7.4
- laravel-gacela-example — Gacela with Laravel 12
Contributing
Report issues, share ideas, or open a pull request.
Inspired by Spryker.