File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,17 @@ $version = new SemVer\Version(); // Initilializes to '0.1.0'
5555```
5656
5757Or initialize with a custom version by passing a version string on creation.
58- Accepts any valid semantic version string with or without a preceding 'v' .
58+ Accepts any valid semantic version string with or without a preceding ` v ` .
5959
6060``` php
61- $version = new SemVer\Version('v1.2.3-alpha.5-sha.8d31ff4');
61+ $version = new SemVer\Version('v1.2.3-alpha.5+sha.8d31ff4');
62+ ```
63+
64+ Or parse an incomple version string with the static ` Version::parse() ` constructor.
65+
66+ ``` php
67+ $version = SemVer\Version::parse('v1') // Initializes to '1.0.0'
68+ $version = SemVer\Version::parse('v1.2') // Initializes to '1.2.0'
6269```
6370
6471Usage
You can’t perform that action at this time.
0 commit comments