[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.
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 👍 |
| 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.
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.