-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: move the obtaining the version method to a separate class #131
chore: move the obtaining the version method to a separate class #131
Conversation
03be73a
to
9c69fab
Compare
Thanks @godruoyi ! |
{ | ||
/** | ||
* Note: magic constant that causes Symfony Console to not display a version | ||
* {@see Application::getLongVersion()} |
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.
This is a dead reference, because Application
is not imported here.
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.
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.
Thank guys for your suggestions. I'll update them in next PR. And I have a question why we need to define a variable here? for me understand is this always true
right? should we delete it directly?
public static function get(): string
{
$pieVersion = '@pie_version@';
if ($pieVersion === '@pie_version' . '@') {
// always be true
}
}
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.
@godruoyi I actually added a comment to the class in your PR:
Lines 29 to 41 in 75dbc22
/** | |
* This value is replaced dynamically by Box with the real version when | |
* we build the PHAR. It is based on the Git tag and/or version | |
* | |
* It will be replaced with `2.0.0` on an exact tag match, or something | |
* like `2.0.0@e558e33` on a commit following a tag. | |
* | |
* When running not in a PHAR, this will not be replaced, so this | |
* method needs additional logic to determine the version. | |
* | |
* @link https://box-project.github.io/box/configuration/#pretty-git-tag-placeholder-git | |
*/ | |
$pieVersion = '@pie_version@'; |
No description provided.