5 Commits
6 changed files with 165 additions and 75 deletions

No files matched your search

+10 -1
View File
@@ -6,7 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased ## Unreleased
## 3.3.5 - 2021-09-21 ## 3.3.6 - 2022-02-08
### Changed
- updated dependencies (Mustache.php, Pimple)
- minimum required PHP version 7.2.5 (was de-facto required by dependencies before)
### Fixed
- deprecation notices on PHP 8.1
## 3.3.5 - 2021-09-28
### Changed ### Changed
- reduced maximum Server Timing headers size to 2K (half of possible nginx defaults) - reduced maximum Server Timing headers size to 2K (half of possible nginx defaults)
+9 -4
View File
@@ -8,7 +8,7 @@
"authors" : [ "authors" : [
{ {
"name" : "Andrey Savchenko", "name" : "Andrey Savchenko",
"homepage": "http://www.Rarst.net/" "homepage": "https://www.Rarst.net/"
} }
], ],
"support" : { "support" : {
@@ -25,11 +25,11 @@
} }
}, },
"require" : { "require" : {
"php" : "^7.1.3 || ^8", "php" : "^7.2.5 || ^8",
"composer/installers": "^1.6 || ^2", "composer/installers": "^1.6 || ^2",
"symfony/stopwatch" : "^4.2.1", "symfony/stopwatch" : "^4.2.1",
"mustache/mustache" : "^2.12", "mustache/mustache" : "^2.14.1",
"pimple/pimple" : "^3.2.3" "pimple/pimple" : "^3.5"
}, },
"require-dev": { "require-dev": {
"twbs/bootstrap": "^3.4", "twbs/bootstrap": "^3.4",
@@ -49,5 +49,10 @@
"Tests" "Tests"
] ]
} }
},
"config": {
"allow-plugins": {
"composer/installers": true
}
} }
} }
Generated
+132 -61
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "56d31c242653d4e375949ef0356705dc", "content-hash": "e87830a8a9b8c2c9587e0c4ac5139f12",
"packages": [ "packages": [
{ {
"name": "composer/installers", "name": "composer/installers",
@@ -151,16 +151,16 @@
}, },
{ {
"name": "mustache/mustache", "name": "mustache/mustache",
"version": "v2.13.0", "version": "v2.14.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/bobthecow/mustache.php.git", "url": "https://github.com/bobthecow/mustache.php.git",
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4" "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4", "url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/579ffa5c96e1d292c060b3dd62811ff01ad8c24e",
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4", "reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -195,30 +195,30 @@
], ],
"support": { "support": {
"issues": "https://github.com/bobthecow/mustache.php/issues", "issues": "https://github.com/bobthecow/mustache.php/issues",
"source": "https://github.com/bobthecow/mustache.php/tree/master" "source": "https://github.com/bobthecow/mustache.php/tree/v2.14.1"
}, },
"time": "2019-11-23T21:40:31+00:00" "time": "2022-01-21T06:08:36+00:00"
}, },
{ {
"name": "pimple/pimple", "name": "pimple/pimple",
"version": "v3.4.0", "version": "v3.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/silexphp/Pimple.git", "url": "https://github.com/silexphp/Pimple.git",
"reference": "86406047271859ffc13424a048541f4531f53601" "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/86406047271859ffc13424a048541f4531f53601", "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"reference": "86406047271859ffc13424a048541f4531f53601", "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
"psr/container": "^1.1" "psr/container": "^1.1 || ^2.0"
}, },
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "^5.0" "symfony/phpunit-bridge": "^5.4@dev"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -248,26 +248,26 @@
"dependency injection" "dependency injection"
], ],
"support": { "support": {
"source": "https://github.com/silexphp/Pimple/tree/v3.4.0" "source": "https://github.com/silexphp/Pimple/tree/v3.5.0"
}, },
"time": "2021-03-06T08:28:00+00:00" "time": "2021-10-28T11:13:42+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
"version": "1.1.1", "version": "1.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-fig/container.git", "url": "https://github.com/php-fig/container.git",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.0" "php": ">=7.4.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@@ -296,27 +296,98 @@
], ],
"support": { "support": {
"issues": "https://github.com/php-fig/container/issues", "issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.1" "source": "https://github.com/php-fig/container/tree/1.1.2"
}, },
"time": "2021-03-05T17:36:06+00:00" "time": "2021-11-05T16:50:12+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/deprecation-contracts",
"version": "v2.4.0", "version": "v2.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/service-contracts.git", "url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb" "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "A generic function and convention to trigger deprecation notices",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2021-07-12T14:48:14+00:00"
},
{
"name": "symfony/service-contracts",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/service-contracts.git",
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
"psr/container": "^1.1" "psr/container": "^1.1",
"symfony/deprecation-contracts": "^2.1"
},
"conflict": {
"ext-psr": "<1.1|>=2"
}, },
"suggest": { "suggest": {
"symfony/service-implementation": "" "symfony/service-implementation": ""
@@ -324,7 +395,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "2.4-dev" "dev-main": "2.5-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/contracts", "name": "symfony/contracts",
@@ -361,7 +432,7 @@
"standards" "standards"
], ],
"support": { "support": {
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0" "source": "https://github.com/symfony/service-contracts/tree/v2.5.0"
}, },
"funding": [ "funding": [
{ {
@@ -377,20 +448,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-04-01T10:43:52+00:00" "time": "2021-11-04T16:48:04+00:00"
}, },
{ {
"name": "symfony/stopwatch", "name": "symfony/stopwatch",
"version": "v4.4.27", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/stopwatch.git", "url": "https://github.com/symfony/stopwatch.git",
"reference": "c85d997af06a58ba83e2d2538e335b894c24523d" "reference": "ad652049cc8d62417a33373f5d69edde4cbb29d5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/c85d997af06a58ba83e2d2538e335b894c24523d", "url": "https://api.github.com/repos/symfony/stopwatch/zipball/ad652049cc8d62417a33373f5d69edde4cbb29d5",
"reference": "c85d997af06a58ba83e2d2538e335b894c24523d", "reference": "ad652049cc8d62417a33373f5d69edde4cbb29d5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -423,7 +494,7 @@
"description": "Provides a way to profile code", "description": "Provides a way to profile code",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/stopwatch/tree/v4.4.27" "source": "https://github.com/symfony/stopwatch/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -439,22 +510,22 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-10T08:41:57+00:00" "time": "2022-01-02T09:41:36+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
{ {
"name": "antecedent/patchwork", "name": "antecedent/patchwork",
"version": "2.1.15", "version": "2.1.21",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/antecedent/patchwork.git", "url": "https://github.com/antecedent/patchwork.git",
"reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961" "reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/0430ceaac7f447f1778c199ec19d7e4362a6f961", "url": "https://api.github.com/repos/antecedent/patchwork/zipball/25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
"reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961", "reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -487,33 +558,33 @@
], ],
"support": { "support": {
"issues": "https://github.com/antecedent/patchwork/issues", "issues": "https://github.com/antecedent/patchwork/issues",
"source": "https://github.com/antecedent/patchwork/tree/2.1.15" "source": "https://github.com/antecedent/patchwork/tree/2.1.21"
}, },
"time": "2021-08-22T08:00:13+00:00" "time": "2022-02-07T07:28:34+00:00"
}, },
{ {
"name": "brain/monkey", "name": "brain/monkey",
"version": "2.6.0", "version": "2.6.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Brain-WP/BrainMonkey.git", "url": "https://github.com/Brain-WP/BrainMonkey.git",
"reference": "7042140000b4b18034c0c0010d86274a00f25442" "reference": "a31c84515bb0d49be9310f52ef1733980ea8ffbb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/7042140000b4b18034c0c0010d86274a00f25442", "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/a31c84515bb0d49be9310f52ef1733980ea8ffbb",
"reference": "7042140000b4b18034c0c0010d86274a00f25442", "reference": "a31c84515bb0d49be9310f52ef1733980ea8ffbb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"antecedent/patchwork": "^2.0", "antecedent/patchwork": "^2.1.17",
"mockery/mockery": ">=0.9 <2", "mockery/mockery": "^1.3.5 || ^1.4.4",
"php": ">=5.6.0" "php": ">=5.6.0"
}, },
"require-dev": { "require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6 || ^0.7", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"phpcompatibility/php-compatibility": "^9.3.0", "phpcompatibility/php-compatibility": "^9.3.0",
"phpunit/phpunit": "^5.7.9 || ^6.0 || ^7.0 || ^8.0 || ^9.0" "phpunit/phpunit": "^5.7.26 || ^6.0 || ^7.0 || >=8.0 <8.5.12 || ^8.5.14 || ^9.0"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
@@ -559,7 +630,7 @@
"issues": "https://github.com/Brain-WP/BrainMonkey/issues", "issues": "https://github.com/Brain-WP/BrainMonkey/issues",
"source": "https://github.com/Brain-WP/BrainMonkey" "source": "https://github.com/Brain-WP/BrainMonkey"
}, },
"time": "2020-10-13T17:56:14+00:00" "time": "2021-11-11T15:53:55+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@@ -614,16 +685,16 @@
}, },
{ {
"name": "mockery/mockery", "name": "mockery/mockery",
"version": "1.4.4", "version": "1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/mockery/mockery.git", "url": "https://github.com/mockery/mockery.git",
"reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -680,9 +751,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/mockery/mockery/issues", "issues": "https://github.com/mockery/mockery/issues",
"source": "https://github.com/mockery/mockery/tree/1.4.4" "source": "https://github.com/mockery/mockery/tree/1.5.0"
}, },
"time": "2021-09-13T15:28:59+00:00" "time": "2022-01-20T13:18:17+00:00"
}, },
{ {
"name": "pds/skeleton", "name": "pds/skeleton",
@@ -781,8 +852,8 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.1.3 || ^8" "php": "^7.2.5 || ^8"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.1.0" "plugin-api-version": "2.2.0"
} }
-1
View File
@@ -78,7 +78,6 @@ class Hook_Collector extends Stopwatch_Collector {
/** /**
* @var int|string $key * @var int|string $key
* @var array $data * @var array $data
* @psalm-var array{0:string} $data
*/ */
foreach ( $stops as $key => $data ) { foreach ( $stops as $key => $data ) {
@@ -7,6 +7,9 @@ use Rarst\Laps\Record\Record_Interface;
/** /**
* Processes records, recursively bumping overlapping ones to children. * Processes records, recursively bumping overlapping ones to children.
*
* @template-extends \ArrayIterator<array-key,Record_Interface>
* @template-implements \RecursiveIterator<array-key,Record_Interface>
*/ */
class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator { class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator {
@@ -15,7 +18,7 @@ class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIter
/** /**
* @param Record_Interface[] $records Records to process. * @param Record_Interface[] $records Records to process.
* @param int $flags Configuration flags. * @psalm-param 0|1|2|3 $flags Configuration flags.
*/ */
public function __construct( array $records, int $flags = 0 ) { public function __construct( array $records, int $flags = 0 ) {
@@ -67,10 +70,10 @@ class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIter
} }
/** /**
* @return static * This should be `static` for possible subclassing, but problems hinting that for PHP <8, also don't subclass this.
*/ */
public function getChildren() { public function getChildren(): self {
return new static( $this->children ); return new self( $this->children );
} }
} }
+7 -4
View File
@@ -5,11 +5,12 @@ namespace Rarst\Laps\Record\Iterator;
use Rarst\Laps\Record\Record; use Rarst\Laps\Record\Record;
use Rarst\Laps\Record\Record_Interface; use Rarst\Laps\Record\Record_Interface;
use Rarst\Laps\Record\Iterator\Recursive_Record_Iterator;
/** /**
* Processes records into sets for display by template. * Processes records into sets for display by template.
* *
* @template-implements \Iterator<array>
*
* @psalm-suppress PropertyNotSetInConstructor * @psalm-suppress PropertyNotSetInConstructor
*/ */
class Timeline_Iterator implements \Iterator { class Timeline_Iterator implements \Iterator {
@@ -60,12 +61,14 @@ class Timeline_Iterator implements \Iterator {
} }
/** /**
* Key is unused and is only type hinted to possible `int` for PHP 8.1 `mixed` type compatibility.
*
* @codeCoverageIgnore * @codeCoverageIgnore
* *
* @return void * @return null
*/ */
public function key(): void { public function key(): ?int {
return null;
} }
/** /**