Skip to content

Commit 7cb823a

Browse files
committed
minor symfony#28811 Remove usage of sf2 when possible (fabpot)
This PR was merged into the 4.2-dev branch. Discussion ---------- Remove usage of sf2 when possible | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a I've not removed all `sf2` occurrences as I've kept the ones that would introduce a BC break. Commits ------- 8406ee8 removed usage of sf2 when possible
2 parents 620094a + 8406ee8 commit 7cb823a

File tree

17 files changed

+24
-24
lines changed

17 files changed

+24
-24
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp()
3333
{
3434
$this->fs = new Filesystem();
3535
$this->kernel = new TestAppKernel('test', true);
36-
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf2_cache_', true);
36+
$this->rootDir = sys_get_temp_dir().\DIRECTORY_SEPARATOR.uniqid('sf_cache_', true);
3737
$this->kernel->setRootDir($this->rootDir);
3838
$this->fs->mkdir($this->rootDir);
3939
}

src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testDebugDefaultRootDirectory()
6868
{
6969
$this->fs->remove($this->translationDir);
7070
$this->fs = new Filesystem();
71-
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
71+
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
7272
$this->fs->mkdir($this->translationDir.'/translations');
7373
$this->fs->mkdir($this->translationDir.'/templates');
7474

@@ -112,7 +112,7 @@ public function testDebugInvalidDirectory()
112112
protected function setUp()
113113
{
114114
$this->fs = new Filesystem();
115-
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
115+
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
116116
$this->fs->mkdir($this->translationDir.'/Resources/translations');
117117
$this->fs->mkdir($this->translationDir.'/Resources/views');
118118
$this->fs->mkdir($this->translationDir.'/translations');

src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testDumpMessagesAndClean()
3434
public function testDumpMessagesAndCleanInRootDirectory()
3535
{
3636
$this->fs->remove($this->translationDir);
37-
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
37+
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
3838
$this->fs->mkdir($this->translationDir.'/translations');
3939
$this->fs->mkdir($this->translationDir.'/templates');
4040

@@ -71,7 +71,7 @@ public function testWriteMessages()
7171
public function testWriteMessagesInRootDirectory()
7272
{
7373
$this->fs->remove($this->translationDir);
74-
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
74+
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
7575
$this->fs->mkdir($this->translationDir.'/translations');
7676
$this->fs->mkdir($this->translationDir.'/templates');
7777

@@ -90,7 +90,7 @@ public function testWriteMessagesForSpecificDomain()
9090
protected function setUp()
9191
{
9292
$this->fs = new Filesystem();
93-
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
93+
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
9494
$this->fs->mkdir($this->translationDir.'/Resources/translations');
9595
$this->fs->mkdir($this->translationDir.'/Resources/views');
9696
$this->fs->mkdir($this->translationDir.'/translations');

src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TranslatorTest extends TestCase
2424

2525
protected function setUp()
2626
{
27-
$this->tmpDir = sys_get_temp_dir().'/sf2_translation';
27+
$this->tmpDir = sys_get_temp_dir().'/sf_translation';
2828
$this->deleteTmpDir();
2929
}
3030

src/Symfony/Component/Form/Tests/CompoundFormTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public function requestMethodProvider()
595595
*/
596596
public function testSubmitPostOrPutRequest($method)
597597
{
598-
$path = tempnam(sys_get_temp_dir(), 'sf2');
598+
$path = tempnam(sys_get_temp_dir(), 'sf');
599599
touch($path);
600600
file_put_contents($path, 'zaza');
601601
$values = array(
@@ -643,7 +643,7 @@ public function testSubmitPostOrPutRequest($method)
643643
*/
644644
public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
645645
{
646-
$path = tempnam(sys_get_temp_dir(), 'sf2');
646+
$path = tempnam(sys_get_temp_dir(), 'sf');
647647
touch($path);
648648
file_put_contents($path, 'zaza');
649649

@@ -691,7 +691,7 @@ public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
691691
*/
692692
public function testSubmitPostOrPutRequestWithSingleChildForm($method)
693693
{
694-
$path = tempnam(sys_get_temp_dir(), 'sf2');
694+
$path = tempnam(sys_get_temp_dir(), 'sf');
695695
touch($path);
696696
file_put_contents($path, 'zaza');
697697

@@ -728,7 +728,7 @@ public function testSubmitPostOrPutRequestWithSingleChildForm($method)
728728
*/
729729
public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
730730
{
731-
$path = tempnam(sys_get_temp_dir(), 'sf2');
731+
$path = tempnam(sys_get_temp_dir(), 'sf');
732732
touch($path);
733733
file_put_contents($path, 'zaza');
734734

src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function setUp()
4545
),
4646
),
4747
);
48-
$this->bag = new AttributeBag('_sf2');
48+
$this->bag = new AttributeBag('_sf');
4949
$this->bag->initialize($this->array);
5050
}
5151

@@ -67,7 +67,7 @@ public function testInitialize()
6767

6868
public function testGetStorageKey()
6969
{
70-
$this->assertEquals('_sf2', $this->bag->getStorageKey());
70+
$this->assertEquals('_sf', $this->bag->getStorageKey());
7171
$attributeBag = new AttributeBag('test');
7272
$this->assertEquals('test', $attributeBag->getStorageKey());
7373
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function setUp()
4545
'data_field' => 'data',
4646
'time_field' => 'time',
4747
'expiry_field' => 'expires_at',
48-
'database' => 'sf2-test',
48+
'database' => 'sf-test',
4949
'collection' => 'session-test',
5050
);
5151

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function tearDown()
3333

3434
protected function getPersistentSqliteDsn()
3535
{
36-
$this->dbFile = tempnam(sys_get_temp_dir(), 'sf2_sqlite_sessions');
36+
$this->dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_sessions');
3737

3838
return 'sqlite:'.$this->dbFile;
3939
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MockFileSessionStorageTest extends TestCase
3535

3636
protected function setUp()
3737
{
38-
$this->sessionDir = sys_get_temp_dir().'/sf2test';
38+
$this->sessionDir = sys_get_temp_dir().'/sftest';
3939
$this->storage = $this->getStorage();
4040
}
4141

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class NativeSessionStorageTest extends TestCase
3636
protected function setUp()
3737
{
3838
$this->iniSet('session.save_handler', 'files');
39-
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test');
39+
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
4040
if (!is_dir($this->savePath)) {
4141
mkdir($this->savePath);
4242
}

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PhpBridgeSessionStorageTest extends TestCase
3232
protected function setUp()
3333
{
3434
$this->iniSet('session.save_handler', 'files');
35-
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sf2test');
35+
$this->iniSet('session.save_path', $this->savePath = sys_get_temp_dir().'/sftest');
3636
if (!is_dir($this->savePath)) {
3737
mkdir($this->savePath);
3838
}

src/Symfony/Component/HttpKernel/Tests/CacheClearer/ChainCacheClearerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ChainCacheClearerTest extends TestCase
2020

2121
public static function setUpBeforeClass()
2222
{
23-
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_clearer_dir');
23+
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_clearer_dir');
2424
}
2525

2626
public static function tearDownAfterClass()

src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CacheWarmerAggregateTest extends TestCase
2020

2121
public static function setUpBeforeClass()
2222
{
23-
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir');
23+
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
2424
}
2525

2626
public static function tearDownAfterClass()

src/Symfony/Component/HttpKernel/Tests/CacheWarmer/CacheWarmerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class CacheWarmerTest extends TestCase
2020

2121
public static function setUpBeforeClass()
2222
{
23-
self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf2_cache_warmer_dir');
23+
self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
2424
}
2525

2626
public static function tearDownAfterClass()

src/Symfony/Component/HttpKernel/Tests/Profiler/FileProfilerStorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class FileProfilerStorageTest extends TestCase
2222

2323
protected function setUp()
2424
{
25-
$this->tmpDir = sys_get_temp_dir().'/sf2_profiler_file_storage';
25+
$this->tmpDir = sys_get_temp_dir().'/sf_profiler_file_storage';
2626
if (is_dir($this->tmpDir)) {
2727
self::cleanDir();
2828
}

src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testFindWorksWithStatusCode()
8484

8585
protected function setUp()
8686
{
87-
$this->tmp = tempnam(sys_get_temp_dir(), 'sf2_profiler');
87+
$this->tmp = tempnam(sys_get_temp_dir(), 'sf_profiler');
8888
if (file_exists($this->tmp)) {
8989
@unlink($this->tmp);
9090
}

src/Symfony/Component/Translation/Tests/TranslatorCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class TranslatorCacheTest extends TestCase
2424

2525
protected function setUp()
2626
{
27-
$this->tmpDir = sys_get_temp_dir().'/sf2_translation';
27+
$this->tmpDir = sys_get_temp_dir().'/sf_translation';
2828
$this->deleteTmpDir();
2929
}
3030

0 commit comments

Comments
 (0)