8000 use more entropy with uniqid() · symfony/symfony@770e7fc · GitHub
[go: up one dir, main page]

Skip to content

Commit 770e7fc

Browse files
committed
use more entropy with uniqid()
1 parent bc88da6 commit 770e7fc

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/log_file.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Test DeprecationErrorHandler with log file
33
--FILE--
44
<?php
5-
$filename = tempnam(sys_get_temp_dir(), 'sf-').uniqid();
5+
$filename = tempnam(sys_get_temp_dir(), 'sf-').uniqid('', true);
66
$k = 'SYMFONY_DEPRECATIONS_HELPER';
77
putenv($k.'='.$_SERVER[$k] = $_ENV[$k] = 'logFile='.$filename);
88
putenv('ANSICON');

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AnnotationsCacheWarmerTest extends TestCase
2828

2929
protected function setUp(): void
3030
{
31-
$this->cacheDir = sys_get_temp_dir().'/'.uniqid();
31+
$this->cacheDir = sys_get_temp_dir().'/'.uniqid('', true);
3232
$fs = new Filesystem();
3333
$fs->mkdir($this->cacheDir);
3434
parent::setUp();

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ConfigBuilderCacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ConfigBuilderCacheWarmerTest extends TestCase
3636

3737
protected function setUp(): void
3838
{
39-
$this->varDir = sys_get_temp_dir().'/'.uniqid();
39+
$this->varDir = sys_get_temp_dir().'/'.uniqid('', true);
4040
$fs = new Filesystem();
4141
$fs->mkdir($this->varDir);
4242
}

src/Symfony/Component/Notifier/Bridge/Iqsms/IqsmsTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function doSend(MessageInterface $message): SentMessage
6464
'phone' => $message->getPhone(),
6565
'text' => $message->getSubject(),
6666
'sender' => $this->from,
67-
'clientId' => uniqid(),
67+
'clientId' => uniqid('', true),
6868
],
6969
],
7070
'login' => $this->login,

src/Symfony/Component/Routing/Tests/Matcher/Dumper/CompiledUrlMatcherDumperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp(): void
3333
{
3434
parent::setUp();
3535

36-
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_matcher.'.uniqid('CompiledUrlMatcher').'.php';
36+
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_matcher.'.uniqid('CompiledUrlMatcher', true).'.php';
3737
}
3838

3939
protected function tearDown(): void

src/Symfony/Component/Serializer/Tests/Mapping/Factory/ClassMetadataFactoryCompilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class ClassMetadataFactoryCompilerTest extends TestCase
2929

3030
protected function setUp(): void
3131
{
32-
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_serializer_metadata.'.uniqid('CompiledClassMetadataFactory').'.php';
32+
$this->dumpPath = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'php_serializer_metadata.'.uniqid('CompiledClassMetadataFactory', true).'.php';
3333
}
3434

3535
protected function tearDown(): void

0 commit comments

Comments
 (0)
0