Skip to content
Permalink
Browse files

Merge branch '8.3'

  • Loading branch information...
sebastianbergmann committed Aug 2, 2019
2 parents fbecc97 + 21461ce commit dad5f22536a25c8df320be8193046abbed0fc12c
@@ -2,6 +2,12 @@

All notable changes of the PHPUnit 8.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [8.3.1] - 2019-08-02

### Fixed

* Implemented [#3774](https://github.com/sebastianbergmann/phpunit/issues/3774): PHP errors, notices, etc. cannot be tested anymore with PHPUnit 8.3

## [8.3.0] - 2019-08-02

### Added
@@ -19,5 +25,6 @@ All notable changes of the PHPUnit 8.3 release series are documented in this fil
* Implemented [#3522](https://github.com/sebastianbergmann/phpunit/issues/3522): The `TestCase::setUseErrorHandler()` method, which controlled a feature that was not documented and did not work correctly, has been deprecated and does not have an effect anymore
* Implemented [#3687](https://github.com/sebastianbergmann/phpunit/pull/3687): `MockBuilder::setMethods()` is now deprecated

[8.3.1]: https://github.com/sebastianbergmann/phpunit/compare/8.3.0...8.3.1
[8.3.0]: https://github.com/sebastianbergmann/phpunit/compare/8.2.5...8.3.0

@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Framework\Error;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class Deprecation extends Error
{
}
@@ -7,7 +7,9 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Framework;
namespace PHPUnit\Framework\Error;
use PHPUnit\Framework\Exception;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Framework\Error;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class Notice extends Error
{
}
@@ -0,0 +1,17 @@
<?php declare(strict_types=1);
/*
* This file is part of PHPUnit.
*
* (c) Sebastian Bergmann <sebastian@phpunit.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Framework\Error;
/**
* @internal This class is not covered by the backward compatibility promise for PHPUnit
*/
final class Warning extends Error
{
}
@@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework;
use PHPUnit\Framework\Error\Error;
use Throwable;
/**
@@ -9,7 +9,10 @@
*/
namespace PHPUnit\Util;
use PHPUnit\Framework\Error;
use PHPUnit\Framework\Error\Deprecation;
use PHPUnit\Framework\Error\Error;
use PHPUnit\Framework\Error\Notice;
use PHPUnit\Framework\Error\Warning;
final class ErrorHandler
{
@@ -84,33 +87,31 @@ public function __invoke(int $errorNumber, string $errorString, string $errorFil
return false;
}
break;
throw new Notice($errorString, $errorNumber, $errorFile, $errorLine);
case \E_WARNING:
case \E_USER_WARNING:
if (!$this->convertWarningsToExceptions) {
return false;
}
break;
throw new Warning($errorString, $errorNumber, $errorFile, $errorLine);
case \E_DEPRECATED:
case \E_USER_DEPRECATED:
if (!$this->convertDeprecationsToExceptions) {
return false;
}
break;
throw new Deprecation($errorString, $errorNumber, $errorFile, $errorLine);
default:
if (!$this->convertErrorsToExceptions) {
return false;
}
break;
throw new Error($errorString, $errorNumber, $errorFile, $errorLine);
}
throw new Error($errorString, $errorNumber, $errorFile, $errorLine);
}
public function register(): void
@@ -9,6 +9,7 @@
*/
namespace PHPUnit\Framework;
use PHPUnit\Framework\Error\Error;
use SebastianBergmann\Comparator\ComparisonFailure;
/**

0 comments on commit dad5f22

Please sign in to comment.
You can’t perform that action at this time.