From f00fb19884663bf8bed3231d261f5a8fdddb2d12 Mon Sep 17 00:00:00 2001 From: Aleh Kashnikau Date: Sun, 23 Aug 2015 18:19:42 +0300 Subject: [PATCH] added Demo video to README.md and fixed container bug --- README.md | 9 +++++++++ src/Plugin.php | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 213d445..d664ad9 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,16 @@ Symfony2 plugin for Padawan.php Adds services' names completion and type detection after `Symfony\Components\DependencyInjection\Container::get` and `Controller::get`. +# Demo + +[![ScreenShot](http://i1.ytimg.com/vi/HTEExr9xCH4/maxresdefault.jpg)](https://www.youtube.com/watch?v=HTEExr9xCH4) + # Installation Plugin name is `mkusher/padawan-symfony`, so you should call `plugin add` with this name. + +# Running + +As of now, the only way to update services map is to `Generate Index`. After it +you'll be able to get services list and types detection. diff --git a/src/Plugin.php b/src/Plugin.php index fa6b0f5..ce2eff4 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -79,9 +79,7 @@ protected function checkForContainerClass($fqcn, $index) if (!$fqcn instanceof FQCN) { return false; } - if (in_array($fqcn->toString(), $this->containerNames) - && $workingNode->name === 'get' - ) { + if (in_array($fqcn->toString(), $this->containerNames)) { return true; } $class = $index->findClassByFQCN($fqcn);