sonofwinter/binding-bundle
A small Laravel/PHP package for organizing and registering service container bindings as reusable bundles. It helps keep dependency injection setup tidy by grouping related bindings and simplifying provider registration.
Before anything else: this is a Symfony bundle, not a Laravel package. composer require sonofwinter/binding-bundle will pull it into a Laravel app, but there is no service provider, no facade, and no auto-discovery — Laravel will never boot it. Treat this assessment as "what does it do, and what would I use instead in Laravel."
First steps if you are actually in a Symfony project:
composer require sonofwinter/binding-bundleSonOfWinter\BindingBundle\BindingBundle in config/bundles.php.DependencyInjection/ extension and Resources/config/services.yaml first — that is where the binder service id and any tagged services are declared.First realistic use case: a controller receives a validated associative array (from a form or JSON payload) and you want it hydrated onto a Doctrine entity without hand-writing setters. In Laravel the direct equivalent is $model->fill($request->validated()) guarded by $fillable, or a DTO hydrator such as spatie/laravel-data.
Symfony-side pattern (where the package is intended to work):
EntityManager::persist()/flush().PropertyAccessor + Serializer when you only care about scalar/property mapping and want to avoid serializer metadata overhead.symfony/validator constraints on the entity so validation runs after binding, not before.Laravel-side patterns (what you would actually ship):
Model::create($request->validated()) with strict $fillable (or $guarded = [] only on models you fully trust). This is the closest day-to-day analog.spatie/laravel-data or a small custom hydrator (new UserData(...$validated)) when you need typed properties and nested objects — this is functionally what the bundle is doing in Symfony.$model->fill($validated)->save() inside a DB::transaction() when the array touches related records.Cross-framework interop (only if you genuinely need this bundle's behavior in a Laravel shop): expose the Symfony service over HTTP and call it with Http::post(...). Do not attempt to shim Symfony's DI container into Laravel's — it is not worth it for a 3-star, zero-dependent package.
SonOfWinter/BindingBundle; the package is sonofwinter/binding-bundle. Confirm the composer.json name field before requiring — casing/namespace mismatches are common in low-traffic bundles and will fail autoload silently.fill(). Always pass $request->validated(), never $request->all().bin/console debug:container | grep -i bind — bundles that fail to register their extension usually silently drop services. Check var/log/dev.log for ServiceNotFoundException rather than assuming a binding bug.binding.binder or a compiler pass in DependencyInjection/Compiler/. Custom binders are typically registered via tag; without docs you will need to read the compiler pass source.fill() + $fillable, or spatie/laravel-data for typed DTOs. The concepts port cleanly; the code does not.composer.json — an untagged bundle can change behavior on composer update.How can I help you explore Laravel packages today?