20 Commits
Author SHA1 Message Date
Andrey Savchenko 638bf00b89 Released version 3.3.6 2022-02-08 14:51:40 +02:00
Andrey Savchenko 09b7a76bd6 Adjusted inline docs for Psalm to pass 2022-02-08 14:38:17 +02:00
Andrey Savchenko 321cdce5e2 Fixed deprecation notices on PHP 8.1 2022-02-08 14:37:04 +02:00
Andrey Savchenko 15a9081f3b Updated dependencies and required PHP version
Fixes #55
Closes #56
2022-02-08 14:35:58 +02:00
Andrey Savchenko 5481353386 Fixed wrong release date in change log 2021-09-28 11:27:07 +03:00
Andrey Savchenko 9c7bd34d54 Released version 3.3.5 2021-09-28 11:19:21 +03:00
Andrey Savchenko a797c4f406 Adjusted tests for newer Brain Monkey compatibility 2021-09-28 11:16:09 +03:00
Andrey Savchenko a815ba515c Allowed PHP 8, composer/installers 2, and refreshed lock
Fixes #54
2021-09-28 11:14:51 +03:00
Andrey Savchenko 595b696a03 Reduced maximum Server Timing headers size for nginx
See #52
2021-09-28 11:05:51 +03:00
Andrey Savchenko de563bb5d4 Updated plugin header
Fixes #45
2021-09-28 11:01:39 +03:00
Andrey Savchenko 8875774ddb Fixed non-ASCII characters in Server Timing headers
Fixes #48
2020-11-16 16:17:03 +02:00
Andrey Savchenko ccf3ff3738 Released version 3.3.3 (forgot to update plugin version in header as usual) 2020-03-11 13:23:43 +02:00
Andrey Savchenko cc7670f3c3 Released version 3.3.2 2020-03-11 13:19:54 +02:00
Andrey Savchenko f62eff890a Fixed large server timing headers breaking proxies.
Fixes #40
2020-03-11 13:18:41 +02:00
Andrey Savchenko b0584dea0a Fixed type crash when URL passed to network request filters is invalid.
Fixes #42
2020-03-11 12:58:12 +02:00
Andrey Savchenko dc88dcce1e Adjusted bunch of inline doc to make Psalm pass again. 2020-02-21 18:22:53 +02:00
Andrey Savchenko f4f659c95a Changed bootable interface to inherit so mock can work on PHPUnit 9. 2020-02-21 17:19:02 +02:00
Andrey Savchenko 6be80cc832 Updated dependencies (Mustache.php 2.13) 2020-02-21 17:15:00 +02:00
Andrey Savchenko 4930979989 Dropped no longer used version in file name from readme badges. 2020-02-21 17:11:24 +02:00
Andrey Savchenko 168a226859 Changed download links to native github redirect 2019-12-31 16:14:23 +02:00
22 changed files with 386 additions and 169 deletions

No files matched your search

