File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ PHP utility used to parse application version strings, and retrieve information
66
77The parser expects versions to be in the following format:
88
9- ` MajorVersion.MinorVersion.PatchVersion-BranchName-ReleaseTagNumber `
9+ ` MajorVersion.MinorVersion.PatchVersion-BranchOrTag `
1010
1111This allows the use of a wide range of version strings. Some examples:
1212
@@ -101,11 +101,14 @@ $number = $version->getVersion(); // 1
101101``` php
102102use Mistralys\VersionParser\VersionParser;
103103
104- $version = VersionParser::create('1-BETA' );
104+ $version = VersionParser::create("1.2.0 'Cool Release' RC5" );
105105
106- $normalized = $version->getTagVersion(); // 1.0.0-beta
106+ $normalized = $version->getTagVersion(); // 1.0.0-CoolRelease-rc5
107107```
108108
109+ > NOTE: The branch name is also normalized. Words are capitalized,
110+ > and spaces are removed. Other special characters are preserved.
111+
109112### Checking the tag type
110113
111114To check the release type, the shorthand methods ` isBeta() ` , ` isAlpha() ` ,
You can’t perform that action at this time.
0 commit comments