From ed6eed81d98b8a3aaea915dc26c605df48128e25 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 15 Nov 2012 19:07:54 +0100 Subject: [PATCH 1/5] Update ChangeLog. --- ChangeLog.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index bc434d20936..7e7d6b4607f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,11 @@ This is the list of changes for the PHPUnit 3.7 release series. * Fixed #709: `assertJsonStringEqualsJsonFile` didn't work with json arrays. +PHPUnit 3.7.10 +-------------- + +* Fixed error message when `assertArrayHasKey()` and `assertArrayNotHasKey()` are invoked with wrong arguments. + PHPUnit 3.7.9 ------------- From f487d0848ee6f0a11d3834e1b9ad05eb74d5584d Mon Sep 17 00:00:00 2001 From: Volker Dusch Date: Thu, 22 Nov 2012 10:58:32 +0100 Subject: [PATCH 2/5] Make composer aware of compatable mock-objects versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 13bb7b459a7..8f26bc04595 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "phpunit/php-text-template": ">=1.1.1", "phpunit/php-code-coverage": ">=1.2.1", "phpunit/php-timer": ">=1.0.2", - "phpunit/phpunit-mock-objects": ">=1.2.0", + "phpunit/phpunit-mock-objects": ">=1.2.0,<1.3.0", "symfony/yaml": ">=2.1.0", "ext-dom": "*", "ext-pcre": "*", From c7a0c51f0352d905655aee0a75fc29170db94999 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Fri, 16 Nov 2012 11:58:54 +0100 Subject: [PATCH 3/5] Make detection of whether PHPUnit is run from a PHAR more robust. --- PHPUnit/Util/Filter.php | 4 ++-- PHPUnit/Util/GlobalState.php | 5 ++--- build/phar-autoload.php.in | 2 ++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/PHPUnit/Util/Filter.php b/PHPUnit/Util/Filter.php index 3d8e4f5f5a1..88255972075 100644 --- a/PHPUnit/Util/Filter.php +++ b/PHPUnit/Util/Filter.php @@ -68,8 +68,8 @@ public static function getFilteredStacktrace(Exception $e, $asString = TRUE) $prefix = FALSE; $script = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']); - if (substr($script, -5) == '.phar') { - $prefix = 'phar://' . $script . '/'; + if (defined('__PHPUNIT_PHAR__')) { + $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/'; } if (!defined('PHPUNIT_TESTSUITE')) { diff --git a/PHPUnit/Util/GlobalState.php b/PHPUnit/Util/GlobalState.php index 425f0d46310..7f10096de90 100644 --- a/PHPUnit/Util/GlobalState.php +++ b/PHPUnit/Util/GlobalState.php @@ -193,10 +193,9 @@ public static function getIncludedFilesAsString() $files = get_included_files(); $prefix = FALSE; $result = ''; - $script = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']); - if (substr($script, -5) == '.phar') { - $prefix = 'phar://' . $script . '/'; + if (defined('__PHPUNIT_PHAR__')) { + $prefix = 'phar://' . __PHPUNIT_PHAR__ . '/'; } for ($i = count($files) - 1; $i > 0; $i--) { diff --git a/build/phar-autoload.php.in b/build/phar-autoload.php.in index 0807e284ba4..5cef95805bb 100644 --- a/build/phar-autoload.php.in +++ b/build/phar-autoload.php.in @@ -1,5 +1,7 @@ #!/usr/bin/env php Date: Sun, 25 Nov 2012 03:53:18 +0100 Subject: [PATCH 4/5] Cleanup config:bin-dir as @ihabunek suggested in #715. PHPUnit isn't cloned and "installed" via composer anyways but just used so the shorter path doesn't help anyone --- composer.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/composer.json b/composer.json index 8f26bc04595..3cef399c952 100644 --- a/composer.json +++ b/composer.json @@ -42,9 +42,6 @@ "bin": [ "composer/bin/phpunit" ], - "config": { - "bin-dir": "bin" - }, "autoload": { "classmap": [ "PHPUnit/" From 839326a4956bf408527647ec8195456c1180edb0 Mon Sep 17 00:00:00 2001 From: Arne Blankerts Date: Sun, 2 Dec 2012 13:01:38 +0100 Subject: [PATCH 5/5] Register phar name, fixing issue #734 --- build/phar-autoload.php.in | 1 + 1 file changed, 1 insertion(+) diff --git a/build/phar-autoload.php.in b/build/phar-autoload.php.in index 5cef95805bb..e9b53d0cf03 100644 --- a/build/phar-autoload.php.in +++ b/build/phar-autoload.php.in @@ -21,6 +21,7 @@ spl_autoload_register( } ); +Phar::mapPhar('___PHAR___'); PHPUnit_TextUI_Command::main(); __HALT_COMPILER();