-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix error in bundle installation standard example #4267
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
@@ -212,7 +212,7 @@ following standardized instructions in your ``README.md`` file. | |||
following command to download the latest stable version of this bundle: | |||
|
|||
```bash | |||
$ composer require <package-name> "~1" | |||
$ composer require <package-name> "~1.0" |
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.
~1
is equal to *
, which I don't think you want 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.
no it is not. ~1
is actually the same than ~1.0
. The semver operator will never allow bumping to the next major version, as BC versions are not BC
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.
I just checked and the Composer doc does not describe this case. It might be worth a contribution...
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.
Interesting, thanks @stof. I've reverted this change.
I'm going to merge this, as it annoys me when I copy the template to apply it on bundle docs. However, we can remove the version completely from the require command since it defaults to stable in the newer composer versions. What do you think, @weaverryan @javiereguiluz ? |
Thanks for the fix! Regarding the version number, I don't have a strong opinion about what to do. It's cool to not provide the version, but only works on recent Composer versions. I don't know which is the best solution here. |
@javiereguiluz I've thought about it and I don't like it. Assume a library has a 1.0 version and releases 2.0. Both documentations are still visible and now 1.0 will install the 2.0 version. That isn't nice :) |
This PR was merged into the 2.3 branch. Discussion ---------- Fix error in bundle installation standard example I also included the class name, to make it more clear. | Q | A | --- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | - Commits ------- bd7da67 Fix error in code
I agree that we should keep the version info for the reason of supporting older docs |
I also included the class name, to make it more clear.