From c83175653e5ad0b205011537b6c534eaa767f52d Mon Sep 17 00:00:00 2001 From: DQNEO Date: Mon, 2 Apr 2018 23:57:17 +0900 Subject: [PATCH 1/7] use namespaced PHPUnit and keep B.C. --- Psr/Log/Test/LoggerInterfaceTest.php | 6 ++++-- Psr/Log/Test/backward_compatible.php | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Psr/Log/Test/backward_compatible.php diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index a0391a5..267baeb 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -1,9 +1,11 @@ Date: Tue, 3 Apr 2018 00:09:34 +0900 Subject: [PATCH 2/7] avoid side effect --- Psr/Log/Test/LoggerInterfaceTest.php | 4 +++- Psr/Log/Test/backward_compatible.php | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 Psr/Log/Test/backward_compatible.php diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 267baeb..86c7612 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -1,7 +1,9 @@ Date: Tue, 3 Apr 2018 00:19:47 +0900 Subject: [PATCH 3/7] fix white space --- Psr/Log/Test/LoggerInterfaceTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 86c7612..48f106d 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -1,4 +1,5 @@ Date: Wed, 4 Apr 2018 01:26:41 +0900 Subject: [PATCH 4/7] make alias when new class does not exist --- Psr/Log/Test/LoggerInterfaceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 48f106d..0d9433f 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -2,7 +2,7 @@ namespace Psr\Log\Test; -if (!class_exists('\\PHPUnit_Framework_TestCase', true)) { +if (!class_exists('\\PHPUnit\\Framework\\TestCase', true)) { class_alias('\\PHPUnit\\Framework\\TestCase', '\\PHPUnit_Framework_TestCase'); } From 2d7be5c62f2b3da3e2d9ec6b318e9d8c7ee74ce8 Mon Sep 17 00:00:00 2001 From: DQNEO Date: Wed, 4 Apr 2018 01:27:56 +0900 Subject: [PATCH 5/7] make alias from old one --- Psr/Log/Test/LoggerInterfaceTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 0d9433f..41a00f4 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -3,7 +3,7 @@ namespace Psr\Log\Test; if (!class_exists('\\PHPUnit\\Framework\\TestCase', true)) { - class_alias('\\PHPUnit\\Framework\\TestCase', '\\PHPUnit_Framework_TestCase'); + class_alias('\\PHPUnit_Framework_TestCase', '\\PHPUnit\\Framework\\TestCase'); } use Psr\Log\LoggerInterface; From e50f69c5f393e42e21aff1d0c7844184e67c4772 Mon Sep 17 00:00:00 2001 From: DQNEO Date: Sat, 24 Aug 2019 13:46:13 +0900 Subject: [PATCH 6/7] Remove redundant leading backslashes --- Psr/Log/Test/LoggerInterfaceTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 41a00f4..38b07e0 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -2,8 +2,8 @@ namespace Psr\Log\Test; -if (!class_exists('\\PHPUnit\\Framework\\TestCase', true)) { - class_alias('\\PHPUnit_Framework_TestCase', '\\PHPUnit\\Framework\\TestCase'); +if (!class_exists('PHPUnit\\Framework\\TestCase', true)) { + class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase'); } use Psr\Log\LoggerInterface; From bb2d0b3bee38231679beef0d2c8a67ff268403a9 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 25 Oct 2019 10:06:28 +0200 Subject: [PATCH 7/7] Remove alias as PHPUnit 4.8.35+ ships with it which is supporting PHP 5.3 --- Psr/Log/Test/LoggerInterfaceTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Psr/Log/Test/LoggerInterfaceTest.php b/Psr/Log/Test/LoggerInterfaceTest.php index 38b07e0..3484c8c 100644 --- a/Psr/Log/Test/LoggerInterfaceTest.php +++ b/Psr/Log/Test/LoggerInterfaceTest.php @@ -2,10 +2,6 @@ namespace Psr\Log\Test; -if (!class_exists('PHPUnit\\Framework\\TestCase', true)) { - class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase'); -} - use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use PHPUnit\Framework\TestCase;