php-llm/llm-chain
php-llm/llm-chain is a Laravel/PHP package for composing multi-step LLM workflows, chaining prompts and model calls into reusable pipelines with a fluent API. Build reliable AI features with structured, maintainable chains.
Architecture fit. php-llm/llm-chain is a framework-agnostic PHP LLM abstraction layer (providers, message contracts, memory), not a Laravel-first package. That is workable in a Laravel codebase — it binds through the container and is provider-agnostic — but it means we own the service-provider wiring, config publishing, and facade ergonomics that a native Laravel package would ship. The headline change in 0.25.0 is a governance and identity shift: "PHP LLM becomes Symfony AI" (PR #390, flagged breaking with chore!). Architecturally the code stays PHP, but the centre of gravity moves to the Symfony ecosystem. For a Laravel shop this is the single most important signal in the release: it raises the odds that first-class framework integration arrives as a Symfony bundle first, and that Laravel support is community-driven or absent.
Integration feasibility. Feasible in a spike, not yet in production. Three changes drive effort:
use statements, config files, and CI references need updating, and we cannot know the new package identifier from these notes alone.composer suggest (#385). Optional dependencies are no longer documented via Composer's suggest metadata; missing ones now surface as runtime exceptions. This is good hygiene but shifts failure from install-time to request-time — it makes a correct composer require set our responsibility rather than the tool's.AbstractUid&TimeBasedUidInterface (ULID / UUIDv7). Any custom message class or stored conversation referencing plain strings will need adjustment, and persisted IDs may need a column type review.Technical risk: medium-high. Pre-1.0 (0.x) semver means breaking changes are permitted on minor bumps, and this release confirms the project will exercise that. The rename introduces a genuine abandonment question for the old package name — we must confirm whether php-llm/llm-chain receives security fixes post-rename or is a dead end. Secondary risks: provider SDK drift behind a thin abstraction, and a small-maintainer project taking on a larger org's release cadence and support expectations without yet having them.
Key questions to resolve before committing.
php-llm/llm-chain 0.24.x receive security patches, and for how long?Stack fit. Works with Laravel via a thin adapter: a service provider binding the client/chain factory as a singleton, a config file for provider credentials, and a facade for ergonomics. Budget roughly one sprint of engineering for the adapter plus one for evaluation. The abstraction is the right shape (swap providers without rewriting call sites), which is the main reason to accept the framework friction.
Migration path. Do not chase 0.25.0 on main. Pin to 0.24.1 for any in-flight work, then run a timeboxed spike on the renamed package in a branch: install, rewire namespaces, exercise two providers plus the memory-injection path, and measure the diff. Decision gate: if the new namespace is stable and a Laravel path is credible, migrate; if not, hold at 0.24.1 and keep the abstraction behind our own interface so a swap to a native Laravel solution stays cheap.
Compatibility. Verify PHP version constraints against our runtime images, confirm every optional dependency our code paths touch is explicitly required (not merely suggested — that safety net is gone), and check that stored conversation/message IDs survive the UID typing change. If we persist message IDs, plan a nullable-column migration or a cast rather than a hard type change.
Sequencing.
LlmClient) so call sites never import vendor classes directly — this is the highest-value step and pays off regardless of the rename outcome.Maintenance. The org shift to Symfony AI is, on balance, positive for longevity — more maintainers, an established release process, and a broader contributor base. But it resets our dependency-risk clock: we will be tracking a package that is still pre-1.0 and mid-rebrand, so expect at least one more namespace-touching release before things settle. Assign explicit ownership (one engineer as the named maintainer of our adapter layer).
Support. Upstream support is community/GitHub-issue driven; there is no commercial SLA. Our internal support story must therefore be "we can swap providers within X days," which the interface wrapper makes true. Do not let product teams build provider-specific assumptions on top of this dependency.
Scaling. No new scaling concerns: this is an HTTP-calling abstraction, so throughput and latency are governed by the provider, not the package. The one scaling-adjacent risk is the new memory injection — every injected memory token is billed on every turn. Cap injected memories, cache aggressively, and instrument token spend per request before rollout.
Failure modes.
Ramp-up. Low-to-moderate: the API is small, but the team will need working familiarity with Symfony-style contracts and PSR service wiring to debug effectively. Budget a half-day knowledge transfer on the adapter layer, and document the provider onboarding checklist (credentials, required optional deps, smoke test) so adding or swapping a provider is a routine task rather than a research project.
How can I help you explore Laravel packages today?