Skip to content

Commit 42af653

Browse files
committed
remove docblocks for deprecated argument types
1 parent 72ccba7 commit 42af653

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+135
-195
lines changed

UPGRADE-7.4.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,14 @@ Validator
8585

8686
class CustomConstraint extends Constraint
8787
{
88-
public $option1;
89-
public $option2;
90-
9188
#[HasNamedArguments]
92-
public function __construct($option1 = null, $option2 = null, ?array $groups = null, mixed $payload = null)
93-
{
89+
public function __construct(
90+
public $option1 = null,
91+
public $option2 = null,
92+
?array $groups = null,
93+
mixed $payload = null,
94+
) {
9495
parent::__construct(null, $groups, $payload);
95-
96-
$this->option1 = $option1;
97-
$this->option2 = $option2;
9896
}
9997
}
10098
```
@@ -128,16 +126,14 @@ Validator
128126

129127
class CustomConstraint extends Constraint
130128
{
131-
public $option1;
132-
public $option2;
133-
134129
#[HasNamedArguments]
135-
public function __construct($option1, $option2 = null, ?array $groups = null, mixed $payload = null)
136-
{
130+
public function __construct(
131+
public $option1,
132+
public $option2 = null,
133+
?array $groups = null,
134+
mixed $payload = null,
135+
) {
137136
parent::__construct(null, $groups, $payload);
138-
139-
$this->option1 = $option1;
140-
$this->option2 = $option2;
141137
}
142138
}
143139
```
@@ -172,13 +168,12 @@ Validator
172168

173169
class CustomCompositeConstraint extends Composite
174170
{
175-
public array $constraints = [];
176-
177171
#[HasNamedArguments]
178-
public function __construct(array $constraints, ?array $groups = null, mixed $payload = null)
172+
public function __construct(
173+
public array $constraints,
174+
?array $groups = null,
175+
mixed $payload = null)
179176
{
180-
$this->constraints = $constraints;
181-
182177
parent::__construct(null, $groups, $payload);
183178
}
184179
}

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,14 @@ CHANGELOG
3131

3232
class CustomConstraint extends Constraint
3333
{
34-
public $option1;
35-
public $option2;
36-
3734
#[HasNamedArguments]
38-
public function __construct($option1 = null, $option2 = null, ?array $groups = null, mixed $payload = null)
39-
{
35+
public function __construct(
36+
public $option1 = null,
37+
public $option2 = null,
38+
?array $groups = null,
39+
mixed $payload = null,
40+
) {
4041
parent::__construct(null, $groups, $payload);
41-
42-
$this->option1 = $option1;
43-
$this->option2 = $option2;
4442
}
4543
}
4644
```
@@ -74,16 +72,14 @@ CHANGELOG
7472

7573
class CustomConstraint extends Constraint
7674
{
77-
public $option1;
78-
public $option2;
79-
8075
#[HasNamedArguments]
81-
public function __construct($option1, $option2 = null, ?array $groups = null, mixed $payload = null)
82-
{
76+
public function __construct(
77+
public $option1,
78+
public $option2 = null,
79+
?array $groups = null,
80+
mixed $payload = null,
81+
) {
8382
parent::__construct(null, $groups, $payload);
84-
85-
$this->option1 = $option1;
86-
$this->option2 = $option2;
8783
}
8884
}
8985
```
@@ -118,13 +114,12 @@ CHANGELOG
118114

119115
class CustomCompositeConstraint extends Composite
120116
{
121-
public array $constraints = [];
122-
123117
#[HasNamedArguments]
124-
public function __construct(array $constraints, ?array $groups = null, mixed $payload = null)
118+
public function __construct(
119+
public array $constraints,
120+
?array $groups = null,
121+
mixed $payload = null)
125122
{
126-
$this->constraints = $constraints;
127-
128123
parent::__construct(null, $groups, $payload);
129124
}
130125
}

src/Symfony/Component/Validator/Constraints/All.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class All extends Composite
2727
public array|Constraint $constraints = [];
2828

2929
/**
30-
* @param array<Constraint>|array<string,mixed>|Constraint|null $constraints
31-
* @param string[]|null $groups
30+
* @param array<Constraint>|Constraint|null $constraints
31+
* @param string[]|null $groups
3232
*/
3333
#[HasNamedArguments]
3434
public function __construct(mixed $constraints = null, ?array $groups = null, mixed $payload = null)

src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ class AtLeastOneOf extends Composite
3535
public bool $includeInternalMessages = true;
3636

3737
/**
38-
* @param array<Constraint>|array<string,mixed>|null $constraints An array of validation constraints
39-
* @param string[]|null $groups
40-
* @param string|null $message Intro of the failure message that will be followed by the failed constraint(s) message(s)
41-
* @param string|null $messageCollection Failure message for All and Collection inner constraints
42-
* @param bool|null $includeInternalMessages Whether to include inner constraint messages (defaults to true)
38+
* @param array<Constraint>|null $constraints An array of validation constraints
39+
* @param string[]|null $groups
40+
* @param string|null $message Intro of the failure message that will be followed by the failed constraint(s) message(s)
41+
* @param string|null $messageCollection Failure message for All and Collection inner constraints
42+
* @param bool|null $includeInternalMessages Whether to include inner constraint messages (defaults to true)
4343
*/
4444
#[HasNamedArguments]
4545
public function __construct(mixed $constraints = null, ?array $groups = null, mixed $payload = null, ?string $message = null, ?string $messageCollection = null, ?bool $includeInternalMessages = null)

src/Symfony/Component/Validator/Constraints/Bic.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class Bic extends Constraint
6565
public string $mode = self::VALIDATION_MODE_STRICT;
6666

6767
/**
68-
* @param array<string,mixed>|null $options
6968
* @param string|null $iban An IBAN value to validate that its country code is the same as the BIC's one
7069
* @param string|null $ibanPropertyPath Property path to the IBAN value when validating objects
7170
* @param string[]|null $groups

src/Symfony/Component/Validator/Constraints/Blank.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ class Blank extends Constraint
3131
public string $message = 'This value should be blank.';
3232

3333
/**
34-
* @param array<string,mixed>|null $options
35-
* @param string[]|null $groups
34+
* @param string[]|null $groups
3635
*/
3736
#[HasNamedArguments]
3837
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null)

src/Symfony/Component/Validator/Constraints/Callback.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class Callback extends Constraint
2828
public $callback;
2929

3030
/**
31-
* @param string|string[]|callable|array<string,mixed>|null $callback The callback definition
32-
* @param string[]|null $groups
31+
* @param string|string[]|callable|null $callback The callback definition
32+
* @param string[]|null $groups
3333
*/
3434
#[HasNamedArguments]
3535
public function __construct(array|string|callable|null $callback = null, ?array $groups = null, mixed $payload = null, ?array $options = null)

src/Symfony/Component/Validator/Constraints/CardScheme.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ class CardScheme extends Constraint
4949
public array|string|null $schemes = null;
5050

5151
/**
52-
* @param non-empty-string|non-empty-string[]|array<string,mixed>|null $schemes Name(s) of the number scheme(s) used to validate the credit card number
53-
* @param string[]|null $groups
54-
* @param array<string,mixed>|null $options
52+
* @param non-empty-string|non-empty-string[]|null $schemes Name(s) of the number scheme(s) used to validate the credit card number
53+
* @param string[]|null $groups
5554
*/
5655
#[HasNamedArguments]
5756
public function __construct(array|string|null $schemes, ?string $message = null, ?array $groups = null, mixed $payload = null, ?array $options = null)

src/Symfony/Component/Validator/Constraints/Cascade.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ class Cascade extends Constraint
2626
public array $exclude = [];
2727

2828
/**
29-
* @param non-empty-string[]|non-empty-string|array<string,mixed>|null $exclude Properties excluded from validation
30-
* @param array<string,mixed>|null $options
29+
* @param non-empty-string[]|non-empty-string|null $exclude Properties excluded from validation
3130
*/
3231
#[HasNamedArguments]
3332
public function __construct(array|string|null $exclude = null, ?array $options = null)

src/Symfony/Component/Validator/Constraints/Collection.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class Collection extends Composite
3838
public string $missingFieldsMessage = 'This field is missing.';
3939

4040
/**
41-
* @param array<string,Constraint>|array<string,mixed>|null $fields An associative array defining keys in the collection and their constraints
42-
* @param string[]|null $groups
43-
* @param bool|null $allowExtraFields Whether to allow additional keys not declared in the configured fields (defaults to false)
44-
* @param bool|null $allowMissingFields Whether to allow the collection to lack some fields declared in the configured fields (defaults to false)
41+
* @param array<string,Constraint>|null $fields An associative array defining keys in the collection and their constraints
42+
* @param string[]|null $groups
43+
* @param bool|null $allowExtraFields Whether to allow additional keys not declared in the configured fields (defaults to false)
44+
* @param bool|null $allowMissingFields Whether to allow the collection to lack some fields declared in the configured fields (defaults to false)
4545
*/
4646
#[HasNamedArguments]
4747
public function __construct(mixed $fields = null, ?array $groups = null, mixed $payload = null, ?bool $allowExtraFields = null, ?bool $allowMissingFields = null, ?string $extraFieldsMessage = null, ?string $missingFieldsMessage = null)

0 commit comments

Comments
 (0)