8000 minor #38556 [CI] Fixed build on AppVeyor (Nyholm) · symfony/symfony@268e9e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 268e9e3

Browse files
committed
minor #38556 [CI] Fixed build on AppVeyor (Nyholm)
This PR was submitted for the 5.x branch but it was squashed and merged into the 5.1 branch instead. Discussion ---------- [CI] Fixed build on AppVeyor | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | | New feature? | | Deprecations? | | Tickets | | License | MIT | Doc PR | CI fails on AppVeyor with: > There was 1 error: >1) Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest::testBaselineFileWriteError unlink(C:\Users\appveyor\AppData\Local\Temp\1\sf-38AF.tmp): Permission denied >C:\projects\symfony\src\Symfony\Bridge\PhpUnit\Tests\DeprecationErrorHandler\ConfigurationTest.php:404 ERRORS! We dont need to fail the tests if we cannot remove a file on `tearDown()` Commits ------- 0c08432 [CI] Fixed build on AppVeyor
2 parents e9d2367 + 0c08432 commit 268e9e3

File tree

16 files changed

+22
-24
lines changed

16 files changed

+22
-24
lines changed

src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function tearDown(): void
142142
{
143143
foreach ($this->files as $file) {
144144
if (file_exists($file)) {
145-
unlink($file);
145+
@unlink($file);
146146
}
147147
}
148148
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ protected function tearDown(): void
121121
{
122122
foreach ($this->files as $file) {
123123
if (file_exists($file)) {
124-
unlink($file);
124+
@unlink($file);
125125
}
126126
}
127-
rmdir(sys_get_temp_dir().'/xliff-lint-test');
127+
@rmdir(sys_get_temp_dir().'/xliff-lint-test');
128128
}
129129
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ protected function tearDown(): void
168168
{
169169
foreach ($this->files as $file) {
170170
if (file_exists($file)) {
171-
unlink($file);
171+
@unlink($file);
172172
}
173173
}
174-
rmdir(sys_get_temp_dir().'/yml-lint-test');
174+
@rmdir(sys_get_temp_dir().'/yml-lint-test');
175175
}
176176
}

src/Symfony/Component/Config/Tests/ConfigCacheTest.php

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

3131
foreach ($files as $file) {
3232
if (file_exists($file)) {
33-
unlink($file);
33+
@unlink($file);
3434
}
3535
}
3636
}

src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected function setUp(): void
3030
protected function tearDown(): void
3131
{
3232
if (file_exists($this->file)) {
33-
unlink($this->file);
33+
@unlink($this->file);
3434
}
3535
}
3636

src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ protected function setUp(): void
3030

3131
protected function tearDown(): void
3232
{
33-
if (!file_exists($this->file)) {
34-
return;
33+
if (file_exists($this->file)) {
34+
@unlink($this->file);
3535
}
< F438 /code>
36-
37-
unlink($this->file);
3836
}
3937

4038
public function testGetResource()

src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php

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

3232
foreach ($files as $file) {
3333
if (file_exists($file)) {
34-
unlink($file);
34+
@unlink($file);
3535
}
3636
}
3737
}

src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ protected function setUp(): void
168168
protected function tearDown(): void
169169
{
170170
foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) {
171-
unlink($file);
171+
@unlink($file);
172172
}
173173

174-
rmdir(sys_get_temp_dir().'/form_test');
174+
@rmdir(sys_get_temp_dir().'/form_test');
175175
}
176176
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function tearDown(): void
4343
{
4444
array_map('unlink', glob($this->sessionDir.'/*'));
4545
if (is_dir($this->sessionDir)) {
46-
rmdir($this->sessionDir);
46+
@rmdir($this->sessionDir);
4747
}
4848
$this->sessionDir = null;
4949
$this->storage = null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function tearDown(): void
4747
session_write_close();
4848
array_map('unlink', glob($this->savePath.'/*'));
4949
if (is_dir($this->savePath)) {
50-
rmdir($this->savePath);
50+
@rmdir($this->savePath);
5151
}
5252

5353
$this->savePath = null;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function tearDown(): void
4343
session_write_close();
4444
array_map('unlink', glob($this->savePath.'/*'));
4545
if (is_dir($this->savePath)) {
46-
rmdir($this->savePath);
46+
@rmdir($this->savePath);
4747
}
4848

4949
$this->savePath = null;

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function tearDown(): void
5050
{
5151
$this->driverConnection->close();
5252
if (file_exists($this->sqliteFile)) {
53-
unlink($this->sqliteFile);
53+
@unlink($this->sqliteFile);
5454
}
5555
}
5656

src/Symfony/Component/Routing/Tests/RouterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function tearDown(): void
3636
{
3737
if (is_dir($this->cacheDir)) {
3838
array_map('unlink', glob($this->cacheDir.\DIRECTORY_SEPARATOR.'*'));
39-
rmdir($this->cacheDir);
39+
@rmdir($this->cacheDir);
4040
}
4141

4242
$this->loader = null;

src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ protected function tearDown(): void
179179
{
180180
foreach ($this->files as $file) {
181181
if (file_exists($file)) {
182-
unlink($file);
182+
@unlink($file);
183183 1241
}
184184
}
185-
rmdir(sys_get_temp_dir().'/translation-xliff-lint-test');
185+
@rmdir(sys_get_temp_dir().'/translation-xliff-lint-test');
186186
}
187187

188188
public function provideStrictFilenames()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function tearDown(): void
4545
}
4646

4747
if (file_exists($this->path)) {
48-
unlink($this->path);
48+
@unlink($this->path);
4949
}
5050

5151
$this->path = null;

src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ protected function tearDown(): void
129129
{
130130
foreach ($this->files as $file) {
131131
if (file_exists($file)) {
132-
unlink($file);
132+
@unlink($file);
133133
}
134134
}
135135

136-
rmdir(sys_get_temp_dir().'/framework-yml-lint-test');
136+
@rmdir(sys_get_temp_dir().'/framework-yml-lint-test');
137137
}
138138
}
139139

0 commit comments

Comments
 (0)
0