-
Notifications
You must be signed in to change notification settings - Fork 105
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
Show the current project's Magento version in settings window #81
Show the current project's Magento version in settings window #81
Conversation
|
||
private String getFilePath() { | ||
String fileName = "composer.json"; | ||
return this.project.getBasePath() + "/" + fileName; |
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.
Please use File.separator instead "/" string literal.
} | ||
|
||
private String getFilePath() { | ||
String fileName = "composer.json"; |
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.
Please don't use literals. In this case we already have com.magento.idea.magento2plugin.magento.files.ComposerJson#FILE_NAME
. In case there no existing constant - feel free to add a new one. Thank you!
Hi @VitaliyBoyko, |
Hi @vasilii-b But still, we need to make up something for Magento installed from the GitHub. Maybe add some custom input to fill the version manually. Thank you for collaboration! |
This PR includes reward labels for #59. |
Description (*)
This PR adds a new util class that retrieves the Project's Magento version from the
composer.json
file in the project's root.Fixed Issues (if relevant)
Questions or comments
(uses deprecated methods)
ℹ️ Instead of using a hard dependency on https://plugins.jetbrains.com/plugin/7631-php-composer-json-support as mentioned in the issue comments, I've used the existing class
com.magento.idea.magento2plugin.php.module.ComposerPackageModelImpl
in the project to get information from acomposer.json
file.Contribution checklist (*)