The intention of this package is only to show how to use Semantic Versioning in PHP projects using composer.
The last created TAG will be presented in the route of this project as a markdown file.
The initial TAG will be 1.0.0.0
represented by file 1.0.0.0.md
.
So each time a TAG is created 1.0.0.0.md
will be renamed to match it.
Lets see some examples to cover the 4 stages of Semantic Versioning schema.
{
"repositories": [
{
"type": "vcs",
"url": "https://gitlab.com/exadra37-versioning/composer-demo"
}
],
"require": {
"exadra37-versioning/composer-demo": "1.0.0.*"
}
}
$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing exadra37-versioning/composer-demo (1.0.0.0) Downloading: 100%
Writing lock file
Generating autoload files
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating exadra37-versioning/composer-demo (1.0.0.0 => 1.0.0.1) Downloading: 100%
Writing lock file
Generating autoload files
Edit your composer.json
and change "exadra37-versioning/semantic-versioning": "1.0.0.*"
to "exadra37-versioning/semantic-versioning": "1.0.*"
.
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating exadra37-versioning/composer-demo (1.0.0.1 => 1.0.1.0) Downloading: 100%
Writing lock file
Generating autoload files
Edit your composer.json
and change "exadra37-versioning/semantic-versioning": "1.0.*"
to "exadra37-versioning/semantic-versioning": "1.*"
.
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating exadra37-versioning/composer-demo (1.0.1.0 => 1.1.0.0) Downloading: 100%
Writing lock file
Generating autoload files
Edit your composer.json
and change "exadra37-versioning/semantic-versioning": "1.*"
to "exadra37-versioning/semantic-versioning": "2.*"
.
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating exadra37-versioning/composer-demo (1.1.0.0 => 2.0.0.0) Downloading: 100%
Writing lock file
Generating autoload files