|
12 | 12 | namespace Symfony\Component\HttpFoundation\Tests\Session\Storage;
|
13 | 13 |
|
14 | 14 | use PHPUnit\Framework\TestCase;
|
15 |
| -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; |
| 15 | +use Symfony\Bridge\PhpUnit\ExpectUserDeprecationMessageTrait; |
16 | 16 | use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
|
17 | 17 | use Symfony\Component\HttpFoundation\Session\Flash\FlashBag;
|
18 | 18 | use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler;
|
|
33 | 33 | */
|
34 | 34 | class NativeSessionStorageTest extends TestCase
|
35 | 35 | {
|
36 |
| - use ExpectDeprecationTrait; |
| 36 | + use ExpectUserDeprecationMessageTrait; |
37 | 37 |
|
38 | 38 | private string $savePath;
|
39 | 39 |
|
@@ -224,7 +224,7 @@ public function testCacheExpireOption()
|
224 | 224 | */
|
225 | 225 | public function testTransSidTagsOption()
|
226 | 226 | {
|
227 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_tags" option is deprecated and will be ignored in Symfony 8.0.'); |
| 227 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_tags" option is deprecated and will be ignored in Symfony 8.0.'); |
228 | 228 |
|
229 | 229 | $previousErrorHandler = set_error_handler(function ($errno, $errstr) use (&$previousErrorHandler) {
|
230 | 230 | if ('ini_set(): Usage of session.trans_sid_tags INI setting is deprecated' !== $errstr) {
|
@@ -370,13 +370,13 @@ public function testSaveHandlesNullSessionGracefully()
|
370 | 370 | */
|
371 | 371 | public function testPassingDeprecatedOptions()
|
372 | 372 | {
|
373 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "sid_length" option is deprecated and will be ignored in Symfony 8.0.'); |
374 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "sid_bits_per_character" option is deprecated and will be ignored in Symfony 8.0.'); |
375 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "referer_check" option is deprecated and will be ignored in Symfony 8.0.'); |
376 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "use_only_cookies" option is deprecated and will be ignored in Symfony 8.0.'); |
377 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "use_trans_sid" option is deprecated and will be ignored in Symfony 8.0.'); |
378 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_hosts" option is deprecated and will be ignored in Symfony 8.0.'); |
379 |
| - $this->expectDeprecation('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_tags" option is deprecated and will be ignored in Symfony 8.0.'); |
| 373 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "sid_length" option is deprecated and will be ignored in Symfony 8.0.'); |
| 374 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "sid_bits_per_character" option is deprecated and will be ignored in Symfony 8.0.'); |
| 375 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "referer_check" option is deprecated and will be ignored in Symfony 8.0.'); |
| 376 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "use_only_cookies" option is deprecated and will be ignored in Symfony 8.0.'); |
| 377 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "use_trans_sid" option is deprecated and will be ignored in Symfony 8.0.'); |
| 378 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_hosts" option is deprecated and will be ignored in Symfony 8.0.'); |
| 379 | + $this->expectUserDeprecationMessage('Since symfony/http-foundation 7.2: NativeSessionStorage\'s "trans_sid_tags" option is deprecated and will be ignored in Symfony 8.0.'); |
380 | 380 |
|
381 | 381 | $this->getStorage([
|
382 | 382 | 'sid_length' => 42,
|
|
0 commit comments