teknoo/east-foundation
teknoo/east-foundation provides core PHP building blocks for the East framework, including dependency injection, service configuration, and reusable foundation components to bootstrap modular applications.
Architecture fit. teknoo/east-foundation is a framework-agnostic "foundation" layer rather than a full-stack framework. Its value proposition is (a) the #east object convention — every public method returns $this or a new instance — and (b) a set of PSR-aligned HTTP primitives: PSR-7 messages, PSR-11 containers, PSR-15 middleware, plus typed streaming abstractions (ChunkGeneratorInterface, SseGeneratorInterface, CallbackStreamFactoryInterface). The streaming and SSE pieces are the most concrete, differentiated capability; the philosophy layer is a stylistic constraint with real ergonomic trade-offs (it effectively forbids void returns, which collides with event dispatch, loggers, and conventional command-query separation). The underlying "recipe/state" orchestration (Teknoo/Recipe, Teknoo/States) is a bespoke control-flow model that a team must learn before it can read the code, which is a nontrivial architecture-fit cost for most Laravel/Symfony shops.
Integration feasibility. Composer-installed, PHP 8.1+, PSR-2/12, PHPStan-verified, 90% PHPUnit coverage with Behat on top — the engineering hygiene signals are stronger than the 4-star/0-dependent adoption signals suggest. For Laravel specifically, integration is possible but indirect: Laravel is a PSR-11 container, so the package can be bootstrapped, but PSR-7/PSR-15 semantics must be bridged to Laravel's HTTP kernel and its Response/streamed response model. There is no Laravel service provider, no published Laravel integration path, and no evidence of community usage. Symfony 6.0+ has first-party support via Teknoo\East\FoundationBundle and HttpFoundationFactory, which converts chunk/SSE streams into a Symfony StreamedResponse.
Technical risk.
Teknoo/Immutable, Teknoo/States, Teknoo/Recipe) that all share the same risk profile.Key questions.
StreamedResponse (or Laravel's response()->stream()) does not, for the specific endpoints we care about?src/Http/Message/* and the stream factory, leaving the #east philosophy confined to that boundary?Stack fit. Best fit is a Symfony 6+ application using the provided bundle. Laravel is feasible but second-class: expect to write the container binding, the PSR-7↔Illuminate request/response bridge, and a streamed-response adapter ourselves. The package is not a fit for the core domain model of any application — it is a transport/orchestration utility.
Migration path. Treat this as a bounded, reversible adoption, not a platform decision:
CallbackStreamFactoryInterface and HttpFoundationFactory.StreamedResponse / Laravel stream()) on LOC, memory behavior under load, and client-disconnect handling.Compatibility. PSR-7/11/15/20 alignment means it will not fight our existing HTTP abstractions. PHP 8.1+ is likely already satisfied. Verify the PSR-7 implementation we already use (Guzzle, Laminas, Nyholm) against the infrastructures/laminas/ reference and check for duplicate-interface conflicts with any other PSR-7 package in the tree.
Sequencing.
Maintenance. This is the dominant cost driver. Adopting the package means adopting a philosophy, three sibling libraries, and a bespoke orchestration model, all with a single-digit-star ecosystem. Budget for internal ownership: someone must be able to read and patch the recipe/state internals, because upstream support is best-effort at best. If we fork, the 90% coverage / PHPStan gate becomes our burden on every patch — a real, recurring tax.
Support. No commercial support, no SLA, no published LTS policy. Incident response for a streaming bug becomes "read the source and patch it" — acceptable for a non-critical feature, unacceptable for anything on the revenue path. Escalation must be internal.
Scaling. The streaming design is reasonable on paper: per-chunk write-and-flush, connection-close detection, generator-driven memory profile (constant rather than buffered). Real scaling behavior depends entirely on the runtime — callback-based flush assumes a long-lived, non-buffering execution context, which holds for php-fpm per-request but needs explicit verification under Laravel Octane, RoadRunner, or Swoole where worker reuse and output buffering change the rules. SSE through corporate proxies and load balancers is a recurring operational surprise; plan for buffering and timeout tuning.
Failure modes.
acceptResponse() as documented, or clients will observe a hung connection.$this-everywhere spreads into application code, it is expensive to unwind.Ramp-up. Non-trivial and underestimated. A new engineer must absorb: the #east return convention, the recipe/state orchestration, PSR-15 middleware layering, and the stream/SSE callback lifecycle — four unfamiliar concepts before writing a line of business logic. Estimate days-to-weeks, not hours, and expect review friction. If the team already works in Symfony with PSR habits, the curve is shallower; for a Laravel team, add the bridge layer on top.
Recommendation. Constrained pilot only, gated on the streaming use case being real and the exit plan being cheap. Do not adopt the #east philosophy as a house convention, do not let it near the core domain, and do not invest further without a named internal owner and evidence from Phase 1.
How can I help you explore Laravel packages today?