Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f49cc11

Browse filesBrowse files
committed
Merge branch '2.7' into 2.8
* 2.7: [Security] Fix wrong term in UserProviderInterface [HttpFoundation] Set meta refresh time to 0 in RedirectResponse content [Security] validate empty passwords again [DI] Remove irrelevant comment from container [TwigBridge] cleaner implementation of the TwigRenderer
2 parents a187a32 + 559ccb2 commit f49cc11
Copy full SHA for f49cc11

File tree

Expand file treeCollapse file tree

7 files changed

+40
-22
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+40
-22
lines changed

‎src/Symfony/Bridge/Twig/Form/TwigRenderer.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Form/TwigRenderer.php
+10-7Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,26 @@
1919
*/
2020
class TwigRenderer extends FormRenderer implements TwigRendererInterface
2121
{
22-
/**
23-
* @var TwigRendererEngineInterface
24-
*/
25-
private $engine;
26-
2722
public function __construct(TwigRendererEngineInterface $engine, $csrfTokenManager = null)
2823
{
2924
parent::__construct($engine, $csrfTokenManager);
25+
}
3026

31-
$this->engine = $engine;
27+
/**
28+
* Returns the engine used by this renderer.
29+
*
30+
* @return TwigRendererEngineInterface The renderer engine
31+
*/
32+
public function getEngine()
33+
{
34+
return parent::getEngine();
3235
}
3336

3437
/**
3538
* {@inheritdoc}
3639
*/
3740
public function setEnvironment(Environment $environment)
3841
{
39-
$this->engine->setEnvironment($environment);
42+
$this->getEngine()->setEnvironment($environment);
4043
}
4144
}

‎src/Symfony/Component/DependencyInjection/Container.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Container.php
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,6 @@
3030
*
3131
* Parameter and service keys are case insensitive.
3232
*
33-
* A service id can contain lowercased letters, digits, underscores, and dots.
34-
* Underscores are used to separate words, and dots to group services
35-
* under namespaces:
36-
*
37-
* <ul>
38-
* <li>request</li>
39-
* <li>mysql_session_storage</li>
40-
* <li>symfony.mysql_session_storage</li>
41-
* </ul>
42-
*
4333
* A service can also be defined by creating a method named
4434
* getXXXService(), where XXX is the camelized version of the id:
4535
*

‎src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public function testGetServiceIds()
134134
public function testSet()
135135
{
136136
$sc = new Container();
137-
$sc->set('foo', $foo = new \stdClass());
138-
$this->assertSame($foo, $sc->get('foo'), '->set() sets a service');
137+
$sc->set('._. \\o/', $foo = new \stdClass());
138+
$this->assertSame($foo, $sc->get('._. \\o/'), '->set() sets a service');
139139
}
140140

141141
public function testSetWithNullResetTheService()

‎src/Symfony/Component/HttpFoundation/RedirectResponse.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/RedirectResponse.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function setTargetUrl($url)
8383
<html>
8484
<head>
8585
<meta charset="UTF-8" />
86-
<meta http-equiv="refresh" content="1;url=%1$s" />
86+
<meta http-equiv="refresh" content="0;url=%1$s" />
8787
8888
<title>Redirecting to %1$s</title>
8989
</head>

‎src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Tests/Validator/Constraints/UserPasswordValidatorTest.php
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,29 @@ public function testPasswordIsNotValid()
9090
->assertRaised();
9191
}
9292

93+
/**
94+
* @dataProvider emptyPasswordData
95+
*/
96+
public function testEmptyPasswordsAreNotValid($password)
97+
{
98+
$constraint = new UserPassword(array(
99+
'message' => 'myMessage',
100+
));
101+
102+
$this->validator->validate($password, $constraint);
103+
104+
$this->buildViolation('myMessage')
105+
->assertRaised();
106+
}
107+
108+
public function emptyPasswordData()
109+
{
110+
return array(
111+
array(null),
112+
array(''),
113+
);
114+
}
115+
93116
/**
94117
* @expectedException \Symfony\Component\Validator\Exception\ConstraintDefinitionException
95118
*/

‎src/Symfony/Component/Security/Core/User/UserProviderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/User/UserProviderInterface.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ interface UserProviderInterface
4848
public function loadUserByUsername($username);
4949

5050
/**
51-
* Refreshes the user for the account interface.
51+
* Refreshes the user.
5252
*
5353
* It is up to the implementation to decide if the user data should be
5454
* totally reloaded (e.g. from the database), or if the UserInterface
@@ -59,7 +59,7 @@ public function loadUserByUsername($username);
5959
*
6060
* @return UserInterface
6161
*
62-
* @throws UnsupportedUserException if the account is not supported
62+
* @throws UnsupportedUserException if the user is not supported
6363
*/
6464
public function refreshUser(UserInterface $user);
6565

‎src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function validate($password, Constraint $constraint)
4040
}
4141

4242
if (null === $password || '' === $password) {
43+
$this->context->addViolation($constraint->message);
44+
4345
return;
4446
}
4547

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.