Composer update
This commit is contained in:
14
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
14
www/vendor/phpunit/phpunit/ChangeLog-8.5.md
vendored
@@ -2,6 +2,18 @@
|
||||
|
||||
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [8.5.26] - 2022-04-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods
|
||||
|
||||
## [8.5.25] - 2022-03-16
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4934](https://github.com/sebastianbergmann/phpunit/issues/4934): Code Coverage does not work with PHPUnit 8.5.24 PHAR on PHP 7
|
||||
|
||||
## [8.5.24] - 2022-03-05 - #StandWithUkraine
|
||||
|
||||
### Changed
|
||||
@@ -207,6 +219,8 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
|
||||
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
|
||||
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
|
||||
|
||||
[8.5.26]: https://github.com/sebastianbergmann/phpunit/compare/8.5.25...8.5.26
|
||||
[8.5.25]: https://github.com/sebastianbergmann/phpunit/compare/8.5.24...8.5.25
|
||||
[8.5.24]: https://github.com/sebastianbergmann/phpunit/compare/8.5.23...8.5.24
|
||||
[8.5.23]: https://github.com/sebastianbergmann/phpunit/compare/8.5.22...8.5.23
|
||||
[8.5.22]: https://github.com/sebastianbergmann/phpunit/compare/8.5.21...8.5.22
|
||||
|
||||
8
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
8
www/vendor/phpunit/phpunit/ChangeLog-9.5.md
vendored
@@ -2,6 +2,13 @@
|
||||
|
||||
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
|
||||
|
||||
## [9.5.20] - 2022-04-01
|
||||
|
||||
### Fixed
|
||||
|
||||
* [#4938](https://github.com/sebastianbergmann/phpunit/issues/4938): Test Double code generator does not handle `void` return type declaration on `__clone()` methods
|
||||
* [#4947](https://github.com/sebastianbergmann/phpunit/issues/4947): Test annotated with `@coversNothing` may lead to files missing from code coverage report
|
||||
|
||||
## [9.5.19] - 2022-03-15
|
||||
|
||||
### Fixed
|
||||
@@ -150,6 +157,7 @@ All notable changes of the PHPUnit 9.5 release series are documented in this fil
|
||||
|
||||
* [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
|
||||
|
||||
[9.5.20]: https://github.com/sebastianbergmann/phpunit/compare/9.5.19...9.5.20
|
||||
[9.5.19]: https://github.com/sebastianbergmann/phpunit/compare/9.5.18...9.5.19
|
||||
[9.5.18]: https://github.com/sebastianbergmann/phpunit/compare/9.5.17...9.5.18
|
||||
[9.5.17]: https://github.com/sebastianbergmann/phpunit/compare/9.5.16...9.5.17
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?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\MockObject;
|
||||
|
||||
/**
|
||||
* @internal This trait is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
trait MockedCloneMethod
|
||||
{
|
||||
public function __clone()
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
<?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\MockObject;
|
||||
|
||||
/**
|
||||
* @internal This trait is not covered by the backward compatibility promise for PHPUnit
|
||||
*/
|
||||
trait UnmockedCloneMethod
|
||||
{
|
||||
public function __clone()
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
|
||||
parent::__clone();
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,58 @@ use Traversable;
|
||||
*/
|
||||
final class Generator
|
||||
{
|
||||
private const MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
trait MockedCloneMethodWithVoidReturnType
|
||||
{
|
||||
public function __clone(): void
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
}
|
||||
}
|
||||
EOT;
|
||||
|
||||
private const MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
trait MockedCloneMethodWithoutReturnType
|
||||
{
|
||||
public function __clone()
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
}
|
||||
}
|
||||
EOT;
|
||||
|
||||
private const UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT = <<<'EOT'
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
trait UnmockedCloneMethodWithVoidReturnType
|
||||
{
|
||||
public function __clone(): void
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
|
||||
parent::__clone();
|
||||
}
|
||||
}
|
||||
EOT;
|
||||
|
||||
private const UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT = <<<'EOT'
|
||||
namespace PHPUnit\Framework\MockObject;
|
||||
|
||||
trait UnmockedCloneMethodWithoutReturnType
|
||||
{
|
||||
public function __clone()
|
||||
{
|
||||
$this->__phpunit_invocationMocker = clone $this->__phpunit_getInvocationHandler();
|
||||
|
||||
parent::__clone();
|
||||
}
|
||||
}
|
||||
EOT;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@@ -913,11 +965,11 @@ final class Generator
|
||||
$cloneTrait = '';
|
||||
|
||||
if ($mockedCloneMethod) {
|
||||
$cloneTrait = PHP_EOL . ' use \PHPUnit\Framework\MockObject\MockedCloneMethod;';
|
||||
$cloneTrait = $this->mockedCloneMethod();
|
||||
}
|
||||
|
||||
if ($unmockedCloneMethod) {
|
||||
$cloneTrait = PHP_EOL . ' use \PHPUnit\Framework\MockObject\UnmockedCloneMethod;';
|
||||
$cloneTrait = $this->unmockedCloneMethod();
|
||||
}
|
||||
|
||||
$classTemplate->setVar(
|
||||
@@ -1062,4 +1114,38 @@ final class Generator
|
||||
|
||||
return $methodName === $className;
|
||||
}
|
||||
|
||||
private function mockedCloneMethod(): string
|
||||
{
|
||||
if (PHP_MAJOR_VERSION >= 8) {
|
||||
if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType')) {
|
||||
eval(self::MOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
|
||||
}
|
||||
|
||||
return PHP_EOL . ' use \PHPUnit\Framework\MockObject\MockedCloneMethodWithVoidReturnType;';
|
||||
}
|
||||
|
||||
if (!trait_exists('\PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType')) {
|
||||
eval(self::MOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
|
||||
}
|
||||
|
||||
return PHP_EOL . ' use \PHPUnit\Framework\MockObject\MockedCloneMethodWithoutReturnType;';
|
||||
}
|
||||
|
||||
private function unmockedCloneMethod(): string
|
||||
{
|
||||
if (PHP_MAJOR_VERSION >= 8) {
|
||||
if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType')) {
|
||||
eval(self::UNMOCKED_CLONE_METHOD_WITH_VOID_RETURN_TYPE_TRAIT);
|
||||
}
|
||||
|
||||
return PHP_EOL . ' use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithVoidReturnType;';
|
||||
}
|
||||
|
||||
if (!trait_exists('\PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType')) {
|
||||
eval(self::UNMOCKED_CLONE_METHOD_WITHOUT_RETURN_TYPE_TRAIT);
|
||||
}
|
||||
|
||||
return PHP_EOL . ' use \PHPUnit\Framework\MockObject\UnmockedCloneMethodWithoutReturnType;';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ final class Version
|
||||
}
|
||||
|
||||
if (self::$version === '') {
|
||||
self::$version = (new VersionId('9.5.19', dirname(__DIR__, 2)))->getVersion();
|
||||
self::$version = (new VersionId('9.5.20', dirname(__DIR__, 2)))->getVersion();
|
||||
}
|
||||
|
||||
return self::$version;
|
||||
|
||||
6
www/vendor/phpunit/phpunit/src/Util/Test.php
vendored
6
www/vendor/phpunit/phpunit/src/Util/Test.php
vendored
@@ -150,7 +150,8 @@ final class Test
|
||||
// If there is no @covers annotation but a @coversNothing annotation on
|
||||
// the test method then code coverage data does not need to be collected
|
||||
if (isset($annotations['method']['coversNothing'])) {
|
||||
return false;
|
||||
// @see https://github.com/sebastianbergmann/phpunit/issues/4947#issuecomment-1084480950
|
||||
// return false;
|
||||
}
|
||||
|
||||
// If there is at least one @covers annotation then
|
||||
@@ -162,7 +163,8 @@ final class Test
|
||||
// If there is no @covers annotation but a @coversNothing annotation
|
||||
// then code coverage data does not need to be collected
|
||||
if (isset($annotations['class']['coversNothing'])) {
|
||||
return false;
|
||||
// @see https://github.com/sebastianbergmann/phpunit/issues/4947#issuecomment-1084480950
|
||||
// return false;
|
||||
}
|
||||
|
||||
// If there is no @coversNothing annotation then
|
||||
|
||||
Reference in New Issue
Block a user