disco icon indicating copy to clipboard operation
disco copied to clipboard

[Feature] Let Disco also generate the phpstorm Meta file for type lookups

Open shochdoerfer opened this issue 9 years ago • 6 comments

PhpStorm supports a so-called Meta file helping with autocompletion for container calls. Add a (Phing) task to generate such a file for the given container configuration to enable autocomplete support for the return values of the BeanFactory::get() calls.

shochdoerfer avatar Dec 07 '15 11:12 shochdoerfer

What about using Composer to create the PHPStorm meta-file on Update/Install? Also: If a meta-file already exists in a project using Disco, it shouldn't be overridden.

SenseException avatar Sep 12 '16 13:09 SenseException

@SenseException My current plan is rather to generate the files when the cache files are written because you want to have a meta file matching the current configuration.

But open to suggestions / improvements ;)

shochdoerfer avatar Sep 12 '16 14:09 shochdoerfer

@shochdoerfer The goal is to manually start the phing task after the dev made changes?

SenseException avatar Sep 12 '16 17:09 SenseException

@SenseException That is what I had in mind then I added the issue. Downside is you would need to manually build the meta-file which means potentially it could be out-of-sync with the configuration. That is why I thought Disco should spit out the file additionally to the cached configuration. That way both files would always be in sync.

shochdoerfer avatar Sep 12 '16 19:09 shochdoerfer

I wouldn't make this file and its generating code a part of this repository. It is PHPStorm only and no help for other IDEs. It is also not needed for running Disco. If this is about PHPStorm, I suggest to create a PHPStorm plugin to separate a development helper from the library.

SenseException avatar Oct 08 '16 20:10 SenseException

My idea was to add a configuration setting so that the user could toggle the generation of the file.

shochdoerfer avatar Oct 10 '16 08:10 shochdoerfer