diff --git a/components/http_client.rst b/components/http_client.rst index 2a99653a1ed..40f6c182693 100644 --- a/components/http_client.rst +++ b/components/http_client.rst @@ -52,8 +52,8 @@ including concurrent requests, HTTP/2 is only supported when using cURL. is enabled and falls back to PHP streams otherwise. If you prefer to select the transport explicitly, use the following classes to create the client:: - use Symfony\Component\HttpClient\NativeHttpClient; use Symfony\Component\HttpClient\CurlHttpClient; + use Symfony\Component\HttpClient\NativeHttpClient; // uses native PHP streams $httpClient = new NativeHttpClient(); diff --git a/reference/constraints/Json.rst b/reference/constraints/Json.rst index 4590b847c57..beac690c4f9 100644 --- a/reference/constraints/Json.rst +++ b/reference/constraints/Json.rst @@ -69,8 +69,8 @@ The ``Json`` constraint can be applied to a property or a "getter" method: // src/Entity/Book.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class Book { diff --git a/reference/constraints/Negative.rst b/reference/constraints/Negative.rst index 0a0d53002a3..c90a1fb1c98 100644 --- a/reference/constraints/Negative.rst +++ b/reference/constraints/Negative.rst @@ -69,8 +69,8 @@ The following constraint ensures that the ``withdraw`` of a bank account // src/Entity/TransferItem.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class TransferItem { diff --git a/reference/constraints/NegativeOrZero.rst b/reference/constraints/NegativeOrZero.rst index 6b92c8900d2..15d0926bc5d 100644 --- a/reference/constraints/NegativeOrZero.rst +++ b/reference/constraints/NegativeOrZero.rst @@ -68,8 +68,8 @@ is a negative number or equal to zero: // src/Entity/UnderGroundGarage.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class UnderGroundGarage { diff --git a/reference/constraints/NotCompromisedPassword.rst b/reference/constraints/NotCompromisedPassword.rst index 10aeded0e06..ffa9fe99d8d 100644 --- a/reference/constraints/NotCompromisedPassword.rst +++ b/reference/constraints/NotCompromisedPassword.rst @@ -36,8 +36,6 @@ The following constraint ensures that the ``rawPassword`` property of the class User { - // ... - /** * @Assert\NotCompromisedPassword */ @@ -72,8 +70,8 @@ The following constraint ensures that the ``rawPassword`` property of the // src/Entity/User.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class User { diff --git a/reference/constraints/Positive.rst b/reference/constraints/Positive.rst index 28633551f60..b9bef408fa5 100644 --- a/reference/constraints/Positive.rst +++ b/reference/constraints/Positive.rst @@ -69,8 +69,9 @@ positive number (greater than zero): // src/Entity/Employee.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; + class Employee { diff --git a/reference/constraints/PositiveOrZero.rst b/reference/constraints/PositiveOrZero.rst index 7d668598e96..70196a6b9fa 100644 --- a/reference/constraints/PositiveOrZero.rst +++ b/reference/constraints/PositiveOrZero.rst @@ -68,8 +68,8 @@ is positive or zero: // src/Entity/Person.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class Person { diff --git a/reference/constraints/Timezone.rst b/reference/constraints/Timezone.rst index 2fc04bdc839..c195a5d46f6 100644 --- a/reference/constraints/Timezone.rst +++ b/reference/constraints/Timezone.rst @@ -69,8 +69,8 @@ string meant to contain a timezone identifier (e.g. ``America/New_York``): // src/Entity/UserSettings.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class UserSettings { diff --git a/reference/constraints/Unique.rst b/reference/constraints/Unique.rst index 681c4dc18b6..97cb6ff8602 100644 --- a/reference/constraints/Unique.rst +++ b/reference/constraints/Unique.rst @@ -78,8 +78,8 @@ strings: // src/Entity/Person.php namespace App\Entity; - use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; + use Symfony\Component\Validator\Mapping\ClassMetadata; class Person {