docile-php / docile
A clean, DDD-first PHP framework skeleton
v1.0.5
2026-06-13 22:58 UTC
Requires
- php: ^8.3
- docile/bus: ^1.0
- docile/cache: ^1.0
- docile/config: ^1.0
- docile/console: ^1.0
- docile/container: ^1.0
- docile/doctrine: ^1.0
- docile/events: ^1.0
- docile/foundation: ^1.0.1
- docile/http: ^1.0
- docile/routing: ^1.0.1
- docile/security: ^1.0
- docile/support: ^1.0
- docile/testing: ^1.0
- docile/validation: ^1.0
- doctrine/dbal: ^4.0
- doctrine/orm: ^3.0
- nyholm/psr7-server: ^1.0
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.0
README
A clean, DDD-first PHP framework.
Requirements
- PHP 8.3 or higher
- Composer 2
Installation
Create a new project using Composer:
composer create-project docile-php/docile myapp
cd myapp
cp .env.example .env
Starting the Development Server
Docile ships with a built-in deliver command that wraps PHP's built-in web server:
php bin/docile deliver
Custom host and port:
php bin/docile deliver --host=0.0.0.0 --port=8080
Or via the Composer script shorthand:
composer deliver
The server starts at http://localhost:8000 by default. Press Ctrl+C to stop.
Running Tests
composer test
Static Analysis
composer analyse
Directory Structure
app/
├── Console/Commands/ # Console commands
├── Exceptions/Handler.php # Exception handler
├── Http/
│ ├── Controllers/ # HTTP controllers
│ ├── Kernel.php # HTTP kernel
│ └── Middleware/ # HTTP middleware
└── Providers/
└── AppServiceProvider.php
bin/
└── docile # CLI entry point
bootstrap/
└── app.php # Application bootstrap
config/
├── app.php
├── cache.php
└── database.php
public/
└── index.php # HTTP entry point
routes/
├── api.php
└── web.php
storage/
├── cache/
└── logs/
tests/
└── Feature/
└── ExampleTest.php
Packages
| Package | Description |
|---|---|
docile/foundation |
Application, ServiceProvider, ExceptionHandler |
docile/container |
PSR-11 dependency injection container |
docile/config |
Typed configuration repository |
docile/http |
PSR-7/15 HTTP kernel and response factories |
docile/routing |
Attribute-based and fluent router |
docile/console |
Console kernel, Command, Input, Output |
docile/events |
PSR-14 event dispatcher |
docile/bus |
CommandBus and QueryBus |
docile/validation |
Attribute-based validator |
docile/support |
Str, Arr, Collection, Pipeline, Env, Clock, Optional |
License
The Docile framework skeleton is open-sourced software licensed under the MIT license.