vscode-php-docblocker icon indicating copy to clipboard operation
vscode-php-docblocker copied to clipboard

Provide environment variables in configuration settings if present in…

Open ZachWatkins opened this issue 3 years ago • 3 comments

… process.env

Change Summary: [ What have you changed and why? ]

I have changed the extension to allow user configurations to include ${env:myVariable} in tag content definitions which will be replaced with environment variables available to the extension at runtime using process.env. This will be useful for automatic inclusion of a PHP project's version number which can be more easily automated as an environment variable than it can as a VS Code setting. Without this change I have to manually input the project's current version number for @since and @version tags. This also allows me to define more tag content at the User-level such as @copyright and @package by setting it to ${env:PACKAGE_NAME} and ensuring the directory provides this environment variable before VS Code starts.

Checks:

  • [ ] CHANGELOG.md updated with relevant changes

ZachWatkins avatar Jul 19 '22 02:07 ZachWatkins

Hmm I'm not sure why the workflows haven't run

neild3r avatar Nov 11 '22 13:11 neild3r

@ZachWatkins I know this is a late response but I've been extremely busy recently but would you be able to take a look at adding some unit tests for these additions.

In general I'm happy with what you are wanting to change we may want to think about where some of the code should sit. I did think that replacement set of classes might even be a good idea to implement where we do more of this sort of thing.

That shouldn't change the implementation of the unit tests though so let's look at getting those covered first.

neild3r avatar Nov 11 '22 13:11 neild3r

@neild3r OK I will see about adding those tests, I'm glad you responded and no worries about the response time. I don't have an ETA but I will find time to add tests and send them your way.

Zachary Watkins


From: Neil Brayfield @.> Sent: Friday, November 11, 2022 7:21:50 AM To: neild3r/vscode-php-docblocker @.> Cc: Zachary K. Watkins @.>; Mention @.> Subject: Re: [neild3r/vscode-php-docblocker] Provide environment variables in configuration settings if present in… (PR #226)

@ZachWatkinshttps://github.com/ZachWatkins I know this is a late response but I've been extremely busy recently but would you be able to take a look at adding some unit tests for these additions.

In general I'm happy with what you are wanting to change we may want to think about where some of the code should sit. I did think that replacement set of classes might even be a good idea to implement where we do more of this sort of thing.

That shouldn't change the implementation of the unit tests though so let's look at getting those covered first.

— Reply to this email directly, view it on GitHubhttps://github.com/neild3r/vscode-php-docblocker/pull/226#issuecomment-1311689852, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA2MOO5LAALYWYPIKSWABYTWHZB65ANCNFSM536MFB6Q. You are receiving this because you were mentioned.Message ID: @.***>

ZachWatkins avatar Nov 13 '22 04:11 ZachWatkins