+37
View File
@@ -6,6 +6,43 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
## 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
- reduced maximum Server Timing headers size to 2K (half of possible nginx defaults)
### Fixed
- allowed Composer install on PHP 8
## 3.3.4 - 2020-11-16
### Fixed
- non-ASCII characters in Server Timing headers
## 3.3.3 - 2020-03-11
### Fixed
- wrong plugin version in header
## 3.3.2 - 2020-03-11
### Changed
- `Bootable_Provider_Interface` to extend `ServiceProviderInterface`, so that it can be mocked in PHPUnit 9
### Fixed
- Mustache.php version to resolve issues on PHP 7.4
- type crash when URL passed to network request filters is invalid
- large server timing headers breaking proxies
## 3.3.1 - 2019-07-02
### Fixed
+3 -4
View File
@@ -10,8 +10,7 @@ _Make a site, make it fast._
[![Total Downloads](https://img.shields.io/packagist/dt/rarst/laps.svg)](https://packagist.org/packages/rarst/laps)
[![Latest Stable Version](https://img.shields.io/packagist/v/rarst/laps.svg?label=version)](https://packagist.org/packages/rarst/laps)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/rarst/laps.svg)](https://packagist.org/packages/rarst/laps)
[![PDS Skeleton](https://img.shields.io/badge/pds-skeleton-blue.svg)](https://github.com/php-pds/skeleton)
[![Download Laps](https://img.shields.io/badge/dynamic/json.svg?label=download&url=https://api.github.com/repos/rarst/laps/releases/latest&query=$.assets%5B0%5D.name)](https://www.rarst.net/download/laps)
[![Download Laps](https://img.shields.io/badge/download-laps.zip-blue)](https://github.com/Rarst/laps/releases/latest/download/laps.zip)
Laps is a plugin that **shows performance information** about WordPress page load.
@@ -40,11 +39,11 @@ API requests need to be authenticated as admin for performance data to be sent.
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
| -------------------------------------------------- | -------- |
| `composer require rarst/laps` | [![Download Laps](https://img.shields.io/badge/dynamic/json.svg?label=download&url=https%3A%2F%2Fapi.github.com%2Frepos%2Frarst%2Flaps%2Freleases%2Flatest&query=%24.assets[0].name&style=for-the-badge)](https://www.rarst.net/download/laps) |
| `composer require rarst/laps` | [![Download Laps](https://img.shields.io/badge/download-laps.zip-blue?style=for-the-badge)](https://github.com/Rarst/laps/releases/latest/download/laps.zip) |
## Tests
Tests require [Brain Monkey](https://github.com/Brain-WP/BrainMonkey) (included in dependencies) and PHPUnit 8 (not included).
Tests require [Brain Monkey](https://github.com/Brain-WP/BrainMonkey) (included in dependencies) and PHPUnit 9 (not included).
```bash
phpunit
+10 -5
View File
@@ -8,7 +8,7 @@
"authors" : [
{
"name" : "Andrey Savchenko",
"homepage": "http://www.Rarst.net/"
"homepage": "https://www.Rarst.net/"
}
],
"support" : {
@@ -25,11 +25,11 @@
}
},
"require" : {
"php" : "^7.1.3",
"composer/installers": "^1.6",
"php" : "^7.2.5 || ^8",
"composer/installers": "^1.6 || ^2",
"symfony/stopwatch" : "^4.2.1",
"mustache/mustache" : "^2.12",
"pimple/pimple" : "^3.2.3"
"mustache/mustache" : "^2.14.1",
"pimple/pimple" : "^3.5"
},
"require-dev": {
"twbs/bootstrap": "^3.4",
@@ -49,5 +49,10 @@
"Tests"
]
}
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
Generated
+280 -125
View File
@@ -4,38 +4,39 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a72036af9e80358500e4274847500bcc",
"content-hash": "e87830a8a9b8c2c9587e0c4ac5139f12",
"packages": [
{
"name": "composer/installers",
"version": "v1.6.0",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
"reference": "a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
"url": "https://api.github.com/repos/composer/installers/zipball/a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8",
"reference": "a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0"
},
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
"composer-plugin-api": "^1.0 || ^2.0",
"php": "^7.2 || ^8.0"
},
"require-dev": {
"composer/composer": "1.0.*@dev",
"phpunit/phpunit": "^4.8.36"
"composer/composer": "1.6.* || ^2.0",
"composer/semver": "^1 || ^3",
"phpstan/phpstan": "^0.12.55",
"phpstan/phpstan-phpunit": "^0.12.16",
"symfony/phpunit-bridge": "^5.3",
"symfony/process": "^5"
},
"type": "composer-plugin",
"extra": {
"class": "Composer\\Installers\\Plugin",
"branch-alias": {
"dev-master": "1.0-dev"
"dev-main": "2.x-dev"
}
},
"autoload": {
@@ -57,7 +58,6 @@
"description": "A multi-framework Composer library installer",
"homepage": "https://composer.github.io/installers/",
"keywords": [
"Craft",
"Dolibarr",
"Eliasis",
"Hurad",
@@ -65,6 +65,7 @@
"Kanboard",
"Lan Management System",
"MODX Evo",
"MantisBT",
"Mautic",
"Maya",
"OXID",
@@ -72,10 +73,11 @@
"Porto",
"RadPHP",
"SMF",
"Starbug",
"Thelia",
"Whmcs",
"WolfCMS",
"agl",
"aimeos",
"annotatecms",
"attogram",
"bitrix",
@@ -94,7 +96,7 @@
"grav",
"installer",
"itop",
"joomla",
"known",
"kohana",
"laravel",
"lavalite",
@@ -103,13 +105,16 @@
"majima",
"mako",
"mediawiki",
"miaoxing",
"modulework",
"modx",
"moodle",
"osclass",
"pantheon",
"phpbb",
"piwik",
"ppi",
"processwire",
"puppet",
"pxcms",
"reindex",
@@ -117,27 +122,45 @@
"shopware",
"silverstripe",
"sydes",
"symfony",
"typo3",
"sylius",
"tastyigniter",
"wordpress",
"yawik",
"zend",
"zikula"
],
"time": "2018-08-27T06:10:37+00:00"
"support": {
"issues": "https://github.com/composer/installers/issues",
"source": "https://github.com/composer/installers/tree/v2.0.1"
},
"funding": [
{
"url": "https://packagist.com",
"type": "custom"
},
{
"url": "https://github.com/composer",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
"type": "tidelift"
}
],
"time": "2021-09-13T08:21:20+00:00"
},
{
"name": "mustache/mustache",
"version": "v2.12.0",
"version": "v2.14.1",
"source": {
"type": "git",
"url": "https://github.com/bobthecow/mustache.php.git",
"reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e"
"reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/fe8fe72e9d580591854de404cc59a1b83ca4d19e",
"reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e",
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/579ffa5c96e1d292c060b3dd62811ff01ad8c24e",
"reference": "579ffa5c96e1d292c060b3dd62811ff01ad8c24e",
"shasum": ""
},
"require": {
@@ -170,33 +193,37 @@
"mustache",
"templating"
],
"time": "2017-07-11T12:54:05+00:00"
"support": {
"issues": "https://github.com/bobthecow/mustache.php/issues",
"source": "https://github.com/bobthecow/mustache.php/tree/v2.14.1"
},
"time": "2022-01-21T06:08:36+00:00"
},
{
"name": "pimple/pimple",
"version": "v3.2.3",
"version": "v3.5.0",
"source": {
"type": "git",
"url": "https://github.com/silexphp/Pimple.git",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32"
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32",
"reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32",
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed",
"shasum": ""
},
"require": {
"php": ">=5.3.0",
"psr/container": "^1.0"
"php": ">=7.2.5",
"psr/container": "^1.1 || ^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^3.2"
"symfony/phpunit-bridge": "^5.4@dev"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2.x-dev"
"dev-master": "3.4.x-dev"
}
},
"autoload": {
@@ -215,36 +242,34 @@
}
],
"description": "Pimple, a simple Dependency Injection Container",
"homepage": "http://pimple.sensiolabs.org",
"homepage": "https://pimple.symfony.com",
"keywords": [
"container",
"dependency injection"
],
"time": "2018-01-21T07:42:36+00:00"
"support": {
"source": "https://github.com/silexphp/Pimple/tree/v3.5.0"
},
"time": "2021-10-28T11:13:42+00:00"
},
{
"name": "psr/container",
"version": "1.0.0",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
"php": ">=7.4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -257,7 +282,7 @@
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
"homepage": "https://www.php-fig.org/"
}
],
"description": "Common Container Interface (PHP FIG PSR-11)",
@@ -269,48 +294,42 @@
"container-interop",
"psr"
],
"time": "2017-02-14T16:28:37+00:00"
"support": {
"issues": "https://github.com/php-fig/container/issues",
"source": "https://github.com/php-fig/container/tree/1.1.2"
},
"time": "2021-11-05T16:50:12+00:00"
},
{
"name": "symfony/contracts",
"version": "v1.0.2",
"name": "symfony/deprecation-contracts",
"version": "v2.5.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/contracts.git",
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
},
"require": {
"php": "^7.1.3"
},
"require-dev": {
"psr/cache": "^1.0",
"psr/container": "^1.0"
},
"suggest": {
"psr/cache": "When using the Cache contracts",
"psr/container": "When using the Service contracts",
"symfony/cache-contracts-implementation": "",
"symfony/service-contracts-implementation": "",
"symfony/translation-contracts-implementation": ""
"php": ">=7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\": ""
},
"exclude-from-classmap": [
"**/Tests/"
"files": [
"function.php"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -327,7 +346,82 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "A set of abstractions extracted out of the Symfony components",
"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": ""
},
"require": {
"php": ">=7.2.5",
"psr/container": "^1.1",
"symfony/deprecation-contracts": "^2.1"
},
"conflict": {
"ext-psr": "<1.1|>=2"
},
"suggest": {
"symfony/service-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.5-dev"
},
"thanks": {
"name": "symfony/contracts",
"url": "https://github.com/symfony/contracts"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Service\\": ""
}
},
"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": "Generic abstractions related to writing services",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
@@ -337,32 +431,44 @@
"interoperability",
"standards"
],
"time": "2018-12-05T08:06:11+00:00"
"support": {
"source": "https://github.com/symfony/service-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-11-04T16:48:04+00:00"
},
{
"name": "symfony/stopwatch",
"version": "v4.2.1",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "ec076716412274e51f8a7ea675d9515e5c311123"
"reference": "ad652049cc8d62417a33373f5d69edde4cbb29d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123",
"reference": "ec076716412274e51f8a7ea675d9515e5c311123",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/ad652049cc8d62417a33373f5d69edde4cbb29d5",
"reference": "ad652049cc8d62417a33373f5d69edde4cbb29d5",
"shasum": ""
},
"require": {
"php": "^7.1.3",
"symfony/contracts": "^1.0"
"php": ">=7.1.3",
"symfony/service-contracts": "^1.0|^2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
@@ -385,29 +491,49 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Stopwatch Component",
"description": "Provides a way to profile code",
"homepage": "https://symfony.com",
"time": "2018-11-11T19:52:12+00:00"
"support": {
"source": "https://github.com/symfony/stopwatch/tree/v4.4.37"
},
"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": "2022-01-02T09:41:36+00:00"
}
],
"packages-dev": [
{
"name": "antecedent/patchwork",
"version": "2.1.8",
"version": "2.1.21",
"source": {
"type": "git",
"url": "https://github.com/antecedent/patchwork.git",
"reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7"
"reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
"reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
"reference": "25c1fa0cd9a6e6d0d13863d8df8f050b6733f16d",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": ">=4"
},
"type": "library",
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -430,29 +556,35 @@
"runkit",
"testing"
],
"time": "2018-02-19T18:52:50+00:00"
"support": {
"issues": "https://github.com/antecedent/patchwork/issues",
"source": "https://github.com/antecedent/patchwork/tree/2.1.21"
},
"time": "2022-02-07T07:28:34+00:00"
},
{
"name": "brain/monkey",
"version": "2.2.1",
"version": "2.6.1",
"source": {
"type": "git",
"url": "https://github.com/Brain-WP/BrainMonkey.git",
"reference": "326a537bf518edd61bc57ab275e8b075ebb8a1a9"
"reference": "a31c84515bb0d49be9310f52ef1733980ea8ffbb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/326a537bf518edd61bc57ab275e8b075ebb8a1a9",
"reference": "326a537bf518edd61bc57ab275e8b075ebb8a1a9",
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/a31c84515bb0d49be9310f52ef1733980ea8ffbb",
"reference": "a31c84515bb0d49be9310f52ef1733980ea8ffbb",
"shasum": ""
},
"require": {
"antecedent/patchwork": "^2.0",
"mockery/mockery": ">=0.9 <2",
"antecedent/patchwork": "^2.1.17",
"mockery/mockery": "^1.3.5 || ^1.4.4",
"php": ">=5.6.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7.9"
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"phpcompatibility/php-compatibility": "^9.3.0",
"phpunit/phpunit": "^5.7.26 || ^6.0 || ^7.0 || >=8.0 <8.5.12 || ^8.5.14 || ^9.0"
},
"type": "library",
"extra": {
@@ -494,24 +626,28 @@
"test",
"testing"
],
"time": "2019-03-15T13:42:24+00:00"
"support": {
"issues": "https://github.com/Brain-WP/BrainMonkey/issues",
"source": "https://github.com/Brain-WP/BrainMonkey"
},
"time": "2021-11-11T15:53:55+00:00"
},
{
"name": "hamcrest/hamcrest-php",
"version": "v2.0.0",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/hamcrest/hamcrest-php.git",
"reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
"reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
"reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
"url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
"reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
"shasum": ""
},
"require": {
"php": "^5.3|^7.0"
"php": "^5.3|^7.0|^8.0"
},
"replace": {
"cordoval/hamcrest-php": "*",
@@ -519,14 +655,13 @@
"kodova/hamcrest-php": "*"
},
"require-dev": {
"phpunit/php-file-iterator": "1.3.3",
"phpunit/phpunit": "~4.0",
"satooshi/php-coveralls": "^1.0"
"phpunit/php-file-iterator": "^1.4 || ^2.0",
"phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
"dev-master": "2.1-dev"
}
},
"autoload": {
@@ -536,40 +671,47 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
"BSD-3-Clause"
],
"description": "This is the PHP port of Hamcrest Matchers",
"keywords": [
"test"
],
"time": "2016-01-20T08:20:44+00:00"
"support": {
"issues": "https://github.com/hamcrest/hamcrest-php/issues",
"source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1"
},
"time": "2020-07-09T08:09:16+00:00"
},
{
"name": "mockery/mockery",
"version": "1.2.2",
"version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/mockery/mockery.git",
"reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2"
"reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
"reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
"url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac",
"shasum": ""
},
"require": {
"hamcrest/hamcrest-php": "~2.0",
"hamcrest/hamcrest-php": "^2.0.1",
"lib-pcre": ">=7.0",
"php": ">=5.6.0"
"php": "^7.3 || ^8.0"
},
"conflict": {
"phpunit/phpunit": "<8.0"
},
"require-dev": {
"phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
"phpunit/phpunit": "^8.5 || ^9.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-master": "1.4.x-dev"
}
},
"autoload": {
@@ -607,7 +749,11 @@
"test double",
"testing"
],
"time": "2019-02-13T09:37:52+00:00"
"support": {
"issues": "https://github.com/mockery/mockery/issues",
"source": "https://github.com/mockery/mockery/tree/1.5.0"
},
"time": "2022-01-20T13:18:17+00:00"
},
{
"name": "pds/skeleton",
@@ -638,20 +784,24 @@
],
"description": "Standard for PHP package skeletons.",
"homepage": "https://github.com/php-pds/skeleton",
"support": {
"issues": "https://github.com/php-pds/skeleton/issues",
"source": "https://github.com/php-pds/skeleton/tree/1.x"
},
"time": "2017-01-25T23:30:41+00:00"
},
{
"name": "twbs/bootstrap",
"version": "v3.4.0",
"version": "v3.4.1",
"source": {
"type": "git",
"url": "https://github.com/twbs/bootstrap.git",
"reference": "4c547f2175b9a05aa43551f6927da83fe249ce42"
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/4c547f2175b9a05aa43551f6927da83fe249ce42",
"reference": "4c547f2175b9a05aa43551f6927da83fe249ce42",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e",
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e",
"shasum": ""
},
"replace": {
@@ -689,7 +839,11 @@
"responsive",
"web"
],
"time": "2018-12-13T23:45:51+00:00"
"support": {
"issues": "https://github.com/twbs/bootstrap/issues",
"source": "https://github.com/twbs/bootstrap/tree/v3.4.1"
},
"time": "2019-02-13T15:55:38+00:00"
}
],
"aliases": [],
@@ -698,7 +852,8 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": "^7.1.3"
"php": "^7.2.5 || ^8"
},
"platform-dev": []
"platform-dev": [],
"plugin-api-version": "2.2.0"
}
+3 -3
View File
@@ -5,10 +5,10 @@ Plugin Name: Laps
Plugin URI: https://github.com/Rarst/laps
Description: Light WordPress profiler.
Author: Andrey “Rarst” Savchenko
Version: 3.3.1
Version: 3.3.5
Author URI: https://www.rarst.net/
Text Domain: laps
Domain Path: /lang
Requires PHP: 7.1.3
Update URI: false
License: MIT
*/
+1
View File
@@ -18,5 +18,6 @@
<UndefinedFunction errorLevel="suppress"/>
<UndefinedClass errorLevel="suppress"/>
<UndefinedDocblockClass errorLevel="suppress"/>
<UndefinedConstant errorLevel="suppress"/>
</issueHandlers>
</psalm>
+2 -2
View File
@@ -76,12 +76,12 @@ class Backtrace_Formatter {
}
/**
*
* @psalm-suppress PossiblyFalseOperand
*
* @param string $item Backtrace item.
*
* @return string
*
* @psalm-suppress PossiblyFalseOperand
*/
protected function shorten_include( string $item ): string {
+7 -2
View File
@@ -57,14 +57,19 @@ class Server_Timing_Manager {
foreach ( $this->collector->get_records() as $record ) {
$duration = $record->get_duration() * 1000;
if ( $duration < 1 ) {
if ( $duration < 1 ) { // Filter out less than 1ms events as too noisy.
continue;
}
$header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() );
if ( strlen( $header ) > 2000 ) { // 8+KB headers break proxies, 4+KB nginx, so we cut off at 1/2 that limit.
break;
}
}
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
// Sanitize to visible US ASCII character range (32-126).
header( 'Server-Timing: ' . preg_replace( '/[^\x20-\x7E]/', '', $header ) );
return $input;
}
+2 -2
View File
@@ -11,12 +11,12 @@ class Mustache_Cache_FrozenCache extends \Mustache_Cache_FilesystemCache {
/**
* Cache and load a compiled Mustache_Template class.
*
* @psalm-suppress InvalidScalarArgument
*
* @param string $key Key.
* @param string $value Value.
*
* @return void
*
* @psalm-suppress InvalidScalarArgument
*/
public function cache( $key, $value ): void {
+2 -1
View File
@@ -3,12 +3,13 @@ declare( strict_types=1 );
namespace Rarst\Laps\Provider;
use Pimple\ServiceProviderInterface;
use Rarst\Laps\Plugin;
/**
* Interface for providers that need to boot up once plugin is ready to start.
*/
interface Bootable_Provider_Interface {
interface Bootable_Provider_Interface extends ServiceProviderInterface {
/**
* @param Plugin $laps Container instance.
-1
View File
@@ -78,7 +78,6 @@ class Hook_Collector extends Stopwatch_Collector {
/**
* @var int|string $key
* @var array $data
* @psalm-var array{0:string} $data
*/
foreach ( $stops as $key => $data ) {
+12 -4
View File
@@ -43,11 +43,16 @@ class Http_Collector extends Stopwatch_Collector {
* @param string $url The request URL.
*
* @return false|array|\WP_Error
*
* @psalm-suppress RedundantConditionGivenDocblockType
* @noinspection PhpUnusedParameterInspection
*/
public function pre_http_request( $false, array $args, string $url ) {
public function pre_http_request( $false, $args, $url ) {
if ( $url && is_string( $url ) ) {
$this->start( $url, 'http' );
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );
}
return $false;
}
@@ -61,13 +66,16 @@ class Http_Collector extends Stopwatch_Collector {
* @param array $args HTTP request arguments.
* @param string $url The request URL.
*
* @return mixed
* @return array|\WP_Error
*
* @noinspection MoreThanThreeArgumentsInspection
* @psalm-suppress RedundantConditionGivenDocblockType
* @noinspection PhpUnusedParameterInspection
*/
public function http_api_debug( $response, string $type, $class, array $args, string $url ) {
public function http_api_debug( $response, $type, $class, $args, $url ) {
if ( $url && is_string( $url ) ) {
$this->stop( $url );
}
return $response;
}
@@ -31,6 +31,8 @@ class Plugin_Load_Collector implements Record_Collector_Interface {
* Records time for a plugin that just finished loading.
*
* @param string $plugin Plugin file path.
*
* @psalm-suppress DocblockTypeContradiction
*/
public function plugin_loaded( $plugin ): void {
@@ -7,6 +7,9 @@ use Rarst\Laps\Record\Record_Interface;
/**
* 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 {
@@ -15,7 +18,7 @@ class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIter
/**
* @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 ) {
@@ -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_Interface;
use Rarst\Laps\Record\Iterator\Recursive_Record_Iterator;
/**
* Processes records into sets for display by template.
*
* @template-implements \Iterator<array>
*
* @psalm-suppress PropertyNotSetInConstructor
*/
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
*
* @return void
* @return null
*/
public function key(): void {
public function key(): ?int {
return null;
}
/**
+2 -2
View File
@@ -20,8 +20,8 @@ class AssetTest extends LapsTestCase {
$manager = new Asset_Manager();
$this->assertTrue( has_action( 'wp_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) );
$this->assertTrue( has_action( 'admin_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) );
$this->assertTrue( (bool) has_action( 'wp_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) );
$this->assertTrue( (bool) has_action( 'admin_enqueue_scripts', [ $manager, 'enqueue_scripts' ] ) );
return $manager;
}
+2 -2
View File
@@ -20,8 +20,8 @@ class LoadOrderTest extends LapsTestCase {
$manager = new Load_Order_Manager();
$this->assertTrue( has_action( 'pre_update_option_active_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) );
$this->assertTrue( has_action( 'pre_update_site_option_active_sitewide_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) );
$this->assertTrue( (bool) has_action( 'pre_update_option_active_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) );
$this->assertTrue( (bool) has_action( 'pre_update_site_option_active_sitewide_plugins', [ $manager, 'pre_update_option_active_plugins' ] ) );
return $manager;
+1 -1
View File
@@ -23,7 +23,7 @@ class ToolbarTest extends LapsTestCase {
$collector = new Lazy_Proxy_Collector( [] );
$manager = new Toolbar_Manager( $collector, new \Mustache_Engine() );
$this->assertTrue( has_action( 'admin_bar_menu', [ $manager, 'admin_bar_menu' ] ) );
$this->assertTrue( (bool) has_action( 'admin_bar_menu', [ $manager, 'admin_bar_menu' ] ) );
return $manager;
}
+1 -2
View File
@@ -3,7 +3,6 @@
namespace Rarst\Laps\Tests;
use Brain\Monkey\Functions;
use Pimple\ServiceProviderInterface;
use Rarst\Laps\Provider\Bootable_Provider_Interface;
class PluginTest extends LapsTestCase {
@@ -12,7 +11,7 @@ class PluginTest extends LapsTestCase {
$container = new \Rarst\Laps\Plugin();
$service = $this->getMockBuilder( [ ServiceProviderInterface::class, Bootable_Provider_Interface::class ] )
$service = $this->getMockBuilder( Bootable_Provider_Interface::class )
->getMock();
$service->expects( $this->once() )
+2 -2
View File
@@ -18,9 +18,9 @@ class HookTest extends LapsTestCase {
$stopwatch = new Stopwatch();
$collector = new Hook_Collector( $stopwatch, [ 'core' => new Core_Events() ] );
$this->assertTrue( has_action( 'after_setup_theme', [ $collector, 'after_setup_theme' ] ) );
$this->assertTrue( (bool) has_action( 'after_setup_theme', [ $collector, 'after_setup_theme' ] ) );
$this->assertTrue( has_action( 'plugins_loaded', 'function ($input)' ) );
$this->assertTrue( (bool) has_action( 'plugins_loaded', 'function ($input)' ) );
$collector->after_setup_theme();
$stopwatch->start( 'Toolbar' );
+2 -2
View File
@@ -18,8 +18,8 @@ class HttpTest extends LapsTestCase {
$url = 'https://example.com/';
$collector = new Http_Collector( $stopwatch );
$this->assertTrue( has_action( 'pre_http_request', [ $collector, 'pre_http_request' ] ) );
$this->assertTrue( has_action( 'http_api_debug', [ $collector, 'http_api_debug' ] ) );
$this->assertTrue( (bool) has_action( 'pre_http_request', [ $collector, 'pre_http_request' ] ) );
$this->assertTrue( (bool) has_action( 'http_api_debug', [ $collector, 'http_api_debug' ] ) );
$collector->pre_http_request( false, [], $url );
+1 -1
View File
@@ -24,7 +24,7 @@ class SqlTest extends LapsTestCase {
$collector = new Sql_Collector();
$this->assertTrue( has_filter( 'query', [ $collector, 'query' ] ) );
$this->assertTrue( (bool) has_filter( 'query', [ $collector, 'query' ] ) );
$query = 'SELECT * FROM wp_posts';