jev-symfony-bundle
Unofficial Symfony bundle with a typed Jev client, Noul and Choice validator constraints, Workflow guards and a profiler panel.
Overview
Jev Symfony Bundle integrates TypeSafe's Jev into Symfony applications. It provides a typed client built on Symfony HttpClient with named clients, retries matching the official SDKs, strict response decoding and an exception hierarchy. On top of that it adds #[JevNoul] and #[JevChoice] validator constraints (for example, reject comments that are probably spam), background evaluation via Messenger with a DecisionMadeEvent, Workflow guards that allow or block transitions based on Jev's answer, and a web profiler panel listing every call's questions, answers, probabilities, tokens, retries and timing.
It targets PHP 8.4+ developers on Symfony 7.4 or 8.x. Console commands jev:models and jev:ask, PSR-3 logging and a metrics hook for Prometheus or OpenTelemetry are included, and a JevClientFake lets application tests run without HTTP calls. A Flex recipe sets up configuration and environment variables. It is unofficial and not endorsed by TypeSafe.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Yes / no | Is this comment probably spam? (validator constraint example) | — |
| Choice | Application-defined Choice used in validation or workflow guards(inferred) | — |
How it works
- Install via Composer; Flex adds config and env variables
- Annotate entities with #[JevNoul] or #[JevChoice], or configure Workflow guards
- Validator or guard calls Jev and compares probability with a threshold
- Profiler, logs and metrics record each call
Strengths
- Idiomatic Symfony integration points (Validator, Messenger, Workflow)
- Profiler panel for debugging every decision
- Fake client for tests with no HTTP
- CI per the README badge
Caveats
- Unofficial, not endorsed by TypeSafe
- Requires PHP 8.4+ and recent Symfony
Getting started
composer require vbcherepanov/jev-symfony-bundle, then `php bin/console secrets:set TYPESAFE_API_KEY`.At a glance
- Type
- Library
- Status
- beta
- Language
- PHP
- Runtime
- Symfony
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
PHP / Symfony: Symfony bundle providing typed Jev clients, validation constraints (`#[JevNoul]`, `#[JevChoice]`), Workflow guards, and WebProfiler panels.
yibie/awesome-jev
Frequently asked questions
What can I do with the validator constraints?
Reject or flag form data based on a Jev yes/no or choice answer, such as probable spam comments.
Can I test without calling the API?
Yes, JevClientFake makes no HTTP calls.
Which versions are supported?
PHP 8.4+ with Symfony 7.4 or 8.x.
Related projects
Community Java 17 SDK for Jev with typed Ask declarations, enum-backed choices and a Spring Boot starter.
LibrarybetaJavaAx, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.
PluginproductionTypeScriptEffect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.
ProjectproductionTypeScriptPHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.
ProjectproductionPHPElixir library for unified LLM calls across providers, with an evaluate interface that calls Jev via TypeSafe or OpenRouter.
ProjectproductionElixirSelf-hosted multi-tenant AI agent platform listed as including optional TypeSafe client tools for classification, scoring and yes/no.
LibraryproductionPython