adelf / idea-php-dotenv-plugin

environment parameters completion, based on .env file keys
MIT License
166 stars 13 forks source link

Provide public api for collected enviroment variables #4

Closed Haehnchen closed 7 years ago

Haehnchen commented 7 years ago

As i want implement enviroment completion and navigation for Symfony plugin https://github.com/Haehnchen/idea-php-symfony2-plugin/issues/910 please provide a stable api so i can reuse the implemention, instead of bulding my own. Simple i just need a completion and navigation api for all and given variables.

"%env(DB_PASSWORD)%"
# app/config/config.yml
doctrine:
    dbal:
        # ...
        password: "%env(DB_PASSWORD)%"
Haehnchen commented 7 years ago

2 public methods are necessary see: https://github.com/Haehnchen/idea-php-symfony2-plugin/commit/d1853ff3c18b24a4acccf01685d1787460ce3d45

adelf commented 7 years ago

@Haehnchen I implemented API: https://github.com/adelf/idea-php-dotenv-plugin/blob/master/src/ru/adelf/idea/dotenv/api/EnvironmentVariablesApi.java Example of usage: https://github.com/adelf/idea-php-dotenv-plugin/blob/master/src/ru/adelf/idea/dotenv/extension/DotEnvCompletionContributor.java

Also full support of Dockerfile(if Docker integration plugin installed) and docker-compose.yml(YAML plugin) is implemented. I'll test all this stuff next week. And release after that.

adelf commented 7 years ago

Implemented in 0.3