https://github.com/pulyaevskiy/phpstorm-phpdi
PHP-DI plugin for PhpStorm
https://github.com/pulyaevskiy/phpstorm-phpdi
Last synced: 2 months ago
JSON representation
PHP-DI plugin for PhpStorm
- Host: GitHub
- URL: https://github.com/pulyaevskiy/phpstorm-phpdi
- Owner: pulyaevskiy
- License: mit
- Created: 2015-02-26T23:09:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-06T05:44:49.000Z (over 5 years ago)
- Last Synced: 2024-10-12T08:10:09.706Z (7 months ago)
- Language: Java
- Size: 289 KB
- Stars: 40
- Watchers: 6
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-DI plugin for PhpStorm
[](https://plugins.jetbrains.com/plugin/7694)
[](https://plugins.jetbrains.com/plugin/7694)
[](https://plugins.jetbrains.com/plugin/7694)Plugin url : https://plugins.jetbrains.com/plugin/7694
This is very simple plugin which only implements type provider for services returned from PHP-DI container.
Strictly speaking current implementation is not dependent on PHP-DI in any way. It just supports certain way of receiving services from container which is widely used in PHP-DI:
```php
get(PostRepository::class);
```So the only thing this plugin does is:
1. It looks for all `get` (or `make`, since `v1.2.0`) method calls.
2. It filters out all except those where first argument contains `::class` substring.
3. It extracts class FQN from the first argument and provides it as a return type for that specific method call.Result:

#### Contributors:
* [Logan Attwood](https://github.com/lattwood)
License: MIT