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
Autowiring Bundle

Autowiring Bundle Laravel Package

kutny/autowiring-bundle

Symfony bundle that adds autowiring support for service definitions and controller arguments. It resolves dependencies by type-hint, reducing manual configuration and boilerplate in Symfony apps, especially useful when native autowiring is unavailable or you need extra container conveniences.

View on GitHub
Deep Wiki
Context7

kutny/autowiring-bundle is a Symfony bundle that brings automatic dependency injection to your services. Instead of declaring every constructor argument by hand in YAML or XML configuration, the bundle inspects your service constructors and wires their dependencies automatically, cutting boilerplate and keeping service definitions lean.

It integrates with the Symfony container so that autowiring applies consistently across your application, letting you focus on writing services rather than configuring them.

  • Automatic constructor injection for registered services
  • Works alongside existing Symfony service definitions
  • Eliminates repetitive YAML/XML wiring
  • Simple bundle registration, no extra setup
  • Keeps your container configuration readable as the app grows
Frequently asked questions about Autowiring Bundle
What is kutny/autowiring-bundle used for?
It is a Symfony bundle that adds reflection-based autowiring to the Symfony2 Dependency Injection container. It integrates kutny/autowiring through compiler passes so services, controllers, and commands can receive typed constructor dependencies without verbose service definitions. It targets Symfony applications, not Laravel.
Is kutny/autowiring-bundle compatible with Laravel?
No. The package depends on Symfony's Bundle and DependencyInjection components and hooks into compiler passes, which Laravel does not use. Illuminate\Container is a separate PSR-11 implementation with its own reflection-based resolution. A composer require in a standard Laravel app will fail on platform constraints before any code-level incompatibility appears.
How do I install kutny/autowiring-bundle in a Laravel project?
You should not install it in a Laravel project. There is no Laravel service provider, no extra.laravel manifest, and no PSR-11 interoperability, so Laravel's package discovery cannot register it. If you are investigating a transitive dependency, the correct action is removal or replacing the parent package, not installation.
Does Laravel already support autowiring for controllers and commands?
Yes. Laravel has automatically resolved typed constructor dependencies since 5.x, including controllers, commands, jobs, and other container-resolved classes. You only need to bind interfaces or abstract classes in a service provider when the concrete implementation is not inferable. Contextual binding handles cases where different consumers need different implementations.
Which PHP and Laravel versions does kutny/autowiring-bundle support?
It supports neither modern Laravel nor modern PHP. The last release was 2016-02-10 with PHP 5.x/7.0-era constraints, so it will not satisfy a Laravel 10 or 11 platform requirement without a fork. It also predates PSR-11, which was ratified in 2018.
How should I test dependency injection in Laravel without kutny/autowiring-bundle?
Use Laravel's container and test doubles directly: bind interfaces in a service provider and swap implementations with the container's instance method or mocks in feature tests. Because Laravel resolves typed constructor dependencies natively, you can resolve classes without a custom autowiring bundle. Testing container behavior is unnecessary unless you have custom bindings or contextual resolution.
How does kutny/autowiring-bundle compare with Laravel's service container?
The bundle adds autowiring to Symfony's container via compiler passes, while Laravel's container resolves typed dependencies natively at runtime. Laravel also provides service providers, contextual binding, and interface binding for explicit wiring. For Laravel, the built-in container covers the bundle's core use case without extra dependencies.
Is kutny/autowiring-bundle maintained and safe for production?
No. Upstream is archived, the last release was in 2016, and there is no security response path, CVE monitoring, or patch release process. It has about 12 stars and zero dependents, so there is no community maintenance to inherit. Abandoned packages also carry supply-chain risk from name-squatting and unmaintained forks.
What are the best alternatives to kutny/autowiring-bundle for Laravel?
For Laravel, use the framework's built-in container with typed constructor injection, service provider bindings, and contextual binding. If you need explicit wiring for varied implementations, bind interfaces in a service provider rather than adding a third-party autowiring layer. For framework-agnostic PHP, PHP-DI is maintained and PSR-11 compliant.
What should I do if kutny/autowiring-bundle appears in my composer.lock?
Treat it as a removal task. Identify the parent package that requires it, pin or replace that parent, and remove the abandoned dependency. Then record the decision in an ADR so the same request does not recur. Confirm the underlying need in a short conversation, since Laravel's container likely already solves it.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle