Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
d1e84f96
Unverified
Commit
d1e84f96
authored
Jun 19, 2020
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3135305
by longwave: Remove Symfony 4.1 compatibility layer from EmailConstraint
(cherry picked from commit
45447b2f
)
parent
fe25fd4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
...lidation/Plugin/Validation/Constraint/EmailConstraint.php
+1
-13
No files found.
core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
View file @
d1e84f96
...
@@ -20,19 +20,7 @@ class EmailConstraint extends Email {
...
@@ -20,19 +20,7 @@ class EmailConstraint extends Email {
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
__construct
(
$options
=
[])
{
public
function
__construct
(
$options
=
[])
{
// Since Symfony 4.1, the 'mode' property is used, for previous versions the
$options
+=
[
'mode'
=>
'strict'
];
// 'strict' property. If the 'strict' property is set,
// \Symfony\Component\Validator\Constraints\EmailValidator will trigger
// a deprecation error, so only assign a value for versions of Symfony
// < 4.2. This compatibility layer can be removed once Drupal requires
// Symfony 4.2 or higher in https://www.drupal.org/node/3009219.
if
(
property_exists
(
$this
,
'mode'
))
{
$default_options
=
[
'mode'
=>
'strict'
];
}
else
{
$default_options
=
[
'strict'
=>
TRUE
];
}
$options
+=
$default_options
;
parent
::
__construct
(
$options
);
parent
::
__construct
(
$options
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment