-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHP] Check skipping artifiactVersion in other mustache templates, since it is not required anymore #2947
Conversation
- Package version: {{artifactVersion}} | ||
- Build date: {{generatedDate}} | ||
{{#artifactVersion}}- Package version: {{artifactVersion}} | ||
{{/artifactVersion}}- Build date: {{generatedDate}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just put {{#artifactVersion}}
and {{/artifactVersion}}
on lines of their own.
As of recently whitespace will be stripped around them if they are the only thing on a line.
This looks nicer and more readable in the mustache template.
@arnested Regarding your first comment, did you mean, something like this:
I checked it and if I do it like this I end up with empty line |
I meant:
With the recent jMustache this should not produce blank lines. |
@arnested yup, you are correct, it works, thanks for good advice 👍 |
@@ -513,11 +513,13 @@ class Configuration | |||
*/ | |||
public static function toDebugReport() | |||
{ | |||
$report = "PHP SDK ({{invokerPackage}}) Debug Report:\n"; | |||
$report = 'PHP SDK ({{invokerPackage}}) Debug Report:'."\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about replacing "\n" with PHP_EOL? (I thought you've done it via another PR already, maybe you need to rebase on the latest master)
What about remaining lines with double quote? shall we replace it with single quote as well?
…wagger-codegen into version-check-mustache Conflicts: modules/swagger-codegen/src/main/resources/php/configuration.mustache
I have found some places that still try to print artifactVersion even though it is not required. So I added possibility to skip it.