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
Symfony Service Definition Validator

Symfony Service Definition Validator Laravel Package

matthiasnoback/symfony-service-definition-validator

Validates Symfony service definitions at build time, catching misconfigured services, arguments, and references before they cause runtime errors. Useful in CI to keep your container configuration correct as the application grows, so broken service wiring fails fast instead of at deploy time.

View on GitHub
Deep Wiki
Context7

Library for validating service definitions created with the Symfony Dependency Injection Component

Frequently asked questions about Symfony Service Definition Validator
Does matthiasnoback/symfony-service-definition-validator work with Laravel?
It validates Symfony dependency injection service definitions, not Laravel service providers or the Illuminate container. It only helps if your Laravel application deliberately contains Symfony-style YAML, XML, or PHP service definitions, such as during a Symfony-to-Laravel migration or in a shared platform using Symfony DI. For a standard Laravel-first codebase, it adds little value and should not be a default dependency.
How do I install it in a Laravel project?
Install it as a development dependency with Composer, for example composer require --dev matthiasnoback/symfony-service-definition-validator, and pin the version you test. Keep it out of production artifacts because it is a CI and local validation utility, not runtime infrastructure. Verify Composer constraints against your Laravel version's Symfony components before committing.
Which Laravel and PHP versions are supported?
The package's last release was February 2022, so its Symfony and PHP constraints may be stale relative to Laravel 10 or 11 and current Symfony 6 or 7 components. There is no documented guarantee of Laravel compatibility, so test in an isolated branch on your oldest and newest supported PHP and Laravel combinations. Expect possible Composer conflicts and plan to pin or replace it.
How do I integrate it into a CI pipeline?
Run it as a Symfony console command in a targeted CI job rather than every pipeline stage. Start with a non-blocking validation step scoped to the Symfony service definition files you actually maintain, then compare results with container smoke tests. Promote it to a blocking gate only after it proves reliable and has a named owner.
Is it a replacement for Laravel container tests or Larastan?
No. It performs static checks on Symfony DI definitions and does not validate Laravel's runtime container behavior, service provider boot order, or application-level integration. Keep Laravel container tests and PHPStan or Larastan in place. Treat this package as a narrow, optional migration aid at most.
What kinds of service definition problems does it detect?
It reports unused service definitions, services with an excessive number of dependencies, and definitions that could be inlined or made private. These checks help keep a Symfony-style container lean as an application grows. The findings are specific to Symfony DI semantics, so they may not reflect how Laravel's container actually resolves services.
Is the package actively maintained?
The last release was February 2022, the repository is unknown from the supplied metadata, and the star count is modest. Support is community-only under the MIT license, with no vendor SLA. Before adoption, perform a supply-chain review, assign an internal owner, and define an exit criterion.
Can I use it in production?
No, it should be scoped as a development or CI-only utility and excluded from production artifacts. The tool does not affect production runtime scaling because it does not run in the application. Keep CI cost bounded by running it only against relevant service definition files.
What alternatives should Laravel teams consider?
For Laravel-first applications, use Laravel container tests, Larastan or PHPStan, and small custom scripts that inspect service providers. If you genuinely maintain Symfony DI definitions, Symfony's own linting tools may be a better fit. Reject this package when no Symfony service definition files exist in the codebase.
What are the main risks of adopting this package?
Risks include stale Symfony API assumptions, Composer conflicts with Laravel's Symfony components, false confidence when the validator passes but Laravel container behavior differs, and abandoned-package risk. Unknown repository provenance is also a governance concern. Run a timeboxed proof of concept and keep a documented fallback to custom scripts or manual review.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager