Skip to content

Instantly share code, notes, and snippets.

@Saeven
Created March 23, 2018 02:19
Show Gist options
  • Save Saeven/dd760f8244b08fdc36fecb849a7a0397 to your computer and use it in GitHub Desktop.
Save Saeven/dd760f8244b08fdc36fecb849a7a0397 to your computer and use it in GitHub Desktop.
Install PHPStorm Autocomplete for Zend Framework Container (ServiceManager)
<?php
/**
* Install this in your base PHPStorm 2018+ folder under .phpstorm.meta.php/container.meta.php and
* your $container->get(ThatClass::class) calls will now yield autocomplete magic.
*/
namespace PHPSTORM_META {
override(\Interop\Container\ContainerInterface::get(0),
map([
'' => '@',
]));
override(\Interop\Container\ContainerInterface::build(0, 1),
map([
'' => '@',
]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment