All Projects → lookyman → phpstan-symfony

lookyman / phpstan-symfony

Licence: MIT license
*DEPRECATED* Symfony extension for PHPStan

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to phpstan-symfony

phpstan-extensions
Extensions for PHPStan
Stars: ✭ 61 (+45.24%)
Mutual labels:  static-analysis, phpstan
phpstan-wordpress
WordPress extensions for PHPStan ⛏️
Stars: ✭ 182 (+333.33%)
Mutual labels:  static-analysis, phpstan
ControllerAutowire
[DEPRECATED] Use Controller autowiring by default since Symfony 3.3
Stars: ✭ 24 (-42.86%)
Mutual labels:  controller, dependency-injection
Phpstan
PHP Static Analysis Tool - discover bugs in your code without running it!
Stars: ✭ 10,534 (+24980.95%)
Mutual labels:  static-analysis, phpstan
phpstan-webmozart-assert
PHPStan extension for webmozart/assert
Stars: ✭ 132 (+214.29%)
Mutual labels:  static-analysis, phpstan
vim-phpstan
A Vim plugin for PHPStan - https://github.com/phpstan/phpstan. It calls `phpstan` to do static analysis of your PHP code and displays the errors in Vim's quickfix list.
Stars: ✭ 26 (-38.1%)
Mutual labels:  static-analysis, phpstan
phpstan-phpspec
PhpSpec extension for PHPStan
Stars: ✭ 19 (-54.76%)
Mutual labels:  static-analysis, phpstan
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (-47.62%)
Mutual labels:  controller, dependency-injection
phpstan-nette
Nette Framework class reflection extension for PHPStan & framework-specific rules
Stars: ✭ 87 (+107.14%)
Mutual labels:  static-analysis, phpstan
phpstan
PHP Static Analysis in Github Actions.
Stars: ✭ 41 (-2.38%)
Mutual labels:  static-analysis, phpstan
phpstan-dba
PHPStan based SQL static analysis and type inference for the database access layer
Stars: ✭ 163 (+288.1%)
Mutual labels:  static-analysis, phpstan
woocommerce-stubs
WooCommerce function and class declaration stubs for static analysis.
Stars: ✭ 49 (+16.67%)
Mutual labels:  static-analysis, phpstan
clam
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 180 (+328.57%)
Mutual labels:  static-analysis
Slice
Slice - a framework which simplifies Sling/AEM development by using dependency injection pattern and mapping Sling resources into Java objects
Stars: ✭ 64 (+52.38%)
Mutual labels:  dependency-injection
vue-ioc
IoC and DI for Vue powered by InversifyJS and inspired by Angular Module syntactic sugar.
Stars: ✭ 39 (-7.14%)
Mutual labels:  dependency-injection
graphql-server-typed
Using typescript and gql-code-gen for easy graphql setup
Stars: ✭ 32 (-23.81%)
Mutual labels:  dependency-injection
pulp
Scala library for guiceless dependency injection
Stars: ✭ 26 (-38.1%)
Mutual labels:  dependency-injection
common-injector
Heavily influenced by Angular and it's dependency injection. Inspired by Angular and Indiv.
Stars: ✭ 18 (-57.14%)
Mutual labels:  dependency-injection
Alfred ShadowsocksController
ShadowsocksX controller for Alfred
Stars: ✭ 70 (+66.67%)
Mutual labels:  controller
func-dependency-injection-go
Dependency injection example using higher order functions
Stars: ✭ 26 (-38.1%)
Mutual labels:  dependency-injection

DEPRECATED

Use phpstan/phpstan-symfony instead.

Symfony extension for PHPStan

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

composer require --dev lookyman/phpstan-symfony

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

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?

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].