Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/http_client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Negative.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/NegativeOrZero.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 1 addition & 3 deletions reference/constraints/NotCompromisedPassword.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ The following constraint ensures that the ``rawPassword`` property of the

class User
{
// ...

/**
* @Assert\NotCompromisedPassword
*/
Expand Down Expand Up @@ -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
{
Expand Down
3 changes: 2 additions & 1 deletion reference/constraints/Positive.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/PositiveOrZero.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/Unique.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down