-
-
Notifications
You must be signed in to change notification settings - Fork 48
Remove version from composer.json #462
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
Conversation
|
for CLI\Version: https://getcomposer.org/doc/07-runtime.md#installed-versions |
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.
Thanks @szepeviktor for this PR, but if you would like to remove the version from the composer.json file, we should provide a way to print the version in a testable way.
And as you can see, VersionTest is broken.
|
How about adding version as constant here? Line 7 in 92bfae0
|
|
I have read the links above, but if the risk would be that of " Specifying the version yourself will most likely end up creating problems at some point due to human error." then I don't see any advantage in writing the version in one place or another. If we find a way to avoid writing the version in the repository, so we don't have to update it manually with every release, then that’s a different matter. |
|
While testing it is not possible to get the future version number. (only existing git tags can be queried) While running: Composer\InstalledVersions::getVersion('phparkitect/arkitect'); |
That should do the trick, we could use it in the Version class instead of parsing the composer.json., defaultingo to UNKNOWN if the class InstalledVersions does not exists. BTW I guess the right package name is |
|
Google Gemini talks about these: https://g.co/gemini/share/dc76096d2ddc |
|
@szepeviktor do you wanna try to implement it :) ? |
|
It must be more complicated than I thought ... --- Expected
+++ Actual
@@ @@
-'0.5.2'
+'dev-f3390ad0a999714bcc718754ad301fd8d8819716'arkitect/tests/Unit/CLI/VersionTest.php Line 14 in 3acff7c
|
Considering that with this change everything is managed via composer, does this test still provide value? I'm for removing it |
|
Done 🍏 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #462 +/- ##
============================================
+ Coverage 94.90% 94.94% +0.04%
+ Complexity 605 604 -1
============================================
Files 69 69
Lines 1609 1603 -6
============================================
- Hits 1527 1522 -5
+ Misses 82 81 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Glad to contribute. |
https://getcomposer.org/doc/04-schema.md#version