PHPackages                             lookyman/phpstan-symfony - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. lookyman/phpstan-symfony

Abandoned → [phpstan/phpstan-symfony](/?search=phpstan%2Fphpstan-symfony)ArchivedLibrary[Testing &amp; Quality](/categories/testing)

lookyman/phpstan-symfony
========================

Symfony extension for PHPStan

0.5.0(8y ago)42144.6k52MITPHPPHP ^7.1

Since Dec 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lookyman/phpstan-symfony)[ Packagist](https://packagist.org/packages/lookyman/phpstan-symfony)[ RSS](/packages/lookyman-phpstan-symfony/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (2)

DEPRECATED
==========

[](#deprecated)

Use [phpstan/phpstan-symfony](https://github.com/phpstan/phpstan-symfony) instead.

Symfony extension for PHPStan
=============================

[](#symfony-extension-for-phpstan)

What does it do?
----------------

[](#what-does-it-do)

- Provides correct return type for `ContainerInterface::get()` method,
- provides correct return type for `Controller::get()` method,
- 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.

Installation
------------

[](#installation)

```
composer require --dev lookyman/phpstan-symfony
```

Configuration
-------------

[](#configuration)

Put this into your `phpstan.neon` config:

```
includes:
	- vendor/lookyman/phpstan-symfony/extension.neon
parameters:
	symfony:
		container_xml_path: %rootDir%/../../../var/cache/dev/appDevDebugProjectContainer.xml # or srcDevDebugProjectContainer.xml for Symfony 4+
```

Limitations
-----------

[](#limitations)

It can only recognize pure strings or `::class` constants passed into `get()` method. This follows from the nature of static code analysis.

You have to provide a path to `appDevDebugProjectContainer.xml` or similar xml file describing your container.

Need something?
---------------

[](#need-something)

I don't use Symfony that often. So it might be entirely possible that something doesn't work here or that it lacks some functionality. If that's the case, **PLEASE DO NOT HESITATE** to open an issue or send a pull request. I will have a look at it and together we'll get you what you need. Thanks.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~19 days

Total

7

Last Release

3051d ago

PHP version history (2 changes)0.1.0PHP ^7.0

0.4.1PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f068d60b6e86ba2222bff60b7b27dea830d666a3e2f86eb50d6c1c1c1c8167ad?d=identicon)[lookyman](/maintainers/lookyman)

---

Top Contributors

[![lookyman](https://avatars.githubusercontent.com/u/3863468?v=4)](https://github.com/lookyman "lookyman (30 commits)")[![mzk](https://avatars.githubusercontent.com/u/382475?v=4)](https://github.com/mzk "mzk (7 commits)")[![hectorj](https://avatars.githubusercontent.com/u/2427959?v=4)](https://github.com/hectorj "hectorj (1 commits)")[![malarzm](https://avatars.githubusercontent.com/u/4947711?v=4)](https://github.com/malarzm "malarzm (1 commits)")[![ossinkine](https://avatars.githubusercontent.com/u/2588533?v=4)](https://github.com/ossinkine "ossinkine (1 commits)")

---

Tags

controllerdependency-injectionphpphp7phpstanstatic-analysissymfonysymfonyPHPStan

###  Code Quality

TestsPHPUnit

Type Coverage Yes

### Embed Badge

![Health badge](/badges/lookyman-phpstan-symfony/health.svg)

```
[![Health](https://phpackages.com/badges/lookyman-phpstan-symfony/health.svg)](https://phpackages.com/packages/lookyman-phpstan-symfony)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.5k55.4M8.5k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

79475.7M2.2k](/packages/phpstan-phpstan-symfony)[shipmonk/dead-code-detector

Dead code detector to find unused PHP code via PHPStan extension. Can automatically remove dead PHP code. Supports libraries like Symfony, Doctrine, PHPUnit etc. Detects dead cycles. Can detect dead code that is tested.

4853.5M92](/packages/shipmonk-dead-code-detector)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

67272.8M1.4k](/packages/phpstan-phpstan-doctrine)[staabm/phpstan-dba

2942.6M2](/packages/staabm-phpstan-dba)[staabm/phpstan-todo-by

2052.1M84](/packages/staabm-phpstan-todo-by)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
