Closed CarsonF closed 9 years ago
class MyApplication extends Silex\Application {
}
$app = new MyApplication();
$app['<caret>'] // works without any problem
$app->run();
but there is limitation, only first inherited child is resolved as Pimple container and so example below is not working...
class MyApplication extends Silex\Application {
}
class MySubApplication extends MyApplication {
}
$app = new MySubApplication();
$app[''] = true;
can you show me your Application inheritence tree, i'll try to solve it or create settings for it...
Is the first inherited child resolution limitation from your plugin or IDEA's API?
I have a couple cases of more than one level of inheritance. For example:
namespace Silex {
class Application extends \Pimple { }
}
namespace CarsonF\Common {
use Silex\Application as ApplicationBase;
class Application extends ApplicationBase { }
}
namespace CarsonF\ProjectA {
use CarsonF\Common\Application as ApplicationBase;
class Application extends ApplicationBase { }
}
Is it possible the use as
is throwing it off?
its my plugin limitation ... inheritance should be resolved inside php extension, i just need to iterate over whole inheritance tree (it should be possible but it can have some performance impact) ... i'll look at it tomorow
Cool! Maybe the classes can be cached?
should be solved, please check ver. 0.9.2 https://github.com/Sorien/silex-idea-plugin/releases/tag/0.9.2 (now i'm checking to the depth of 5 in inheritance tree)
Version 0.9.4 fixed it!
I sub-class Application for each of my projects and register my service providers there (basically same as Silex). Completion isn't provided for these though.
Doesn't work:
Works:
Thank you so much for working on this!!