Download the PHP package tomzx/php-semver-checker without Composer
On this page you can find all versions of the php package tomzx/php-semver-checker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomzx/php-semver-checker
More information about tomzx/php-semver-checker
Files in tomzx/php-semver-checker
Package php-semver-checker
Short Description PHP Semantic Versioning Checker
License MIT
Homepage https://github.com/tomzx/php-semver-checker
Informations about the package php-semver-checker
PHP Semantic Versioning Checker
PHP Semantic Versioning Checker is a console/library which allows you to inspect a set of before and after source code.
After the inspection is completed, you are given a list of changes that have occurred between the two changesets following Semantic Versioning 2.0.0. For each of these changes, the level of the change (MAJOR, MINOR, PATCH) will be given, as well as the location of the change (file and line number) and a reason as to why this level change is suggested.
For continuous integration
If you'd like to use php-semver-checker
in your CI pipeline, we recommend you look at
php-semver-checker-git
which integrates with Git and will compare
your latest changes with the latest Git tag of your repository.
Semantic Versioning 2.0.0 Overview
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes,
- MINOR version when you add functionality in a backwards-compatible manner, and
- PATCH version when you make backwards-compatible bug fixes.
Getting started
As this is still an alpha package, it is not suggested to include php-semver-checker
directly in your composer.json. There are however a couple ways to use the tool:
- Preferred method Download the latest .phar build. Note that the .phar build is generally less bleeding edge than the following methods.
php composer.phar create-project tomzx/php-semver-checker --stability=dev
will clone to a new php-semver-checker folder in your current working directorygit clone https://github.com/tomzx/php-semver-checker.git
andphp composer.phar install
in the newly cloned directory.
See the example section for examples of how to use the tool.
Building php-semver-checker.phar
First, make sure you have box installed. Then, in the base directory, you can run the following command which will generate the php-semver-checker.phar
file.
Current ruleset & verification codes
See docs/Ruleset.md
for an exhaustive list of currently supported (and to come) ruleset.
Verification codes are a mean to uniquely identify a semantic versioning trigger (a condition which upon detection, requires your code changes to be versioned).
Example
Contributing
Adding new rules
- Add the rules to the
docs/Ruleset.md
document - Run
php scripts/extract-rules-from-ruleset.php
to generate an up to date array to paste in theConfiguration/LevelMapping.php
file - Update the documentation @ https://github.com/tomzx/php-semver-checker-docs
License
The code is licensed under the MIT license. See LICENSE.
All versions of php-semver-checker with dependencies
hassankhan/config Version ^3.0
nikic/php-parser Version ^4.0
symfony/console Version ^6.0
symfony/yaml Version ^6.0
tomzx/finder Version ^0.2