Sorien / silex-idea-plugin

Idea plugin for Silex Framework - plugin is not compatible with PHPStorm 2016.2
MIT License
26 stars 8 forks source link

Resolve keys for register values #19

Closed CarsonF closed 9 years ago

CarsonF commented 9 years ago
$app->register(new FooSP(), [
    'foo' => 'bar'
//   ^ resolve
]);
Sorien commented 9 years ago

same for constructor

public function __construct(array $values = array()) {
}
CarsonF commented 9 years ago

Is that for when you are calling the constructor or overriding the constructor? Because with overriding the $values doesn't have all the services yet.

Sorien commented 9 years ago

i'll leave constructors for future but i want to know another thing should we show only parameters or services too?

CarsonF commented 9 years ago

Hmm interesting...does Pimple actually make the distinction between the two? What defines a service, a closure? I've seen some closures that are basically parameters; they are just inside closures to be lazy. I'm thinking both.

Sorien commented 9 years ago

as there is no way how to find out how they were registered to container plugin is considering simple types and closures as parameters, (objects inherited from \pimple as containers and others as services) ... so maybe parameters are enough

CarsonF commented 9 years ago

Ah I am forgetting that the types come from the return value of the closures; it is transparent to the plugin if they are lazy or not.

Yeah I think parameters would be enough

Sorien commented 9 years ago

btw if you have some time after vacation shall i ask you to write some docs for https://github.com/Sorien/silex-idea-plugin/blob/master/META-INF/plugin.xml#L8 just a few sentences (maybe something how to install it wit SilexProvider) you english is a way better

CarsonF commented 9 years ago

Sure I can do that today. Btw I'm always on freenode IRC, it may be easier to chat there

Sorien commented 9 years ago

fixed by commit cc9f01118043c8935cece9872a39a39a4bf6a46f

CarsonF commented 9 years ago

If that dev version from the link in the readme is up to date with master, then this isn't working yet.

Sorien commented 9 years ago

should be up-to-date, its build by tavis during build, its covered by tests so i thought its solved

CarsonF commented 9 years ago

Ah it seems the => is needed after the quotes for completion to work. That's a bit unintuitive when one is writing from scratch. But better than nothing :)

Sorien commented 9 years ago

Nice find, i'll try to improve it :-)

Sorien commented 9 years ago

hope it's fixed now ...