gacela-project / gacela
Gacela helps you separate your project into modules
Fund package maintenance!
Requires
- php: >=8.3
- gacela-project/container: ^2.3
- psr/event-dispatcher: ^1.0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- ergebnis/composer-normalize: ^2.50
- friendsofphp/php-cs-fixer: ^3.95
- illuminate/config: ^11.28 || ^12.0
- illuminate/console: ^11.28 || ^12.0
- illuminate/container: ^11.28 || ^12.0
- illuminate/contracts: ^11.28 || ^12.0
- illuminate/events: ^11.28 || ^12.0
- illuminate/support: ^11.28 || ^12.0
- 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/config: ^7.0 || ^8.0
- symfony/console: ^7.0 || ^8.0
- symfony/dependency-injection: ^7.0 || ^8.0
- symfony/http-kernel: ^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
- illuminate/support: Allows to register Gacela\LaravelBridge\GacelaServiceProvider in a Laravel application
- phpunit/phpunit: Allows to extend Gacela\Framework\Testing\GacelaTestCase in your tests
- symfony/console: Allows to use vendor/bin/gacela script
- symfony/http-kernel: Allows to register Gacela\SymfonyBridge\GacelaBundle in a Symfony application
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.8.0
- 2.7.1
- 2.7.0
- 2.6.2
- 2.6.1
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.4
- 1.14.3
- 1.14.2
- 1.14.1
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.1
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.32.0
- 0.31.0
- 0.30.1
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.1
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.1
- 0.18.0
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-fix/1044-docs-call-half-facade-by-name
- dev-docs/1040-merged-config-cache-filename
- dev-fix/1028-docs-gacela-php-is-optional
- dev-fix/1019-document-gacela-get-memo
- dev-fix/1082-psalm-diagnostics-by-file
- dev-fix/1073-worktree-formatter-cache-exclusions
- dev-fix/1078-benchmark-exception-diagnostics
- dev-fix/1020-global-namespace-pillars
- dev-fix/1050-method-tags-at-line-start
- dev-fix/1102-doctor-literal-stub-directories
- dev-fix/1039-escape-config-source-stamp-paths
- dev-fix/1038-cache-expiry-ttl-overflow
- dev-fix/1066-config-preserves-filesystem-roots
- dev-fix/1037-env-rejects-trailing-newline
- dev-fix/1027-cache-warm-honours-cache-switch
- dev-fix/1047-psalm-rejects-unknown-config
- dev-fix/1036-future-mtime-is-not-racy
- dev-fix/1046-anonymous-class-references
- dev-fix/1045-cross-module-named-references
- dev-fix/1048-service-map-class-constant
- dev-fix/1035-merged-config-nested-closures
- dev-fix/1021-alias-chains-and-loops
- dev-fix/1049-cacheable-rules-resolve-attribute-name
- dev-fix/1043-first-class-cached-callable
- dev-fix/1030-cached-from-a-closure
- dev-fix/1034-escape-literal-paths-before-glob
- dev-fix/1014-health-report-without-server-paths
- dev-fix/1013-health-check-failure-isolation
- dev-fix/1018-provides-accepts-container-interface
- dev-fix/1008-make-fallback-psr4-prefix
- dev-fix/1012-dto-schema-refuses-reserved-names
- dev-fix/1011-handler-registry-names-missing-class
- dev-fix/1007-make-module-accepts-a-leading-backslash
- dev-fix/1006-agents-install-long-marker-blocks
- dev-fix/1001-plugin-function-name
- dev-fix/1005-bin-gacela-honours-composer-autoload-path
- dev-fix/1067-atomic-writes-preserve-file-symlinks
- dev-fix/1000-cache-dir-equal-to-app-root
- dev-fix/1017-facade-subclass-resolves-parent-factory
- dev-fix/1041-normalise-module-boundary-namespaces
- dev-fix/1042-guard-autoload-in-analysers
- dev-fix/1032-cache-commands-report-file-failures
- dev-fix/1026-discovery-survives-unloadable-files
- dev-fix/1031-environment-layer-dotted-suffix
- dev-fix/1015-servicemap-resolves-the-named-pillar
- dev-fix/1024-psr4-list-of-directories-uses-first
- dev-fix/1025-ide-meta-reports-single-file-meta
- dev-fix/1016-declared-kind-suffix-keeps-custom-service-keys
- dev-fix/1023-json-output-free-of-module-path-warning
- dev-fix/1009-bootstrap-started-event-after-gacela-php
- dev-fix/1033-scoped-cache-corrupt-graph-is-a-miss
- dev-fix/1010-corrupt-membership-cache
- dev-fix/1004-vendor-skip-by-segment-not-substring
- dev-fix/997-cache-dir-from-gacela-php-before-discovery
- dev-fix/1003-psr0-dto-paths
- dev-fix/1029-private-default-cache-directory
- dev-ref/cache-guard-benchmark-transition
This package is auto-updated.
Last update: 2026-10-30 21:49:46 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/
└── Blog/
├── BlogFacade.php
├── BlogFactory.php
├── BlogProvider.php
└── BlogConfig.php
That is what make:module App/Blog below writes. Pass --short-name for Facade.php instead of BlogFacade.php — both resolve; the prefix is the default because it survives being read out of context.
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:* - Laravel provider — bootstrap Gacela when the app boots, reach Laravel services,
artisan 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.