From 0c08432a3dfb355ca573ec871f203c377d38b892 Mon Sep 17 00:00:00 2001 From: Nyholm Date: Tue, 13 Oct 2020 21:49:43 +0200 Subject: [PATCH] [CI] Fixed build on AppVeyor --- src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php | 2 +- .../FrameworkBundle/Tests/Command/XliffLintCommandTest.php | 4 ++-- .../FrameworkBundle/Tests/Command/YamlLintCommandTest.php | 4 ++-- src/Symfony/Component/Config/Tests/ConfigCacheTest.php | 2 +- .../Config/Tests/Resource/FileExistenceResourceTest.php | 2 +- .../Component/Config/Tests/Resource/FileResourceTest.php | 6 ++---- .../Config/Tests/ResourceCheckerConfigCacheTest.php | 2 +- src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php | 4 ++-- .../Tests/Session/Storage/MockFileSessionStorageTest.php | 2 +- .../Tests/Session/Storage/NativeSessionStorageTest.php | 2 +- .../Tests/Session/Storage/PhpBridgeSessionStorageTest.php | 2 +- .../Doctrine/Tests/Transport/DoctrineIntegrationTest.php | 2 +- src/Symfony/Component/Routing/Tests/RouterTest.php | 2 +- .../Translation/Tests/Command/XliffLintCommandTest.php | 4 ++-- .../Validator/Tests/Constraints/FileValidatorTest.php | 2 +- .../Component/Yaml/Tests/Command/LintCommandTest.php | 4 ++-- 16 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php index f2789542ff551..09e8352faeccf 100644 --- a/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Command/LintCommandTest.php @@ -142,7 +142,7 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php index 7d6783d9352c0..9d786f2935776 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/XliffLintCommandTest.php @@ -121,9 +121,9 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/xliff-lint-test'); + @rmdir(sys_get_temp_dir().'/xliff-lint-test'); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php index af81f335e3cdb..29947983f42af 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php @@ -168,9 +168,9 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/yml-lint-test'); + @rmdir(sys_get_temp_dir().'/yml-lint-test'); } } diff --git a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php index 946c66fd1d83d..cfb2403a82a6c 100644 --- a/src/Symfony/Component/Config/Tests/ConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ConfigCacheTest.php @@ -30,7 +30,7 @@ protected function tearDown(): void foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php index 6b43a58bdabbb..c450ff172c0ad 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php @@ -30,7 +30,7 @@ protected function setUp(): void protected function tearDown(): void { if (file_exists($this->file)) { - unlink($this->file); + @unlink($this->file); } } diff --git a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php index e3a45566c2617..9b619a0fe6630 100644 --- a/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php +++ b/src/Symfony/Component/Config/Tests/Resource/FileResourceTest.php @@ -30,11 +30,9 @@ protected function setUp(): void protected function tearDown(): void { - if (!file_exists($this->file)) { - return; + if (file_exists($this->file)) { + @unlink($this->file); } - - unlink($this->file); } public function testGetResource() diff --git a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php index a7498760a8a3e..8e0a2b32ba069 100644 --- a/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php +++ b/src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php @@ -31,7 +31,7 @@ protected function tearDown(): void foreach ($files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php index ec6ae402481fa..69983ede49c58 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/FileBagTest.php @@ -168,9 +168,9 @@ protected function setUp(): void protected function tearDown(): void { foreach (glob(sys_get_temp_dir().'/form_test/*') as $file) { - unlink($file); + @unlink($file); } - rmdir(sys_get_temp_dir().'/form_test'); + @rmdir(sys_get_temp_dir().'/form_test'); } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php index 9eb8e89b1af3f..2ca81fed8f70a 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/MockFileSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown(): void { array_map('unlink', glob($this->sessionDir.'/*')); if (is_dir($this->sessionDir)) { - rmdir($this->sessionDir); + @rmdir($this->sessionDir); } $this->sessionDir = null; $this->storage = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index 4f7b37b1f3040..709bef36b9e58 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -47,7 +47,7 @@ protected function tearDown(): void session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php index 472456b7204f2..c0c667545243b 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php @@ -43,7 +43,7 @@ protected function tearDown(): void session_write_close(); array_map('unlink', glob($this->savePath.'/*')); if (is_dir($this->savePath)) { - rmdir($this->savePath); + @rmdir($this->savePath); } $this->savePath = null; diff --git a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php index 106a05b5b6767..e9bdee862ebe7 100644 --- a/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php +++ b/src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php @@ -50,7 +50,7 @@ protected function tearDown(): void { $this->driverConnection->close(); if (file_exists($this->sqliteFile)) { - unlink($this->sqliteFile); + @unlink($this->sqliteFile); } } diff --git a/src/Symfony/Component/Routing/Tests/RouterTest.php b/src/Symfony/Component/Routing/Tests/RouterTest.php index 3c07802f0025c..2568bcd7b51cc 100644 --- a/src/Symfony/Component/Routing/Tests/RouterTest.php +++ b/src/Symfony/Component/Routing/Tests/RouterTest.php @@ -36,7 +36,7 @@ protected function tearDown(): void { if (is_dir($this->cacheDir)) { array_map('unlink', glob($this->cacheDir.\DIRECTORY_SEPARATOR.'*')); - rmdir($this->cacheDir); + @rmdir($this->cacheDir); } $this->loader = null; diff --git a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php index 272ee15adc198..d9801a8fa14f0 100644 --- a/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php +++ b/src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php @@ -179,10 +179,10 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/translation-xliff-lint-test'); + @rmdir(sys_get_temp_dir().'/translation-xliff-lint-test'); } public function provideStrictFilenames() diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index f517baea8736a..ee0798f611dc6 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -45,7 +45,7 @@ protected function tearDown(): void } if (file_exists($this->path)) { - unlink($this->path); + @unlink($this->path); } $this->path = null; diff --git a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php index 0727b863536e9..32dd30d495a84 100644 --- a/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php +++ b/src/Symfony/Component/Yaml/Tests/Command/LintCommandTest.php @@ -129,11 +129,11 @@ protected function tearDown(): void { foreach ($this->files as $file) { if (file_exists($file)) { - unlink($file); + @unlink($file); } } - rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); + @rmdir(sys_get_temp_dir().'/framework-yml-lint-test'); } }