lctrs/psalm-psr-container-plugin
Psalm plugin that improves static analysis for PSR-11 containers. Adds smarter type inference for container get/has calls so services and dependencies resolve to the right classes, reducing false positives and making container-heavy code safer to refactor.
Architecture fit: The plugin is designed for PSR-11 compliant containers. In Laravel projects, this requires using a PSR-11 adapter (e.g., illuminate/container with PSR-11 compatibility layer). Without such an adapter, the plugin has no effect. For standard PSR-11 implementations (e.g., Symfony, Zend), it fits seamlessly.
Integration feasibility: High. As a standard Psalm plugin, installation is trivial via Composer and minimal config updates. Requires Psalm >=4.0 (check plugin docs), but current Psalm versions are compatible.
Technical risk: Low if PSR-11 is already in use. High risk if the project doesn't use PSR-11 container, leading to wasted effort. Also, potential false positives if
How can I help you explore Laravel packages today?