Skip to content

Commit 70b02c6

Browse files
Display a message that the PEAR installation method is no longer supported
1 parent 8743e91 commit 70b02c6

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

Diff for: PHPUnit/TextUI/TestRunner.php

+13-5
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,8 @@ public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array())
208208
}
209209
}
210210

211-
if (!$this->printer instanceof PHPUnit_Util_Log_TAP &&
212-
!self::$versionStringPrinted) {
213-
$this->printer->write(
214-
PHPUnit_Runner_Version::getVersionString() . "\n\n"
215-
);
211+
if (!$this->printer instanceof PHPUnit_Util_Log_TAP) {
212+
$this->printVersionString();
216213

217214
if (isset($arguments['configuration'])) {
218215
$this->printer->write(
@@ -490,6 +487,17 @@ public static function printVersionString()
490487
{
491488
if (!self::$versionStringPrinted) {
492489
self::write(PHPUnit_Runner_Version::getVersionString() . "\n\n");
490+
491+
if (strpos('@version@', '@version') !== 0) {
492+
self::write(
493+
"You have installed PHPUnit via PEAR. This installation method is no longer\n" .
494+
"supported and http://pear.phpunit.de/ will be shut down no later than\n" .
495+
"December, 31 2014.\n\n" .
496+
"Please read http://phpunit.de/manual/current/en/installation.html and\n" .
497+
"learn how to use PHPUnit from a PHAR or install it via Composer.\n\n"
498+
);
499+
}
500+
493501
self::$versionStringPrinted = TRUE;
494502
}
495503
}

Diff for: package.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@
146146
<dir name="TextUI">
147147
<file baseinstalldir="/" name="Command.php" role="php" />
148148
<file baseinstalldir="/" name="ResultPrinter.php" role="php" />
149-
<file baseinstalldir="/" name="TestRunner.php" role="php" />
149+
<file baseinstalldir="/" name="TestRunner.php" role="php">
150+
<tasks:replace from="@version@" to="version" type="package-info" />
151+
</file>
150152
</dir>
151153
<dir name="Util">
152154
<dir name="DeprecatedFeature">

0 commit comments

Comments
 (0)