ez-php / contracts
Shared interfaces and abstract base classes for the ez-php framework — zero framework coupling for standalone modules
2.5.8
2026-10-16 15:43 UTC
Requires
- php: ^8.5
- ext-pdo: *
- ez-php/http: ^2.0
Requires (Dev)
- ez-php/docker: ^2.0
- ez-php/testing-application: ^2.0
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^13.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- 2.5.8
- 2.5.7
- 2.5.6
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.11
- 2.4.10
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.14.0
- 1.13.1
- 1.13.0
- 1.12.2
- 1.12.1
- 1.12.0
- 1.11.2
- 1.11.1
- 1.11.0
- 1.10.0
- 1.9.2
- 1.9.1
- 1.9.0
- 1.8.0
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.6
- 0.8.5
- 0.8.4
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.2
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
This package is auto-updated.
Last update: 2026-10-16 17:37:02 UTC
README
Shared interfaces and abstract base classes for the ez-php framework.
Installation
composer require ez-php/contracts
You rarely need to require it directly: ez-php/framework and every module that implements
or consumes these contracts already depend on it. Require it explicitly when writing your own
package against the contracts without pulling in the framework.
Contracts
| Contract | Type | Purpose |
|---|---|---|
ContainerInterface |
Interface | Dependency injection: bind(), make(), has(), instance() |
ServiceProvider |
Abstract class | Two-phase lifecycle: register() and boot() |
ConfigInterface |
Interface | Configuration access via dot-notation keys |
DatabaseInterface |
Interface | Database queries, transactions, PDO access |
ExceptionHandlerInterface |
Interface | Convert exceptions to HTTP responses |
MiddlewareInterface |
Interface | HTTP middleware pipeline contract |
ParameterizedMiddlewareInterface |
Interface | Middleware taking per-registration string parameters ('can:update,App\Post') |
CommandRegistryInterface |
Interface | Console command registration: registerCommand(), getCommands() |
TaggedContainerInterface |
Interface | Service tagging: tag(), tagged() — implemented by the framework Container |
TranslatorInterface |
Interface | Translate keys with placeholder replacements |
JobInterface |
Interface | Queue job contract: handle(), fail(), attempt/retry accessors |
QueueInterface |
Interface | Queue driver contract: push(), pop(), size(), failed() |
RepositoryInterface |
Interface | Generic repository: find(), save(), delete() |
Schema\SchemaInterface |
Interface | Schema builder contract: create(), table(), drop(), dropIfExists(), hasTable(), hasColumn(), rename() |
EzPhpException |
Class | Base exception for framework and modules |
SecondFactorResult |
Enum | Shared Satisfied/NotSatisfied/NotConfigured outcome for second-factor verifier modules (e.g. ez-php/two-factor, ez-php/webauthn) |