Composer installs update

This commit is contained in:
Clemens Schwaighofer
2022-03-14 19:49:37 +09:00
parent 40edbe271d
commit 38903020fb
33 changed files with 495 additions and 534 deletions

82
www/composer.lock generated
View File

@@ -9,29 +9,30 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
"version": "1.4.0", "version": "1.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/instantiator.git", "url": "https://github.com/doctrine/instantiator.git",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^8.0", "doctrine/coding-standard": "^9",
"ext-pdo": "*", "ext-pdo": "*",
"ext-phar": "*", "ext-phar": "*",
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2", "phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^0.12", "phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^0.12", "phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -58,7 +59,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/instantiator/issues", "issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.0" "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
}, },
"funding": [ "funding": [
{ {
@@ -74,32 +75,33 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2020-11-10T18:47:58+00:00" "time": "2022-03-03T08:28:38+00:00"
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
"version": "1.10.2", "version": "1.11.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/myclabs/DeepCopy.git", "url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"replace": { "conflict": {
"myclabs/deep-copy": "self.version" "doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
}, },
"require-dev": { "require-dev": {
"doctrine/collections": "^1.0", "doctrine/collections": "^1.6.8",
"doctrine/common": "^2.6", "doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.1" "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -124,7 +126,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/myclabs/DeepCopy/issues", "issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
}, },
"funding": [ "funding": [
{ {
@@ -132,7 +134,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2020-11-13T09:40:50+00:00" "time": "2022-03-03T13:19:32+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
@@ -530,16 +532,16 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.13", "version": "9.2.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8" "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8", "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -595,7 +597,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
}, },
"funding": [ "funding": [
{ {
@@ -603,7 +605,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-02-23T17:02:38+00:00" "time": "2022-03-07T09:28:20+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@@ -848,16 +850,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.5.16", "version": "9.5.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" "reference": "1b5856028273bfd855e60a887278857d872ec67a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a",
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", "reference": "1b5856028273bfd855e60a887278857d872ec67a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -935,7 +937,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18"
}, },
"funding": [ "funding": [
{ {
@@ -947,7 +949,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2022-02-23T17:10:58+00:00" "time": "2022-03-08T06:52:28+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@@ -1915,7 +1917,7 @@
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.24.0", "version": "v1.25.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
@@ -1947,12 +1949,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -1977,7 +1979,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
}, },
"funding": [ "funding": [
{ {

View File

@@ -2,32 +2,33 @@
"packages": [ "packages": [
{ {
"name": "doctrine/instantiator", "name": "doctrine/instantiator",
"version": "1.4.0", "version": "1.4.1",
"version_normalized": "1.4.0.0", "version_normalized": "1.4.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/instantiator.git", "url": "https://github.com/doctrine/instantiator.git",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"require-dev": { "require-dev": {
"doctrine/coding-standard": "^8.0", "doctrine/coding-standard": "^9",
"ext-pdo": "*", "ext-pdo": "*",
"ext-phar": "*", "ext-phar": "*",
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2", "phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^0.12", "phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^0.12", "phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
}, },
"time": "2020-11-10T18:47:58+00:00", "time": "2022-03-03T08:28:38+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -54,7 +55,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/doctrine/instantiator/issues", "issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.0" "source": "https://github.com/doctrine/instantiator/tree/1.4.1"
}, },
"funding": [ "funding": [
{ {
@@ -74,40 +75,41 @@
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
"version": "1.10.2", "version": "1.11.0",
"version_normalized": "1.10.2.0", "version_normalized": "1.11.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/myclabs/DeepCopy.git", "url": "https://github.com/myclabs/DeepCopy.git",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614",
"reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"replace": { "conflict": {
"myclabs/deep-copy": "self.version" "doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
}, },
"require-dev": { "require-dev": {
"doctrine/collections": "^1.0", "doctrine/collections": "^1.6.8",
"doctrine/common": "^2.6", "doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.1" "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
}, },
"time": "2020-11-13T09:40:50+00:00", "time": "2022-03-03T13:19:32+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [ "files": [
"src/DeepCopy/deep_copy.php" "src/DeepCopy/deep_copy.php"
] ],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -123,7 +125,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/myclabs/DeepCopy/issues", "issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0"
}, },
"funding": [ "funding": [
{ {
@@ -550,17 +552,17 @@
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
"version": "9.2.13", "version": "9.2.15",
"version_normalized": "9.2.13.0", "version_normalized": "9.2.15.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8" "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8", "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8", "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -585,7 +587,7 @@
"ext-pcov": "*", "ext-pcov": "*",
"ext-xdebug": "*" "ext-xdebug": "*"
}, },
"time": "2022-02-23T17:02:38+00:00", "time": "2022-03-07T09:28:20+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
@@ -618,7 +620,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13" "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15"
}, },
"funding": [ "funding": [
{ {
@@ -883,17 +885,17 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.5.16", "version": "9.5.18",
"version_normalized": "9.5.16.0", "version_normalized": "9.5.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" "reference": "1b5856028273bfd855e60a887278857d872ec67a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1b5856028273bfd855e60a887278857d872ec67a",
"reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", "reference": "1b5856028273bfd855e60a887278857d872ec67a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -934,7 +936,7 @@
"ext-soap": "*", "ext-soap": "*",
"ext-xdebug": "*" "ext-xdebug": "*"
}, },
"time": "2022-02-23T17:10:58+00:00", "time": "2022-03-08T06:52:28+00:00",
"bin": [ "bin": [
"phpunit" "phpunit"
], ],
@@ -973,7 +975,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.18"
}, },
"funding": [ "funding": [
{ {
@@ -2001,8 +2003,8 @@
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.24.0", "version": "v1.25.0",
"version_normalized": "1.24.0.0", "version_normalized": "1.25.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
@@ -2036,12 +2038,12 @@
}, },
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -2066,7 +2068,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
}, },
"funding": [ "funding": [
{ {

View File

@@ -5,18 +5,18 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'f2c0ba737ac5dcfb2bfd5467f5395f8fb1dcfe07', 'reference' => '40edbe271dad56a18dff101983b5ed25f7cc5e85',
'name' => 'gullevek/corelibs', 'name' => 'gullevek/corelibs',
'dev' => true, 'dev' => true,
), ),
'versions' => array( 'versions' => array(
'doctrine/instantiator' => array( 'doctrine/instantiator' => array(
'pretty_version' => '1.4.0', 'pretty_version' => '1.4.1',
'version' => '1.4.0.0', 'version' => '1.4.1.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/instantiator', 'install_path' => __DIR__ . '/../doctrine/instantiator',
'aliases' => array(), 'aliases' => array(),
'reference' => 'd56bf6102915de5702778fe20f2de3b2fe570b5b', 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc',
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'gullevek/corelibs' => array( 'gullevek/corelibs' => array(
@@ -25,20 +25,17 @@
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => 'f2c0ba737ac5dcfb2bfd5467f5395f8fb1dcfe07', 'reference' => '40edbe271dad56a18dff101983b5ed25f7cc5e85',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'myclabs/deep-copy' => array( 'myclabs/deep-copy' => array(
'pretty_version' => '1.10.2', 'pretty_version' => '1.11.0',
'version' => '1.10.2.0', 'version' => '1.11.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy', 'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(), 'aliases' => array(),
'reference' => '776f831124e9c62e1a2c601ecc52e776d8bb7220', 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614',
'dev_requirement' => true, 'dev_requirement' => true,
'replaced' => array(
0 => '1.10.2',
),
), ),
'nikic/php-parser' => array( 'nikic/php-parser' => array(
'pretty_version' => 'v4.13.2', 'pretty_version' => 'v4.13.2',
@@ -104,12 +101,12 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-code-coverage' => array( 'phpunit/php-code-coverage' => array(
'pretty_version' => '9.2.13', 'pretty_version' => '9.2.15',
'version' => '9.2.13.0', 'version' => '9.2.15.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(), 'aliases' => array(),
'reference' => 'deac8540cb7bd40b2b8cfa679b76202834fd04e8', 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f',
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/php-file-iterator' => array( 'phpunit/php-file-iterator' => array(
@@ -149,12 +146,12 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'phpunit/phpunit' => array( 'phpunit/phpunit' => array(
'pretty_version' => '9.5.16', 'pretty_version' => '9.5.18',
'version' => '9.5.16.0', 'version' => '9.5.18.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit', 'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(), 'aliases' => array(),
'reference' => '5ff8c545a50226c569310a35f4fa89d79f1ddfdc', 'reference' => '1b5856028273bfd855e60a887278857d872ec67a',
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'sebastian/cli-parser' => array( 'sebastian/cli-parser' => array(
@@ -302,8 +299,8 @@
'dev_requirement' => true, 'dev_requirement' => true,
), ),
'symfony/polyfill-ctype' => array( 'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.24.0', 'pretty_version' => 'v1.25.0',
'version' => '1.24.0.0', 'version' => '1.25.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(), 'aliases' => array(),

View File

@@ -6,15 +6,15 @@
"codePath": "/src", "codePath": "/src",
"versions": [ "versions": [
{ {
"name": "1.4", "name": "1.5",
"branchName": "master", "branchName": "1.5.x",
"slug": "latest", "slug": "latest",
"upcoming": true "upcoming": true
}, },
{ {
"name": "1.3", "name": "1.4",
"branchName": "1.3.x", "branchName": "1.4.x",
"slug": "1.3", "slug": "1.4",
"aliases": [ "aliases": [
"current", "current",
"stable" "stable"
@@ -22,6 +22,12 @@
"maintained": true, "maintained": true,
"current": true "current": true
}, },
{
"name": "1.3",
"branchName": "1.3.x",
"slug": "1.3",
"maintained": false
},
{ {
"name": "1.2", "name": "1.2",
"branchName": "1.2.x", "branchName": "1.2.x",

View File

@@ -1,3 +0,0 @@
patreon: phpdoctrine
tidelift: packagist/doctrine%2Finstantiator
custom: https://www.doctrine-project.org/sponsorship.html

View File

@@ -1,48 +0,0 @@
name: "Coding Standards"
on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
env:
COMPOSER_ROOT_VERSION: "1.4"
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"
- name: "Cache dependencies installed with Composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with Composer"
run: "composer install --no-interaction --no-progress"
# https://github.com/doctrine/.github/issues/3
- name: "Run PHP_CodeSniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"

View File

@@ -1,91 +0,0 @@
name: "Continuous Integration"
on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
env:
fail-fast: true
COMPOSER_ROOT_VERSION: "1.4"
jobs:
phpunit:
name: "PHPUnit with SQLite"
runs-on: "ubuntu-20.04"
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2
- name: "Install PHP with XDebug"
uses: "shivammathur/setup-php@v2"
if: "${{ matrix.php-version == '7.1' }}"
with:
php-version: "${{ matrix.php-version }}"
coverage: "xdebug"
ini-values: "zend.assertions=1"
- name: "Install PHP with PCOV"
uses: "shivammathur/setup-php@v2"
if: "${{ matrix.php-version != '7.1' }}"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"
- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-${{ matrix.php-version }}.coverage"
path: "coverage.xml"
upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-20.04"
needs:
- "phpunit"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2
- name: "Download coverage files"
uses: "actions/download-artifact@v2"
with:
path: "reports"
- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
with:
directory: reports

View File

@@ -1,50 +0,0 @@
name: "Performance benchmark"
on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
env:
fail-fast: true
COMPOSER_ROOT_VERSION: "1.4"
jobs:
phpbench:
name: "PHPBench"
runs-on: "ubuntu-20.04"
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"
- name: "Run PHPBench"
run: "php ./vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate"

View File

@@ -1,45 +0,0 @@
name: "Automatic Releases"
on:
milestone:
types:
- "closed"
jobs:
release:
name: "Git tag, release & create merge-up PR"
runs-on: "ubuntu-20.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Release"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:release"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create Merge-Up Pull Request"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
- name: "Create new milestones"
uses: "laminas/automatic-releases@v1"
with:
command-name: "laminas:automatic-releases:create-milestones"
env:
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

View File

@@ -1,47 +0,0 @@
name: "Static Analysis"
on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
env:
COMPOSER_ROOT_VERSION: "1.4"
jobs:
static-analysis-phpstan:
name: "Static Analysis with PHPStan"
runs-on: "ubuntu-20.04"
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress"
- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr"

View File

@@ -21,11 +21,12 @@
"require-dev": { "require-dev": {
"ext-phar": "*", "ext-phar": "*",
"ext-pdo": "*", "ext-pdo": "*",
"doctrine/coding-standard": "^8.0", "doctrine/coding-standard": "^9",
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2", "phpbench/phpbench": "^0.16 || ^1",
"phpstan/phpstan": "^0.12", "phpstan/phpstan": "^1.4",
"phpstan/phpstan-phpunit": "^0.12", "phpstan/phpstan-phpunit": "^1",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.22"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@@ -38,5 +39,10 @@
"DoctrineTest\\InstantiatorTest\\": "tests", "DoctrineTest\\InstantiatorTest\\": "tests",
"DoctrineTest\\InstantiatorTestAsset\\": "tests" "DoctrineTest\\InstantiatorTestAsset\\": "tests"
} }
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
} }
} }

View File

@@ -1,4 +0,0 @@
{
"bootstrap": "vendor/autoload.php",
"path": "tests/DoctrineTest/InstantiatorPerformance"
}

View File

@@ -1,50 +0,0 @@
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
<file>src</file>
<file>tests</file>
<rule ref="Doctrine">
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint"/>
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint"/>
<exclude name="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
</rule>
<!-- Disable the rules that will require PHP 7.4 -->
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
<properties>
<property name="enableNativeTypeHint" value="false"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint">
<exclude-pattern>*/src/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<exclude-pattern>*/src/*</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming">
<exclude-pattern>tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming">
<exclude-pattern>src/Doctrine/Instantiator/Exception/UnexpectedValueException.php</exclude-pattern>
<exclude-pattern>src/Doctrine/Instantiator/Exception/InvalidArgumentException.php</exclude-pattern>
</rule>
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming">
<exclude-pattern>src/Doctrine/Instantiator/Exception/ExceptionInterface.php</exclude-pattern>
<exclude-pattern>src/Doctrine/Instantiator/InstantiatorInterface.php</exclude-pattern>
</rule>
</ruleset>

View File

@@ -1,15 +0,0 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
parameters:
level: max
paths:
- src
- tests
ignoreErrors:
# dynamic properties confuse static analysis
-
message: '#Access to an undefined property object::\$foo\.#'
path: '*/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php'

View File

@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<psalm
errorLevel="7"
phpVersion="8.1"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>

View File

@@ -17,25 +17,34 @@ class InvalidArgumentException extends BaseInvalidArgumentException implements E
public static function fromNonExistingClass(string $className): self public static function fromNonExistingClass(string $className): self
{ {
if (interface_exists($className)) { if (interface_exists($className)) {
return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className)); return new self(sprintf('The provided type "%s" is an interface, and cannot be instantiated', $className));
} }
if (trait_exists($className)) { if (trait_exists($className)) {
return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className)); return new self(sprintf('The provided type "%s" is a trait, and cannot be instantiated', $className));
} }
return new self(sprintf('The provided class "%s" does not exist', $className)); return new self(sprintf('The provided class "%s" does not exist', $className));
} }
/** /**
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
public static function fromAbstractClass(ReflectionClass $reflectionClass): self public static function fromAbstractClass(ReflectionClass $reflectionClass): self
{ {
return new self(sprintf( return new self(sprintf(
'The provided class "%s" is abstract, and can not be instantiated', 'The provided class "%s" is abstract, and cannot be instantiated',
$reflectionClass->getName() $reflectionClass->getName()
)); ));
} }
public static function fromEnum(string $className): self
{
return new self(sprintf(
'The provided class "%s" is an enum, and cannot be instantiated',
$className
));
}
} }

View File

@@ -14,8 +14,9 @@ use function sprintf;
class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface
{ {
/** /**
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
public static function fromSerializationTriggeredException( public static function fromSerializationTriggeredException(
ReflectionClass $reflectionClass, ReflectionClass $reflectionClass,
@@ -32,8 +33,9 @@ class UnexpectedValueException extends BaseUnexpectedValueException implements E
} }
/** /**
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
public static function fromUncleanUnSerialization( public static function fromUncleanUnSerialization(
ReflectionClass $reflectionClass, ReflectionClass $reflectionClass,

View File

@@ -3,6 +3,7 @@
namespace Doctrine\Instantiator; namespace Doctrine\Instantiator;
use ArrayIterator; use ArrayIterator;
use Doctrine\Instantiator\Exception\ExceptionInterface;
use Doctrine\Instantiator\Exception\InvalidArgumentException; use Doctrine\Instantiator\Exception\InvalidArgumentException;
use Doctrine\Instantiator\Exception\UnexpectedValueException; use Doctrine\Instantiator\Exception\UnexpectedValueException;
use Exception; use Exception;
@@ -11,6 +12,7 @@ use ReflectionException;
use Serializable; use Serializable;
use function class_exists; use function class_exists;
use function enum_exists;
use function is_subclass_of; use function is_subclass_of;
use function restore_error_handler; use function restore_error_handler;
use function set_error_handler; use function set_error_handler;
@@ -18,6 +20,8 @@ use function sprintf;
use function strlen; use function strlen;
use function unserialize; use function unserialize;
use const PHP_VERSION_ID;
final class Instantiator implements InstantiatorInterface final class Instantiator implements InstantiatorInterface
{ {
/** /**
@@ -43,12 +47,25 @@ final class Instantiator implements InstantiatorInterface
private static $cachedCloneables = []; private static $cachedCloneables = [];
/** /**
* {@inheritDoc} * @param string $className
* @phpstan-param class-string<T> $className
*
* @return object
* @phpstan-return T
*
* @throws ExceptionInterface
*
* @template T of object
*/ */
public function instantiate($className) public function instantiate($className)
{ {
if (isset(self::$cachedCloneables[$className])) { if (isset(self::$cachedCloneables[$className])) {
return clone self::$cachedCloneables[$className]; /**
* @phpstan-var T
*/
$cachedCloneable = self::$cachedCloneables[$className];
return clone $cachedCloneable;
} }
if (isset(self::$cachedInstantiators[$className])) { if (isset(self::$cachedInstantiators[$className])) {
@@ -63,12 +80,12 @@ final class Instantiator implements InstantiatorInterface
/** /**
* Builds the requested object and caches it in static properties for performance * Builds the requested object and caches it in static properties for performance
* *
* @return object
*
* @template T of object
* @phpstan-param class-string<T> $className * @phpstan-param class-string<T> $className
* *
* @return object
* @phpstan-return T * @phpstan-return T
*
* @template T of object
*/ */
private function buildAndCacheFromFactory(string $className) private function buildAndCacheFromFactory(string $className)
{ {
@@ -86,14 +103,15 @@ final class Instantiator implements InstantiatorInterface
* Builds a callable capable of instantiating the given $className without * Builds a callable capable of instantiating the given $className without
* invoking its constructor. * invoking its constructor.
* *
* @phpstan-param class-string<T> $className
*
* @phpstan-return callable(): T
*
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @throws UnexpectedValueException * @throws UnexpectedValueException
* @throws ReflectionException * @throws ReflectionException
* *
* @template T of object * @template T of object
* @phpstan-param class-string<T> $className
*
* @phpstan-return callable(): T
*/ */
private function buildFactory(string $className): callable private function buildFactory(string $className): callable
{ {
@@ -118,13 +136,14 @@ final class Instantiator implements InstantiatorInterface
} }
/** /**
* @phpstan-param class-string<T> $className
*
* @phpstan-return ReflectionClass<T>
*
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @throws ReflectionException * @throws ReflectionException
* *
* @template T of object * @template T of object
* @phpstan-param class-string<T> $className
*
* @phpstan-return ReflectionClass<T>
*/ */
private function getReflectionClass(string $className): ReflectionClass private function getReflectionClass(string $className): ReflectionClass
{ {
@@ -132,6 +151,10 @@ final class Instantiator implements InstantiatorInterface
throw InvalidArgumentException::fromNonExistingClass($className); throw InvalidArgumentException::fromNonExistingClass($className);
} }
if (PHP_VERSION_ID >= 80100 && enum_exists($className, false)) {
throw InvalidArgumentException::fromEnum($className);
}
$reflection = new ReflectionClass($className); $reflection = new ReflectionClass($className);
if ($reflection->isAbstract()) { if ($reflection->isAbstract()) {
@@ -142,10 +165,11 @@ final class Instantiator implements InstantiatorInterface
} }
/** /**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @throws UnexpectedValueException * @throws UnexpectedValueException
* *
* @template T of object * @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass
*/ */
private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, string $serializedString): void
{ {
@@ -173,10 +197,11 @@ final class Instantiator implements InstantiatorInterface
} }
/** /**
* @phpstan-param ReflectionClass<T> $reflectionClass
*
* @throws UnexpectedValueException * @throws UnexpectedValueException
* *
* @template T of object * @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass
*/ */
private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, string $serializedString): void
{ {
@@ -188,8 +213,9 @@ final class Instantiator implements InstantiatorInterface
} }
/** /**
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool private function isInstantiableViaReflection(ReflectionClass $reflectionClass): bool
{ {
@@ -199,8 +225,9 @@ final class Instantiator implements InstantiatorInterface
/** /**
* Verifies whether the given class is to be considered internal * Verifies whether the given class is to be considered internal
* *
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
private function hasInternalAncestors(ReflectionClass $reflectionClass): bool private function hasInternalAncestors(ReflectionClass $reflectionClass): bool
{ {
@@ -220,8 +247,9 @@ final class Instantiator implements InstantiatorInterface
* *
* Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects. * Classes implementing `__clone` cannot be safely cloned, as that may cause side-effects.
* *
* @template T of object
* @phpstan-param ReflectionClass<T> $reflectionClass * @phpstan-param ReflectionClass<T> $reflectionClass
*
* @template T of object
*/ */
private function isSafeToClone(ReflectionClass $reflectionClass): bool private function isSafeToClone(ReflectionClass $reflectionClass): bool
{ {

View File

@@ -11,13 +11,14 @@ interface InstantiatorInterface
{ {
/** /**
* @param string $className * @param string $className
* @phpstan-param class-string<T> $className
* *
* @return object * @return object
* @phpstan-return T
* *
* @throws ExceptionInterface * @throws ExceptionInterface
* *
* @template T of object * @template T of object
* @phpstan-param class-string<T> $className
*/ */
public function instantiate($className); public function instantiate($className);
} }

View File

@@ -0,0 +1,101 @@
name: "Continuous Integration"
on:
- pull_request
- push
env:
COMPOSER_ROOT_VERSION: 1.99
jobs:
composer-json-lint:
name: "Lint composer.json"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: composer-normalize
- name: "Get composer cache directory"
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
- name: "Install dependencies"
run: "composer update --no-interaction --no-progress"
- name: "Validate composer.json"
run: "composer validate --strict"
- name: "Normalize composer.json"
run: "composer-normalize --dry-run"
tests:
name: "Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "lowest"
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
ini-values: zend.assertions=1
- name: "Get composer cache directory"
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --no-interaction --no-progress --prefer-lowest"
- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress"
- name: "Run tests"
timeout-minutes: 3
run: "vendor/bin/phpunit"

View File

@@ -2,17 +2,15 @@
DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph.
[![Build Status](https://travis-ci.org/myclabs/DeepCopy.png?branch=1.x)](https://travis-ci.org/myclabs/DeepCopy)
[![Coverage Status](https://coveralls.io/repos/myclabs/DeepCopy/badge.png?branch=1.x)](https://coveralls.io/r/myclabs/DeepCopy?branch=1.x)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy) [![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy)
[![Integrate](https://github.com/myclabs/DeepCopy/workflows/ci/badge.svg?branch=1.x)](https://github.com/myclabs/DeepCopy/actions)
## Table of Contents ## Table of Contents
1. [How](#how) 1. [How](#how)
1. [Why](#why) 1. [Why](#why)
1. [Using simply `clone`](#using-simply-clone) 1. [Using simply `clone`](#using-simply-clone)
1. [Overridding `__clone()`](#overridding-__clone) 1. [Overriding `__clone()`](#overriding-__clone)
1. [With `DeepCopy`](#with-deepcopy) 1. [With `DeepCopy`](#with-deepcopy)
1. [How it works](#how-it-works) 1. [How it works](#how-it-works)
1. [Going further](#going-further) 1. [Going further](#going-further)
@@ -37,11 +35,11 @@ DeepCopy helps you create deep copies (clones) of your objects. It is designed t
Install with Composer: Install with Composer:
```json ```
composer require myclabs/deep-copy composer require myclabs/deep-copy
``` ```
Use simply: Use it:
```php ```php
use DeepCopy\DeepCopy; use DeepCopy\DeepCopy;
@@ -76,9 +74,9 @@ Now you're in for a big mess :(
![Using clone](doc/clone.png) ![Using clone](doc/clone.png)
### Overridding `__clone()` ### Overriding `__clone()`
![Overridding __clone](doc/deep-clone.png) ![Overriding __clone](doc/deep-clone.png)
### With `DeepCopy` ### With `DeepCopy`

View File

@@ -1,10 +1,27 @@
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
"type": "library",
"description": "Create deep copies (clones) of your objects", "description": "Create deep copies (clones) of your objects",
"keywords": ["clone", "copy", "duplicate", "object", "object graph"],
"license": "MIT", "license": "MIT",
"type": "library",
"keywords": [
"clone",
"copy",
"duplicate",
"object",
"object graph"
],
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"DeepCopy\\": "src/DeepCopy/" "DeepCopy\\": "src/DeepCopy/"
@@ -19,19 +36,6 @@
"DeepCopyTest\\": "tests/DeepCopyTest/" "DeepCopyTest\\": "tests/DeepCopyTest/"
} }
}, },
"require": {
"php": "^7.1 || ^8.0"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
"phpunit/phpunit": "^7.1"
},
"replace": {
"myclabs/deep-copy": "self.version"
},
"config": { "config": {
"sort-packages": true "sort-packages": true
} }

View File

@@ -140,6 +140,11 @@ class DeepCopy
return $var; return $var;
} }
// Enum
if (PHP_VERSION_ID >= 80100 && enum_exists(get_class($var))) {
return $var;
}
// Object // Object
return $this->copyObject($var); return $this->copyObject($var);
} }

View File

@@ -3,7 +3,7 @@
namespace DeepCopy\Matcher\Doctrine; namespace DeepCopy\Matcher\Doctrine;
use DeepCopy\Matcher\Matcher; use DeepCopy\Matcher\Matcher;
use Doctrine\Common\Persistence\Proxy; use Doctrine\Persistence\Proxy;
/** /**
* @final * @final

View File

@@ -2,6 +2,20 @@
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
## [9.2.15] - 2022-03-07
### Fixed
* [#885](https://github.com/sebastianbergmann/php-code-coverage/issues/885): Files that have only `\r` (CR, 0x0d) EOL characters are not handled correctly
* [#907](https://github.com/sebastianbergmann/php-code-coverage/issues/907): Line with only `return [` is not recognized as executable
## [9.2.14] - 2022-02-28
### Fixed
* [#904](https://github.com/sebastianbergmann/php-code-coverage/issues/904): Lines of code containing the `match` keyword were not recognized as executable correctly
* [#905](https://github.com/sebastianbergmann/php-code-coverage/issues/905): Lines of code in constructors were not recognized as executable correctly when constructor property promotion is used
## [9.2.13] - 2022-02-23 ## [9.2.13] - 2022-02-23
### Changed ### Changed
@@ -384,6 +398,8 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
* This component is no longer supported on PHP 7.1 * This component is no longer supported on PHP 7.1
[9.2.15]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.14...9.2.15
[9.2.14]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.13...9.2.14
[9.2.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631...9.2.13 [9.2.13]: https://github.com/sebastianbergmann/php-code-coverage/compare/c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631...9.2.13
[9.2.12]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.11...c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631 [9.2.12]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.11...c011a0b6aaa4acd2f39b7f51fb4ad4442b6ec631
[9.2.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.10...9.2.11 [9.2.11]: https://github.com/sebastianbergmann/php-code-coverage/compare/9.2.10...9.2.11

View File

@@ -10,21 +10,27 @@
namespace SebastianBergmann\CodeCoverage\StaticAnalysis; namespace SebastianBergmann\CodeCoverage\StaticAnalysis;
use PhpParser\Node; use PhpParser\Node;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp; use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\CallLike; use PhpParser\Node\Expr\CallLike;
use PhpParser\Node\Expr\Cast; use PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\Match_;
use PhpParser\Node\Expr\MethodCall; use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\NullsafePropertyFetch; use PhpParser\Node\Expr\NullsafePropertyFetch;
use PhpParser\Node\Expr\PropertyFetch; use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch; use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Expr\Ternary; use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\MatchArm;
use PhpParser\Node\Scalar\Encapsed; use PhpParser\Node\Scalar\Encapsed;
use PhpParser\Node\Stmt\Break_; use PhpParser\Node\Stmt\Break_;
use PhpParser\Node\Stmt\Case_; use PhpParser\Node\Stmt\Case_;
use PhpParser\Node\Stmt\Catch_; use PhpParser\Node\Stmt\Catch_;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Continue_; use PhpParser\Node\Stmt\Continue_;
use PhpParser\Node\Stmt\Do_; use PhpParser\Node\Stmt\Do_;
use PhpParser\Node\Stmt\Echo_; use PhpParser\Node\Stmt\Echo_;
@@ -60,6 +66,11 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
*/ */
private $propertyLines = []; private $propertyLines = [];
/**
* @psalm-var array<int, Return_>
*/
private $returns = [];
public function enterNode(Node $node): void public function enterNode(Node $node): void
{ {
$this->savePropertyLines($node); $this->savePropertyLines($node);
@@ -82,6 +93,8 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
*/ */
public function executableLines(): array public function executableLines(): array
{ {
$this->computeReturns();
sort($this->executableLines); sort($this->executableLines);
return $this->executableLines; return $this->executableLines;
@@ -98,6 +111,25 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
} }
} }
private function computeReturns(): void
{
foreach ($this->returns as $return) {
foreach (range($return->getStartLine(), $return->getEndLine()) as $loc) {
if (isset($this->executableLines[$loc])) {
continue 2;
}
}
$line = $return->getEndLine();
if ($return->expr !== null) {
$line = $return->expr->getStartLine();
}
$this->executableLines[$line] = $line;
}
}
/** /**
* @return int[] * @return int[]
*/ */
@@ -118,6 +150,46 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
return [$node->dim->getStartLine()]; return [$node->dim->getStartLine()];
} }
if ($node instanceof Array_) {
$startLine = $node->getStartLine();
if (isset($this->executableLines[$startLine])) {
return [];
}
if ([] === $node->items) {
return [$node->getEndLine()];
}
if ($node->items[0] instanceof ArrayItem) {
return [$node->items[0]->getStartLine()];
}
}
if ($node instanceof ClassMethod) {
if ($node->name->name !== '__construct') {
return [];
}
$existsAPromotedProperty = false;
foreach ($node->getParams() as $param) {
if (0 !== ($param->flags & Class_::VISIBILITY_MODIFIER_MASK)) {
$existsAPromotedProperty = true;
break;
}
}
if ($existsAPromotedProperty) {
// Only the line with `function` keyword should be listed here
// but `nikic/php-parser` doesn't provide a way to fetch it
return range($node->getStartLine(), $node->name->getEndLine());
}
return [];
}
if ($node instanceof MethodCall) { if ($node instanceof MethodCall) {
return [$node->name->getStartLine()]; return [$node->name->getStartLine()];
} }
@@ -134,6 +206,28 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
return $lines; return $lines;
} }
if ($node instanceof Match_) {
return [$node->cond->getStartLine()];
}
if ($node instanceof MatchArm) {
return [$node->body->getStartLine()];
}
if ($node instanceof Expression && (
$node->expr instanceof Cast ||
$node->expr instanceof Match_ ||
$node->expr instanceof MethodCall
)) {
return [];
}
if ($node instanceof Return_) {
$this->returns[] = $node;
return [];
}
return [$node->getStartLine()]; return [$node->getStartLine()];
} }
@@ -141,12 +235,14 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
{ {
return $node instanceof Assign || return $node instanceof Assign ||
$node instanceof ArrayDimFetch || $node instanceof ArrayDimFetch ||
$node instanceof Array_ ||
$node instanceof BinaryOp || $node instanceof BinaryOp ||
$node instanceof Break_ || $node instanceof Break_ ||
$node instanceof CallLike || $node instanceof CallLike ||
$node instanceof Case_ || $node instanceof Case_ ||
$node instanceof Cast || $node instanceof Cast ||
$node instanceof Catch_ || $node instanceof Catch_ ||
$node instanceof ClassMethod ||
$node instanceof Closure || $node instanceof Closure ||
$node instanceof Continue_ || $node instanceof Continue_ ||
$node instanceof Do_ || $node instanceof Do_ ||
@@ -160,6 +256,8 @@ final class ExecutableLinesFindingVisitor extends NodeVisitorAbstract
$node instanceof Foreach_ || $node instanceof Foreach_ ||
$node instanceof Goto_ || $node instanceof Goto_ ||
$node instanceof If_ || $node instanceof If_ ||
$node instanceof Match_ ||
$node instanceof MatchArm ||
$node instanceof MethodCall || $node instanceof MethodCall ||
$node instanceof NullsafePropertyFetch || $node instanceof NullsafePropertyFetch ||
$node instanceof PropertyFetch || $node instanceof PropertyFetch ||

View File

@@ -13,6 +13,7 @@ use function array_unique;
use function assert; use function assert;
use function file_get_contents; use function file_get_contents;
use function is_array; use function is_array;
use function max;
use function sprintf; use function sprintf;
use function substr_count; use function substr_count;
use function token_get_all; use function token_get_all;
@@ -132,7 +133,7 @@ final class ParsingFileAnalyser implements FileAnalyser
} }
$source = file_get_contents($filename); $source = file_get_contents($filename);
$linesOfCode = substr_count($source, "\n"); $linesOfCode = max(substr_count($source, "\n") + 1, substr_count($source, "\r") + 1);
if ($linesOfCode === 0 && !empty($source)) { if ($linesOfCode === 0 && !empty($source)) {
$linesOfCode = 1; $linesOfCode = 1;

View File

@@ -22,7 +22,7 @@ final class Version
public static function id(): string public static function id(): string
{ {
if (self::$version === null) { if (self::$version === null) {
self::$version = (new VersionId('9.2.13', dirname(__DIR__)))->getVersion(); self::$version = (new VersionId('9.2.15', dirname(__DIR__)))->getVersion();
} }
return self::$version; return self::$version;

View File

@@ -2,7 +2,7 @@
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. 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.24] - 2022-MM-DD ## [8.5.24] - 2022-03-05 - #StandWithUkraine
### Changed ### Changed
@@ -207,7 +207,7 @@ 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` * [#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 * [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
[8.5.24]: https://github.com/sebastianbergmann/phpunit/compare/8.5.23...8.5 [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.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.5.22]: https://github.com/sebastianbergmann/phpunit/compare/8.5.21...8.5.22
[8.5.21]: https://github.com/sebastianbergmann/phpunit/compare/8.5.20...8.5.21 [8.5.21]: https://github.com/sebastianbergmann/phpunit/compare/8.5.20...8.5.21

View File

@@ -2,6 +2,14 @@
All notable changes of the PHPUnit 9.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles. 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.18] - 2022-03-08
### Fixed
* [#4877](https://github.com/sebastianbergmann/phpunit/issues/4877): No stack trace shown when an error occurs during bootstrap
## [9.5.17] - 2022-03-05 - #StandWithUkraine
## [9.5.16] - 2022-02-23 ## [9.5.16] - 2022-02-23
### Changed ### Changed
@@ -134,6 +142,8 @@ 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 * [#4535](https://github.com/sebastianbergmann/phpunit/issues/4535): `getMockFromWsdl()` does not handle methods that do not have parameters correctly
[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
[9.5.16]: https://github.com/sebastianbergmann/phpunit/compare/dc738383c519243b0a967f63943a848d3fd861aa...9.5.16 [9.5.16]: https://github.com/sebastianbergmann/phpunit/compare/dc738383c519243b0a967f63943a848d3fd861aa...9.5.16
[9.5.15]: https://github.com/sebastianbergmann/phpunit/compare/9.5.14...dc738383c519243b0a967f63943a848d3fd861aa [9.5.15]: https://github.com/sebastianbergmann/phpunit/compare/9.5.14...dc738383c519243b0a967f63943a848d3fd861aa
[9.5.14]: https://github.com/sebastianbergmann/phpunit/compare/9.5.13...9.5.14 [9.5.14]: https://github.com/sebastianbergmann/phpunit/compare/9.5.13...9.5.14

View File

@@ -41,7 +41,7 @@ final class Version
} }
if (self::$version === '') { if (self::$version === '') {
self::$version = (new VersionId('9.5.16', dirname(__DIR__, 2)))->getVersion(); self::$version = (new VersionId('9.5.18', dirname(__DIR__, 2)))->getVersion();
} }
return self::$version; return self::$version;
@@ -60,6 +60,6 @@ final class Version
public static function getVersionString(): string public static function getVersionString(): string
{ {
return 'PHPUnit ' . self::id() . ' by Sebastian Bergmann and contributors.'; return 'PHPUnit ' . self::id() . ' #StandWithUkraine';
} }
} }

View File

@@ -567,10 +567,12 @@ class Command
$this->exitWithErrorMessage( $this->exitWithErrorMessage(
sprintf( sprintf(
'Error in bootstrap script: %s:%s%s', 'Error in bootstrap script: %s:%s%s%s%s',
get_class($t), get_class($t),
PHP_EOL, PHP_EOL,
$t->getMessage() $t->getMessage(),
PHP_EOL,
$t->getTraceAsString()
) )
); );
} }

View File

@@ -54,6 +54,7 @@ use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\FilterMapper;
use PHPUnit\TextUI\XmlConfiguration\Configuration; use PHPUnit\TextUI\XmlConfiguration\Configuration;
use PHPUnit\TextUI\XmlConfiguration\Loader; use PHPUnit\TextUI\XmlConfiguration\Loader;
use PHPUnit\TextUI\XmlConfiguration\PhpHandler; use PHPUnit\TextUI\XmlConfiguration\PhpHandler;
use PHPUnit\Util\Color;
use PHPUnit\Util\Filesystem; use PHPUnit\Util\Filesystem;
use PHPUnit\Util\Log\JUnit; use PHPUnit\Util\Log\JUnit;
use PHPUnit\Util\Log\TeamCity; use PHPUnit\Util\Log\TeamCity;
@@ -325,9 +326,18 @@ final class TestRunner extends BaseTestRunner
$this->printer->setShowProgressAnimation(!$arguments['noInteraction']); $this->printer->setShowProgressAnimation(!$arguments['noInteraction']);
} }
$this->printer->write( if ($arguments['colors'] !== DefaultResultPrinter::COLOR_NEVER) {
Version::getVersionString() . "\n" $this->write(
); 'PHPUnit ' .
Version::id() .
' ' .
Color::colorize('bg-blue', '#StandWith') .
Color::colorize('bg-yellow', 'Ukraine') .
"\n"
);
} else {
$this->write(Version::getVersionString() . "\n");
}
foreach ($arguments['listeners'] as $listener) { foreach ($arguments['listeners'] as $listener) {
$result->addListener($listener); $result->addListener($listener);
@@ -614,7 +624,7 @@ final class TestRunner extends BaseTestRunner
exit(self::SUCCESS_EXIT); exit(self::SUCCESS_EXIT);
} }
$this->printer->write("\n"); $this->write("\n");
if (isset($codeCoverage)) { if (isset($codeCoverage)) {
$result->setCodeCoverage($codeCoverage); $result->setCodeCoverage($codeCoverage);
@@ -1239,7 +1249,7 @@ final class TestRunner extends BaseTestRunner
private function codeCoverageGenerationStart(string $format): void private function codeCoverageGenerationStart(string $format): void
{ {
$this->printer->write( $this->write(
sprintf( sprintf(
"\nGenerating code coverage report in %s format ... ", "\nGenerating code coverage report in %s format ... ",
$format $format
@@ -1251,7 +1261,7 @@ final class TestRunner extends BaseTestRunner
private function codeCoverageGenerationSucceeded(): void private function codeCoverageGenerationSucceeded(): void
{ {
$this->printer->write( $this->write(
sprintf( sprintf(
"done [%s]\n", "done [%s]\n",
$this->timer->stop()->asString() $this->timer->stop()->asString()
@@ -1261,7 +1271,7 @@ final class TestRunner extends BaseTestRunner
private function codeCoverageGenerationFailed(\Exception $e): void private function codeCoverageGenerationFailed(\Exception $e): void
{ {
$this->printer->write( $this->write(
sprintf( sprintf(
"failed [%s]\n%s\n", "failed [%s]\n%s\n",
$this->timer->stop()->asString(), $this->timer->stop()->asString(),