PHPUnit 6 support?
GaryJones opened this issue · 2 comments
GaryJones commented
Are there plans to support PHPUnit 6? The PHPUnit code is now namespaced.
allejo commented
In the mean time, aliasing the classes in my test bootstrap.php
works:
$phpunitAliases = [
'\PHPUnit\Framework\Test' => '\PHPUnit_Framework_Test',
'\PHPUnit\Framework\TestListener' => '\PHPUnit_Framework_TestListener',
'\PHPUnit\Framework\Warning' => '\PHPUnit_Framework_Warning',
'\PHPUnit\Framework\AssertionFailedError' => '\PHPUnit_Framework_AssertionFailedError',
'\PHPUnit\Framework\TestSuite' => '\PHPUnit_Framework_TestSuite',
];
foreach ($phpunitAliases as $namespaced => $alias) {
if (!class_exists($alias)) {
class_alias($namespaced, $alias);
}
}
dborsatto commented
The problem with aliasing is that if other packages you have installed require PHPUnit 6, installation will fail because of conflicting requirements 🙁