Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccf3ff3738 | ||
|
|
cc7670f3c3 | ||
|
|
f62eff890a | ||
|
|
b0584dea0a | ||
|
|
dc88dcce1e | ||
|
|
f4f659c95a | ||
|
|
6be80cc832 | ||
|
|
4930979989 | ||
|
|
168a226859 |
No files matched your search
@@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## 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
|
## 3.3.1 - 2019-07-02
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ _Make a site, make it fast._
|
|||||||
[](https://packagist.org/packages/rarst/laps)
|
[](https://packagist.org/packages/rarst/laps)
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
[](https://packagist.org/packages/rarst/laps)
|
||||||
[](https://github.com/php-pds/skeleton)
|
[](https://github.com/php-pds/skeleton)
|
||||||
[](https://www.rarst.net/download/laps)
|
[](https://github.com/Rarst/laps/releases/latest/download/laps.zip)
|
||||||
|
|
||||||
Laps is a plugin that **shows performance information** about WordPress page load.
|
Laps is a plugin that **shows performance information** about WordPress page load.
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ API requests need to be authenticated as admin for performance data to be sent.
|
|||||||
|
|
||||||
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
||||||
| -------------------------------------------------- | -------- |
|
| -------------------------------------------------- | -------- |
|
||||||
| `composer require rarst/laps` | [](https://www.rarst.net/download/laps) |
|
| `composer require rarst/laps` | [](https://github.com/Rarst/laps/releases/latest/download/laps.zip) |
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|||||||
Generated
+61
-62
@@ -8,16 +8,16 @@
|
|||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/installers",
|
"name": "composer/installers",
|
||||||
"version": "v1.6.0",
|
"version": "v1.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/composer/installers.git",
|
"url": "https://github.com/composer/installers.git",
|
||||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
|
"reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
"url": "https://api.github.com/repos/composer/installers/zipball/7d610d50aae61ae7ed6675e58efeabdf279bb5e3",
|
||||||
"reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
|
"reference": "7d610d50aae61ae7ed6675e58efeabdf279bb5e3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -65,6 +65,7 @@
|
|||||||
"Kanboard",
|
"Kanboard",
|
||||||
"Lan Management System",
|
"Lan Management System",
|
||||||
"MODX Evo",
|
"MODX Evo",
|
||||||
|
"MantisBT",
|
||||||
"Mautic",
|
"Mautic",
|
||||||
"Maya",
|
"Maya",
|
||||||
"OXID",
|
"OXID",
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
"RadPHP",
|
"RadPHP",
|
||||||
"SMF",
|
"SMF",
|
||||||
"Thelia",
|
"Thelia",
|
||||||
|
"Whmcs",
|
||||||
"WolfCMS",
|
"WolfCMS",
|
||||||
"agl",
|
"agl",
|
||||||
"aimeos",
|
"aimeos",
|
||||||
@@ -95,6 +97,7 @@
|
|||||||
"installer",
|
"installer",
|
||||||
"itop",
|
"itop",
|
||||||
"joomla",
|
"joomla",
|
||||||
|
"known",
|
||||||
"kohana",
|
"kohana",
|
||||||
"laravel",
|
"laravel",
|
||||||
"lavalite",
|
"lavalite",
|
||||||
@@ -117,6 +120,7 @@
|
|||||||
"shopware",
|
"shopware",
|
||||||
"silverstripe",
|
"silverstripe",
|
||||||
"sydes",
|
"sydes",
|
||||||
|
"sylius",
|
||||||
"symfony",
|
"symfony",
|
||||||
"typo3",
|
"typo3",
|
||||||
"wordpress",
|
"wordpress",
|
||||||
@@ -124,20 +128,20 @@
|
|||||||
"zend",
|
"zend",
|
||||||
"zikula"
|
"zikula"
|
||||||
],
|
],
|
||||||
"time": "2018-08-27T06:10:37+00:00"
|
"time": "2020-02-07T10:39:20+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mustache/mustache",
|
"name": "mustache/mustache",
|
||||||
"version": "v2.12.0",
|
"version": "v2.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/bobthecow/mustache.php.git",
|
"url": "https://github.com/bobthecow/mustache.php.git",
|
||||||
"reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e"
|
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/fe8fe72e9d580591854de404cc59a1b83ca4d19e",
|
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4",
|
||||||
"reference": "fe8fe72e9d580591854de404cc59a1b83ca4d19e",
|
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -170,7 +174,7 @@
|
|||||||
"mustache",
|
"mustache",
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"time": "2017-07-11T12:54:05+00:00"
|
"time": "2019-11-23T21:40:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pimple/pimple",
|
"name": "pimple/pimple",
|
||||||
@@ -272,46 +276,36 @@
|
|||||||
"time": "2017-02-14T16:28:37+00:00"
|
"time": "2017-02-14T16:28:37+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/service-contracts",
|
||||||
"version": "v1.0.2",
|
"version": "v2.0.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/contracts.git",
|
"url": "https://github.com/symfony/service-contracts.git",
|
||||||
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf"
|
"reference": "144c5e51266b281231e947b51223ba14acf1a749"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf",
|
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/144c5e51266b281231e947b51223ba14acf1a749",
|
||||||
"reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf",
|
"reference": "144c5e51266b281231e947b51223ba14acf1a749",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3"
|
"php": "^7.2.5",
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"psr/cache": "^1.0",
|
|
||||||
"psr/container": "^1.0"
|
"psr/container": "^1.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"psr/cache": "When using the Cache contracts",
|
"symfony/service-implementation": ""
|
||||||
"psr/container": "When using the Service contracts",
|
|
||||||
"symfony/cache-contracts-implementation": "",
|
|
||||||
"symfony/service-contracts-implementation": "",
|
|
||||||
"symfony/translation-contracts-implementation": ""
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0-dev"
|
"dev-master": "2.0-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Symfony\\Contracts\\": ""
|
"Symfony\\Contracts\\Service\\": ""
|
||||||
},
|
}
|
||||||
"exclude-from-classmap": [
|
|
||||||
"**/Tests/"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
@@ -327,7 +321,7 @@
|
|||||||
"homepage": "https://symfony.com/contributors"
|
"homepage": "https://symfony.com/contributors"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "A set of abstractions extracted out of the Symfony components",
|
"description": "Generic abstractions related to writing services",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"abstractions",
|
"abstractions",
|
||||||
@@ -337,30 +331,30 @@
|
|||||||
"interoperability",
|
"interoperability",
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"time": "2018-12-05T08:06:11+00:00"
|
"time": "2019-11-18T17:27:11+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/stopwatch",
|
"name": "symfony/stopwatch",
|
||||||
"version": "v4.2.1",
|
"version": "v4.4.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/stopwatch.git",
|
"url": "https://github.com/symfony/stopwatch.git",
|
||||||
"reference": "ec076716412274e51f8a7ea675d9515e5c311123"
|
"reference": "abc08d7c48987829bac301347faa10f7e8bbf4fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123",
|
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/abc08d7c48987829bac301347faa10f7e8bbf4fb",
|
||||||
"reference": "ec076716412274e51f8a7ea675d9515e5c311123",
|
"reference": "abc08d7c48987829bac301347faa10f7e8bbf4fb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
"symfony/contracts": "^1.0"
|
"symfony/service-contracts": "^1.0|^2"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "4.2-dev"
|
"dev-master": "4.4-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -387,27 +381,30 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony Stopwatch Component",
|
"description": "Symfony Stopwatch Component",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"time": "2018-11-11T19:52:12+00:00"
|
"time": "2020-01-04T13:00:46+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "antecedent/patchwork",
|
"name": "antecedent/patchwork",
|
||||||
"version": "2.1.8",
|
"version": "2.1.12",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/antecedent/patchwork.git",
|
"url": "https://github.com/antecedent/patchwork.git",
|
||||||
"reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7"
|
"reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
|
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/b98e046dd4c0acc34a0846604f06f6111654d9ea",
|
||||||
"reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
|
"reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4.0"
|
"php": ">=5.4.0"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": ">=4"
|
||||||
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
@@ -430,20 +427,20 @@
|
|||||||
"runkit",
|
"runkit",
|
||||||
"testing"
|
"testing"
|
||||||
],
|
],
|
||||||
"time": "2018-02-19T18:52:50+00:00"
|
"time": "2019-12-22T17:52:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brain/monkey",
|
"name": "brain/monkey",
|
||||||
"version": "2.2.1",
|
"version": "2.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Brain-WP/BrainMonkey.git",
|
"url": "https://github.com/Brain-WP/BrainMonkey.git",
|
||||||
"reference": "326a537bf518edd61bc57ab275e8b075ebb8a1a9"
|
"reference": "b3ce8b619c26db6abd01b9dcfd6a2c0254060956"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/326a537bf518edd61bc57ab275e8b075ebb8a1a9",
|
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/b3ce8b619c26db6abd01b9dcfd6a2c0254060956",
|
||||||
"reference": "326a537bf518edd61bc57ab275e8b075ebb8a1a9",
|
"reference": "b3ce8b619c26db6abd01b9dcfd6a2c0254060956",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -452,7 +449,9 @@
|
|||||||
"php": ">=5.6.0"
|
"php": ">=5.6.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "~5.7.9"
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.4",
|
||||||
|
"phpcompatibility/php-compatibility": "^9.3.0",
|
||||||
|
"phpunit/phpunit": "^5.7.9 || ^6.0 || ^7.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -494,7 +493,7 @@
|
|||||||
"test",
|
"test",
|
||||||
"testing"
|
"testing"
|
||||||
],
|
],
|
||||||
"time": "2019-03-15T13:42:24+00:00"
|
"time": "2019-11-24T16:03:21+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "hamcrest/hamcrest-php",
|
"name": "hamcrest/hamcrest-php",
|
||||||
@@ -546,16 +545,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mockery/mockery",
|
"name": "mockery/mockery",
|
||||||
"version": "1.2.2",
|
"version": "1.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/mockery/mockery.git",
|
"url": "https://github.com/mockery/mockery.git",
|
||||||
"reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2"
|
"reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
|
"url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
|
||||||
"reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
|
"reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -569,7 +568,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.0.x-dev"
|
"dev-master": "1.3.x-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -607,7 +606,7 @@
|
|||||||
"test double",
|
"test double",
|
||||||
"testing"
|
"testing"
|
||||||
],
|
],
|
||||||
"time": "2019-02-13T09:37:52+00:00"
|
"time": "2019-12-26T09:49:15+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pds/skeleton",
|
"name": "pds/skeleton",
|
||||||
@@ -642,16 +641,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twbs/bootstrap",
|
"name": "twbs/bootstrap",
|
||||||
"version": "v3.4.0",
|
"version": "v3.4.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twbs/bootstrap.git",
|
"url": "https://github.com/twbs/bootstrap.git",
|
||||||
"reference": "4c547f2175b9a05aa43551f6927da83fe249ce42"
|
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/4c547f2175b9a05aa43551f6927da83fe249ce42",
|
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e",
|
||||||
"reference": "4c547f2175b9a05aa43551f6927da83fe249ce42",
|
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"replace": {
|
"replace": {
|
||||||
@@ -689,7 +688,7 @@
|
|||||||
"responsive",
|
"responsive",
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"time": "2018-12-13T23:45:51+00:00"
|
"time": "2019-02-13T15:55:38+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Plugin Name: Laps
|
|||||||
Plugin URI: https://github.com/Rarst/laps
|
Plugin URI: https://github.com/Rarst/laps
|
||||||
Description: Light WordPress profiler.
|
Description: Light WordPress profiler.
|
||||||
Author: Andrey “Rarst” Savchenko
|
Author: Andrey “Rarst” Savchenko
|
||||||
Version: 3.3.1
|
Version: 3.3.3
|
||||||
Author URI: https://www.rarst.net/
|
Author URI: https://www.rarst.net/
|
||||||
Text Domain: laps
|
Text Domain: laps
|
||||||
Domain Path: /lang
|
Domain Path: /lang
|
||||||
|
|||||||
@@ -18,5 +18,6 @@
|
|||||||
<UndefinedFunction errorLevel="suppress"/>
|
<UndefinedFunction errorLevel="suppress"/>
|
||||||
<UndefinedClass errorLevel="suppress"/>
|
<UndefinedClass errorLevel="suppress"/>
|
||||||
<UndefinedDocblockClass errorLevel="suppress"/>
|
<UndefinedDocblockClass errorLevel="suppress"/>
|
||||||
|
<UndefinedConstant errorLevel="suppress"/>
|
||||||
</issueHandlers>
|
</issueHandlers>
|
||||||
</psalm>
|
</psalm>
|
||||||
@@ -76,12 +76,12 @@ class Backtrace_Formatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* @psalm-suppress PossiblyFalseOperand
|
||||||
*
|
*
|
||||||
* @param string $item Backtrace item.
|
* @param string $item Backtrace item.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
|
||||||
* @psalm-suppress PossiblyFalseOperand
|
|
||||||
*/
|
*/
|
||||||
protected function shorten_include( string $item ): string {
|
protected function shorten_include( string $item ): string {
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,15 @@ class Server_Timing_Manager {
|
|||||||
foreach ( $this->collector->get_records() as $record ) {
|
foreach ( $this->collector->get_records() as $record ) {
|
||||||
$duration = $record->get_duration() * 1000;
|
$duration = $record->get_duration() * 1000;
|
||||||
|
|
||||||
if ( $duration < 1 ) {
|
if ( $duration < 1 ) { // Filter out less than 1ms events as too noisy.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() );
|
$header .= sprintf( '%s;dur=%.2f;desc="%s", ', $record->get_category(), $duration, $record->get_name() );
|
||||||
|
|
||||||
|
if ( strlen( $header ) > 4000 ) { // 8+KB headers break proxies, so we cut off at 1/2 that limit.
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
|
header( 'Server-Timing: ' . preg_replace( '/\R/', '', $header ) );
|
||||||
|
|||||||
@@ -11,12 +11,12 @@ class Mustache_Cache_FrozenCache extends \Mustache_Cache_FilesystemCache {
|
|||||||
/**
|
/**
|
||||||
* Cache and load a compiled Mustache_Template class.
|
* Cache and load a compiled Mustache_Template class.
|
||||||
*
|
*
|
||||||
|
* @psalm-suppress InvalidScalarArgument
|
||||||
|
*
|
||||||
* @param string $key Key.
|
* @param string $key Key.
|
||||||
* @param string $value Value.
|
* @param string $value Value.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
|
||||||
* @psalm-suppress InvalidScalarArgument
|
|
||||||
*/
|
*/
|
||||||
public function cache( $key, $value ): void {
|
public function cache( $key, $value ): void {
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,13 @@ declare( strict_types=1 );
|
|||||||
|
|
||||||
namespace Rarst\Laps\Provider;
|
namespace Rarst\Laps\Provider;
|
||||||
|
|
||||||
|
use Pimple\ServiceProviderInterface;
|
||||||
use Rarst\Laps\Plugin;
|
use Rarst\Laps\Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for providers that need to boot up once plugin is ready to start.
|
* 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.
|
* @param Plugin $laps Container instance.
|
||||||
|
|||||||
@@ -43,11 +43,16 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
* @param string $url The request URL.
|
* @param string $url The request URL.
|
||||||
*
|
*
|
||||||
* @return false|array|\WP_Error
|
* @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->start( $url, 'http' );
|
||||||
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );
|
$this->callers[ $url ] = wp_debug_backtrace_summary( __CLASS__, 5 );
|
||||||
|
}
|
||||||
|
|
||||||
return $false;
|
return $false;
|
||||||
}
|
}
|
||||||
@@ -61,13 +66,16 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
* @param array $args HTTP request arguments.
|
* @param array $args HTTP request arguments.
|
||||||
* @param string $url The request URL.
|
* @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 );
|
$this->stop( $url );
|
||||||
|
}
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ class Plugin_Load_Collector implements Record_Collector_Interface {
|
|||||||
* Records time for a plugin that just finished loading.
|
* Records time for a plugin that just finished loading.
|
||||||
*
|
*
|
||||||
* @param string $plugin Plugin file path.
|
* @param string $plugin Plugin file path.
|
||||||
|
*
|
||||||
|
* @psalm-suppress DocblockTypeContradiction
|
||||||
*/
|
*/
|
||||||
public function plugin_loaded( $plugin ): void {
|
public function plugin_loaded( $plugin ): void {
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
namespace Rarst\Laps\Tests;
|
namespace Rarst\Laps\Tests;
|
||||||
|
|
||||||
use Brain\Monkey\Functions;
|
use Brain\Monkey\Functions;
|
||||||
use Pimple\ServiceProviderInterface;
|
|
||||||
use Rarst\Laps\Provider\Bootable_Provider_Interface;
|
use Rarst\Laps\Provider\Bootable_Provider_Interface;
|
||||||
|
|
||||||
class PluginTest extends LapsTestCase {
|
class PluginTest extends LapsTestCase {
|
||||||
@@ -12,7 +11,7 @@ class PluginTest extends LapsTestCase {
|
|||||||
|
|
||||||
$container = new \Rarst\Laps\Plugin();
|
$container = new \Rarst\Laps\Plugin();
|
||||||
|
|
||||||
$service = $this->getMockBuilder( [ ServiceProviderInterface::class, Bootable_Provider_Interface::class ] )
|
$service = $this->getMockBuilder( Bootable_Provider_Interface::class )
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$service->expects( $this->once() )
|
$service->expects( $this->once() )
|
||||||
|
|||||||
Reference in new issue
Block a user