Symfony extension for PHPStan. Sometimes, when you are dealing with optional dependencies, the ::has() methods can cause problems. For example, the following construct would complain that the condition is always either on or off, depending on whether you have the dependency for service installed. You can opt in for more advanced analysis of Symfony Console Commands by providing the console application from your own application. This will allow the correct argument and option types to be inferred when accessing $input-getArgument() or $input->getOption().
Features
- Provides correct return type for ContainerInterface::get() and ::has() methods
- Provides correct return type for Controller::get() and ::has() methods
- Provides correct return type for AbstractController::get() and ::has() methods
- Provides correct return type for ContainerInterface::getParameter() and ::hasParameter() methods
- Notifies you when you try to get an unregistered service from the container
- Notifies you when you try to get a private service from the container
Categories
Static Code AnalysisLicense
MIT LicenseFollow PHPStan Symfony Framework extensions
Other Useful Business Software
Enterprise-grade ITSM, for every business
Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of PHPStan Symfony Framework extensions!