Skip to content

Commit 7cfbc20

Browse files
authored
Update README.md
1 parent e9c3e54 commit 7cfbc20

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ echo $unstableVersion->inc(Inc::PATCH); // 1.0.0
311311
echo $unstableVersion->inc(Inc::PRE_RELEASE); // 1.0.0-alpha.3
312312
```
313313

314-
315314
Each incrementing function provides the option to set a pre-release identity on the incremented version.
316315
```php
317316
<?php
@@ -347,10 +346,12 @@ echo $version->copy(null, null, null, "alpha.4"); // 1.0.0-alpha.4+b
347346
echo $version->copy(null, null, null, null, "build.3"); // 1.0.0-alpha.2+build.3
348347
echo $version->copy(3, 4, 5); // 3.4.5-alpha.2+build.1
349348
```
349+
> **Note**:
350350
> Without setting any optional parameter, the `copy()` method will produce an exact copy of the original version.
351351
352352
## Invalid version handling
353353
When the version or constraint parsing fails due to an invalid format, the library throws a specific `SemverException`.
354+
> **Note**:
354355
> The `Version::parseOrNull()` and `Constraint::parseOrNull()` methods can be used for exception-less conversions as they return `null` when the parsing fails.
355356
356357
## Contact & Support

0 commit comments

Comments
 (0)