Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Sapient Bundle

Sapient Bundle Laravel Package

lepiaf/sapient-bundle

A Symfony bundle that integrates Sapient, the PHP library for fast, flexible object hydration and serialization. Register and configure Sapient services, map data to typed objects, and keep your Symfony apps clean with minimal boilerplate.

View on GitHub
Deep Wiki
Context7

Symfony bundle that wrap sapient library

Frequently asked questions about Sapient Bundle
What is lepiaf/sapient-bundle used for?
lepiaf/sapient-bundle is a Symfony bundle that wraps the Sapient PHP library for object hydration and serialization. It ships a Symfony Bundle subclass, a dependency-injection extension, and a configuration tree. It is not a Laravel package and has no Laravel service provider.
Can I install lepiaf/sapient-bundle in Laravel?
No. Laravel has no registerable-bundle concept, so the Symfony bundle layer cannot be installed or booted in a Laravel application. Only the underlying lepiaf/sapient library could be consumed as a plain Composer dependency. That path is still not recommended because the repository is archived and the capability overlaps with Laravel's request handling.
Does lepiaf/sapient-bundle support Laravel 10 or Laravel 11?
There is no evidence of Laravel 10 or Laravel 11 support. The package targets Symfony kernel registration, not Laravel's service-provider lifecycle, and the repository is archived with no compatibility guarantees. Treat any Laravel version claim as unsupported unless you fork and maintain it yourself.
How do I configure lepiaf/sapient-bundle in Laravel?
You cannot configure it natively in Laravel because its Symfony configuration tree is never loaded. Registering the bundle is a Symfony operation, and Laravel would need a custom service provider plus a port of the underlying behavior. That is effectively a reimplementation, not package configuration.
Is lepiaf/sapient-bundle maintained and safe for production?
No. The repository is archived, has 11 stars and zero dependents, and has no upstream fix or security-response path. Production use would mean forking and owning the code, including CVE response and PHP/Symfony compatibility work. That is a high maintenance burden for a thin abstraction.
What Laravel features replace Sapient's superglobal abstraction?
Laravel already injects a hydrated Illuminate\Http\Request and exposes typed InputBag and ParameterBag accessors. Middleware and validation handle request parsing consistently, including under Octane. Sapient's superglobal abstraction creates a parallel framework-unaware data path that can diverge on encoding, nested arrays, and JSON bodies.
Can I use the lepiaf/sapient library without the Symfony bundle in Laravel?
Technically yes, you could require lepiaf/sapient as a plain library and ignore the Symfony bundle. In practice the bundle in the package name becomes dead weight, and the library is archived and redundant with Laravel request primitives. If the behavior is truly required, port the small accessor into an internal interface bound by a Laravel service provider.
Will lepiaf/sapient-bundle conflict with Laravel's Symfony dependencies?
Likely yes, because an archived bundle will have stale symfony/http-foundation and symfony/console constraints that can conflict with Laravel's transitive Symfony pins. There are no compatibility guarantees for current PHP or Symfony LTS releases. Test in an isolated Composer project before assuming resolution, but the safer choice is not to adopt.
How should I test a Sapient-style hydration layer in Laravel?
Test the behavior you actually need through Laravel's HTTP kernel and request injection, not through superglobals. Write feature tests that post JSON, form data, and nested arrays, then assert the hydrated DTO or typed object matches Laravel's parsed request. If you port Sapient, bind it behind an interface so tests can fake it and Octane behavior stays explicit.
What are the best alternatives to lepiaf/sapient-bundle for Laravel?
For Laravel, use native request injection, InputBag, form requests, validation, and middleware first. If you need object hydration, prefer a maintained Laravel-native hydrator or serializer, or write a small internal adapter bound in a service provider. There is no strong reason to adopt an archived Symfony bundle for a Laravel estate.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console