8000 [Validator] Add documentation for the new `SemVer` constraint by OskarStark · Pull Request #21162 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Add documentation for the new SemVer constraint #21162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
OskarStark committed Jul 2, 2025
commit 246e93eee28425f1cb5b320cd154201f2d998656
8 changes: 4 additions & 4 deletions reference/constraints/SemVer.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
SemVer
======

Validates that a value is a valid semantic version string according to the
`Semantic Versioning`_ specification. This constraint supports various
version formats including partial versions, pre-release versions, and
Validates that a value is a valid semantic version string according to the
`Semantic Versioning`_ specification. This constraint supports various
version formats including partial versions, pre-release versions, and
build metadata.

.. versionadded:: 7.4
Expand Down Expand Up @@ -52,7 +52,7 @@

<class name="App\Entity\Package">
<property name="version">
<constraint name="SemVer" />

Check failure on line 55 in reference/constraints/SemVer.rst

View workflow job for this annotation

GitHub Actions / Lint (DOCtor-RST)

Please remove space before "/>"
</property>
</class>
</constraint-mapping>
Expand All @@ -62,7 +62,7 @@
// src/Entity/Package.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

Check failure on line 65 in reference/constraints/SemVer.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[Missing class] Class, interface or trait with name "Symfony\Component\Validator\Constraints" does not exist
use Symfony\Component\Validator\Mapping\ClassMetadata;

class Package
Expand All @@ -85,7 +85,7 @@

**type**: ``boolean`` **default**: ``true``

When set to ``true``, the version must strictly follow the official
When set to ``true``, the version must strictly follow the official
`Semantic Versioning`_ specification. This means:

- No "v" prefix is allowed (use "1.2.3", not "v1.2.3")
Expand Down Expand Up @@ -142,7 +142,7 @@
// src/Entity/Package.php
namespace App\Entity;

use Symfony\Component\Validator\Constraints as Assert;

Check failure on line 145 in reference/constraints/SemVer.rst

View workflow job for this annotation

GitHub Actions / Code Blocks

[Missing class] Class, interface or trait with name "Symfony\Component\Validator\Constraints" does not exist
use Symfony\Component\Validator\Mapping\ClassMetadata;

class Package
Expand Down
Loading
0