lombokclarion / facades
Optional static-accessor facades for LombokClarion. Explicitly isolated from core and domain layer (§2.6, §4.12). MUST NOT leak into app/Domain/**.
v2.1.0
2026-08-08 17:25 UTC
Requires
- php: >=8.3
- lombokclarion/bus: *
- lombokclarion/container: *
- lombokclarion/security: *
This package is auto-updated.
Last update: 2026-08-09 13:12:17 UTC
README
Opt-in static-access pattern: Facade base + Bus/Event/Hash. Forbidden from app/Domain/.
[READ-ONLY] This is a subtree split of the LombokClarion monorepo.
Do not send pull requests here — contribute to the main repository instead.
Install
composer require lombokclarion/facades
Namespace
LombokClarion\Facades
What's Inside
| Class | Role |
|---|---|
Facade |
Base class with __callStatic, requires explicit setContainer() |
Bus |
Bus::dispatch($command) → CommandBus |
Event |
Event::dispatch($event) → EventBus |
Hash |
Hash::make($password), Hash::check($password, $hash) → PasswordHasher |
Usage
use LombokClarion\Facades\Facade; use LombokClarion\Facades\Bus; use LombokClarion\Facades\Hash; // Explicit opt-in (in bootstrap) Facade::setContainer($container); // Then in app code: Bus::dispatch(new CreateWidget('Gadget')); $hash = Hash::make('password'); $valid = Hash::check('password', $hash);
Note: This package carries
forbidden-layers: ["app/Domain"]. The domain boundary checker blocks imports ofLombokClarion\Facades\*from domain code. Facades are for infrastructure/controller code only.
License
Apache-2.0 — see LICENSE in the main repository.