Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16d82cc

Browse files
Merge branch '6.2' into 6.3
* 6.2: Fix merge
2 parents 1851e89 + 54f3618 commit 16d82cc

File tree

6 files changed

+30
-23
lines changed

6 files changed

+30
-23
lines changed

src/Symfony/Bridge/Monolog/Tests/Handler/FirePHPHandlerTest.php

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,6 @@
2323

2424
class FirePHPHandlerTest extends TestCase
2525
{
26-
public function testOnKernelResponseShouldNotTriggerDeprecation()
27-
{
28-
$request = Request::create('/');
29-
$request->headers->remove('User-Agent');
30-
31-
$response = new Response('foo');
32-
$event = new ResponseEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST, $response);
33-
34-
$error = null;
35-
set_error_handler(function ($type, $message) use (&$error) { $error = $message; }, \E_DEPRECATED);
36-
37-
$listener = new FirePHPHandler();
38-
$listener->onKernelResponse($event);
39-
restore_error_handler();
40-
41-
$this->assertNull($error);
42-
}
43-
4426
public function testLogHandling()
4527
{
4628
$handler = $this->createHandler();
@@ -130,6 +112,22 @@ private function createHandler(): FirePHPHandler
130112
return $handler;
131113
}
132114

115+
public function testOnKernelResponseShouldNotTriggerDeprecation()
116+
{
117+
$handler = $this->createHandler();
118+
119+
$request = Request::create('/');
120+
$request->headers->remove('User-Agent');
121+
122+
$error = null;
123+
set_error_handler(function ($type, $message) use (&$error) { $error = $message; }, \E_DEPRECATED);
124+
125+
$this->dispatchResponseEvent($handler, $request);
126+
restore_error_handler();
127+
128+
$this->assertNull($error);
129+
}
130+
133131
private function dispatchResponseEvent(FirePHPHandler $handler, Request $request): Response
134132
{
135133
$dispatcher = new EventDispatcher();

src/Symfony/Bundle/SecurityBundle/Tests/SecurityTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function testLogin()
141141
->willReturnMap([
142142
['request_stack', $requestStack],
143143
['security.firewall.map', $firewallMap],
144-
['security.authenticator.managers_locator', new ServiceLocator(['main' => fn () => $userAuthenticator])],
144+
['security.authenticator.managers_locator', $this->createContainer('main', $userAuthenticator)],
145145
['security.user_checker', $userChecker],
146146
])
147147
;
@@ -187,7 +187,7 @@ public function testLoginReturnsAuthenticatorResponse()
187187
->willReturnMap([
188188
['request_stack', $requestStack],
189189
['security.firewall.map', $firewallMap],
190-
['security.user_authenticator', $userAuthenticator],
190+
['security.authenticator.managers_locator', $this->createContainer('main', $userAuthenticator)],
191191
['security.user_checker', $userChecker],
192192
])
193193
;

src/Symfony/Component/Cache/Tests/Messenger/EarlyExpirationHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function testHandle()
3939
$item->set(234);
4040

4141
$computationService = new class() implements CallbackInterface {
42-
public function __invoke(CacheItemInterface $item, bool &$save)
42+
public function __invoke(CacheItemInterface $item, bool &$save): mixed
4343
{
4444
usleep(30000);
4545
$item->expiresAfter(3600);

src/Symfony/Component/Console/Output/ConsoleSectionOutput.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ public function addContent(string $input, bool $newline = true): int
154154
return $linesAdded;
155155
}
156156

157+
/**
158+
* @internal
159+
*/
160+
public function addNewLineOfInputSubmit(): void
161+
{
162+
$this->content[] = \PHP_EOL;
163+
++$this->lines;
164+
}
165+
157166
/**
158167
* @return void
159168
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(string $defaultMode = Email::VALIDATION_MODE_LOOSE)
4545
}
4646

4747
if (Email::VALIDATION_MODE_LOOSE === $defaultMode) {
48-
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. The default mode will be changed to "%s" in 7.0.', Email::VALIDATION_MODE_LOOSE, Email::VALIDATION_MODE_HTML5);
48+
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. It will be removed in 7.0 and the default mode will be changed to "%s".', Email::VALIDATION_MODE_LOOSE, Email::VALIDATION_MODE_HTML5);
4949
}
5050

5151
$this->defaultMode = $defaultMode;

src/Symfony/Component/Validator/Tests/Constraints/EmailValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public function testModeHtml5AllowNoTld()
298298
*/
299299
public function testModeLoose()
300300
{
301-
$this->expectDeprecation('Since symfony/validator 6.2: The "loose" mode is deprecated. The default mode will be changed to "html5" in 7.0.');
301+
$this->expectDeprecation('Since symfony/validator 6.2: The "loose" mode is deprecated. It will be removed in 7.0 and the default mode will be changed to "html5".');
302302

303303
$constraint = new Email(['mode' => Email::VALIDATION_MODE_LOOSE]);
304304

0 commit comments

Comments
 (0)