Skip to content

pulyaevskiy/phpstorm-phpdi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-DI plugin for PhpStorm

Version Downloads Downloads last month

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
$postRepository = $container->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:

Example screenshot

Contributors:

License: MIT

About

PHP-DI plugin for PhpStorm

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages