Reinforce language about not specifying the version
parent
db7f25baaf
commit
4c75a2db01
|
@ -28,19 +28,19 @@ convention is all lowercase and dashes for word separation.
|
||||||
|
|
||||||
## Specifying the version
|
## Specifying the version
|
||||||
|
|
||||||
You need to specify the version some way. Depending on the type of repository
|
You need to specify the package's version some way. When you publish your
|
||||||
you are using, it might be possible to omit it from `composer.json`, because
|
package on Packagist, it is able to infer the version from the VCS (git, svn,
|
||||||
the repository is able to infer the version from elsewhere.
|
hg) information, so in that case you do not have to specify it, and it is
|
||||||
|
recommended not to. See [tags](#tags) and [branches](#branches) to see how
|
||||||
|
version numbers are extracted from these.
|
||||||
|
|
||||||
If you do want to specify it explicitly, you can just add a `version` field:
|
If you are creating packages by hand and really have to specify it explicitly,
|
||||||
|
you can just add a `version` field:
|
||||||
|
|
||||||
{
|
{
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
However if you are using git, svn or hg, you don't have to specify it.
|
|
||||||
Composer will detect versions as follows:
|
|
||||||
|
|
||||||
### Tags
|
### Tags
|
||||||
|
|
||||||
For every tag that looks like a version, a package version of that tag will be
|
For every tag that looks like a version, a package version of that tag will be
|
||||||
|
@ -65,7 +65,7 @@ name looks like a version, the version will be `{branchname}-dev`. For example
|
||||||
a branch `2.0` will get a version `2.0.x-dev` (the `.x` is added for technical
|
a branch `2.0` will get a version `2.0.x-dev` (the `.x` is added for technical
|
||||||
reasons, to make sure it is recognized as a branch, a `2.0.x` branch would also
|
reasons, to make sure it is recognized as a branch, a `2.0.x` branch would also
|
||||||
be valid and be turned into `2.0.x-dev` as well. If the branch does not look
|
be valid and be turned into `2.0.x-dev` as well. If the branch does not look
|
||||||
like a version, it will be `dev-{branchname}`. `master` results in a
|
like a version, it will be `dev-{branchname}`. `master` results in a
|
||||||
`dev-master` version.
|
`dev-master` version.
|
||||||
|
|
||||||
Here are some examples of version branch names:
|
Here are some examples of version branch names:
|
||||||
|
@ -75,7 +75,6 @@ Here are some examples of version branch names:
|
||||||
1.1.x
|
1.1.x
|
||||||
|
|
||||||
> **Note:** When you install a dev version, it will install it from source.
|
> **Note:** When you install a dev version, it will install it from source.
|
||||||
See [Repositories](05-repositories.md) for more information.
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue