Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6864095646 | ||
|
|
35572de44c | ||
|
|
916cad2d8d | ||
|
|
2bdb8c67da | ||
|
|
d035dbe215 | ||
|
|
d70baec3ec | ||
|
|
a993080fe6 | ||
|
|
36dbd2aaf0 | ||
|
|
99646663d6 | ||
|
|
17eaad7a92 | ||
|
|
08a24caf8c | ||
|
|
5b31f29ffd | ||
|
|
add15ab277 | ||
|
|
03d1720e84 | ||
|
|
103525ac92 | ||
|
|
d4127c7a91 | ||
|
|
65fd804bd5 | ||
|
|
e6c172f762 | ||
|
|
cf1b0157fa | ||
|
|
752271b258 | ||
|
|
7399146214 | ||
|
|
beeff70d98 | ||
|
|
430919bcdf | ||
|
|
9f3f2483f5 | ||
|
|
638bf00b89 | ||
|
|
09b7a76bd6 | ||
|
|
321cdce5e2 | ||
|
|
15a9081f3b | ||
|
|
5481353386 |
No files matched your search
@@ -0,0 +1,71 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [ published ]
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload-asset:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: composer:2
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
git init .
|
||||||
|
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | sed -E 's|https?://||')/${{ github.repository }}.git"
|
||||||
|
git fetch --depth 1 origin "${{ github.ref }}"
|
||||||
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
|
- name: Build release zip
|
||||||
|
run: |
|
||||||
|
mkdir -p release/laps
|
||||||
|
git archive HEAD | tar -x -C release/laps
|
||||||
|
cd release/laps
|
||||||
|
composer config platform.php 7.4
|
||||||
|
composer remove composer/installers --no-update
|
||||||
|
composer update --no-dev --optimize-autoloader
|
||||||
|
cd ..
|
||||||
|
zip -q -r laps.zip laps
|
||||||
|
rm -rf laps
|
||||||
|
|
||||||
|
- name: Upload zip to Gitea Release
|
||||||
|
env:
|
||||||
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
API_URL: ${{ github.api_url }}
|
||||||
|
SERVER_URL: ${{ github.server_url }}
|
||||||
|
REPO: ${{ github.repository }}
|
||||||
|
TAG: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$API_URL" ]; then
|
||||||
|
API_URL="${SERVER_URL}/api/v1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Target API: $API_URL/repos/$REPO"
|
||||||
|
|
||||||
|
RELEASE_JSON=$(curl -s -H "Authorization: token $GITEA_TOKEN" "$API_URL/repos/$REPO/releases/tags/$TAG")
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_JSON" | php -r '$d = json_decode(file_get_contents("php://stdin")); echo $d->id ?? "";')
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "Creating release for tag $TAG..."
|
||||||
|
CREATE_RES=$(curl -s -X POST \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"Release $TAG\"}" \
|
||||||
|
"$API_URL/repos/$REPO/releases")
|
||||||
|
RELEASE_ID=$(echo "$CREATE_RES" | php -r '$d = json_decode(file_get_contents("php://stdin")); echo $d->id ?? "";')
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Uploading laps.zip to release ID $RELEASE_ID..."
|
||||||
|
curl -s -f -X POST \
|
||||||
|
-H "Authorization: token $GITEA_TOKEN" \
|
||||||
|
-H "Content-Type: multipart/form-data" \
|
||||||
|
-F "attachment=@release/laps.zip" \
|
||||||
|
"$API_URL/repos/$REPO/releases/$RELEASE_ID/assets?name=laps.zip"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
name: Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: composer:2
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
run: |
|
||||||
|
git init .
|
||||||
|
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@$(echo "${{ github.server_url }}" | sed -E 's|https?://||')/${{ github.repository }}.git"
|
||||||
|
git fetch --depth 1 origin "${{ github.ref }}"
|
||||||
|
git checkout FETCH_HEAD
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install --no-interaction --prefer-dist
|
||||||
|
|
||||||
|
- name: Run PHPUnit
|
||||||
|
run: vendor/bin/phpunit
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
/vendor
|
/vendor
|
||||||
/release
|
/release
|
||||||
|
.phpunit.result.cache
|
||||||
+22
-1
@@ -6,7 +6,28 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
## 3.3.5 - 2021-09-21
|
## 3.4.0 - 2026-09-26
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- set minimum required PHP version to 7.4
|
||||||
|
- added `Requires at least: 6.2` to plugin header (supports ClassicPress 2.x and WordPress 6.2+)
|
||||||
|
- checked user permissions (`laps_can_see`) before enqueueing assets in `Asset_Manager`
|
||||||
|
|
||||||
|
## 3.3.7 - 2022-06-16
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- PHP warning, when accessing OPcache status with `opcache.restrict_api`
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|||||||
@@ -1,54 +1,62 @@
|
|||||||

|

|
||||||
|
|
||||||
# Laps — light WordPress profiler
|
# Laps — könnyűsúlyú WordPress profilozó
|
||||||
|
|
||||||
_Make a site, make it fast._
|
> *Készíts egy weboldalt, és tedd gyorssá.*
|
||||||
|
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
A Laps egy gyors és könnyű WordPress bővítmény, amely valós idejű betöltési és teljesítményadatokat jelenít meg közvetlenül az admin eszköztáron (toolbar).
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/build-status/master)
|
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
|
||||||
[](https://github.com/Rarst/laps/releases/latest/download/laps.zip)
|
|
||||||
|
|
||||||
Laps is a plugin that **shows performance information** about WordPress page load.
|
## Főbb funkciók
|
||||||
|
|
||||||
It provides a visual summary in toolbar that is quick and easy to inspect.
|
### Oldalprofilozás
|
||||||
|
A Laps automatikusan méri és megjeleníti a kulcsfontosságú eseményeket:
|
||||||
|
- PHP, WordPress mag, bővítmények és sablonok betöltési ideje, fő ciklus (loop), oldalsávok (sidebars)
|
||||||
|
- Adatbázis-lekérdezések és hívási láncok részletes listázása (ha a `SAVEQUERIES` konstans értéke `true`)
|
||||||
|
- Külső hálózati kérések (HTTP API hívások más oldalakra)
|
||||||
|
|
||||||
## Page profiling
|
### API mérés (Ajax & REST API)
|
||||||
|
Ajax és REST API kérések esetén a Laps a **Server Timing API** segítségével küldi el a mérési adatokat, amelyek közvetlenül megtekinthetők a böngésző fejlesztői eszköztárában (pl. Chrome DevTools Network fülön).
|
||||||
Laps automatically tracks many events, such as:
|
|
||||||
- PHP, core, plugins, and themes load, main posts loop, sidebars
|
|
||||||
- database queries (with [`SAVEQUERIES` defined constant set to true](https://wordpress.org/support/article/editing-wp-config-php/#save-queries-for-analysis))
|
|
||||||
- network requests to other sites
|
|
||||||
|
|
||||||
## API profiling
|
|
||||||
|
|
||||||
For Ajax and REST API — Laps outputs performance information by Server Timing API, for use with clients such as Chrome Dev Tools.
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### API authentication
|
### Jogosultságok
|
||||||
|
A teljesítményadatok és a kapcsolódó stílusok/scriptek alapértelmezetten csak a megfelelő adminisztrátori jogosultsággal rendelkező felhasználóknak jelennek meg. A megjelenítés testreszabható a `laps_can_see` szűrővel (filter).
|
||||||
|
|
||||||
API requests need to be authenticated as admin for performance data to be sent. For Ajax requests cookies are sufficient. REST API requests also [need nonce passed](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/#cookie-authentication).
|
## Telepítés
|
||||||
|
|
||||||
`laps_can_see` check can be filtered to relax required permissions on the plugin’s side.
|
1. Töltsd le a legfrissebb `laps.zip` archívumot a **Releases** oldalról.
|
||||||
|
2. A WordPress admin felületén válaszd a **Bővítmények → Új hozzáadása → Bővítmény feltöltése** menüpontot.
|
||||||
|
3. Töltsd fel a `laps.zip` fájlt, majd aktiváld.
|
||||||
|
|
||||||
## Installation
|
## Követelmények
|
||||||
|
- **WordPress / ClassicPress:** WordPress 6.2+ vagy ClassicPress 2.0+ (pl. 2.7.3)
|
||||||
|
- **PHP:** 7.4 vagy újabb
|
||||||
|
|
||||||
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
---
|
||||||
| -------------------------------------------------- | -------- |
|
|
||||||
| `composer require rarst/laps` | [](https://github.com/Rarst/laps/releases/latest/download/laps.zip) |
|
|
||||||
|
|
||||||
## Tests
|
## English
|
||||||
|
|
||||||
Tests require [Brain Monkey](https://github.com/Brain-WP/BrainMonkey) (included in dependencies) and PHPUnit 9 (not included).
|
# Laps — Light WordPress Profiler
|
||||||
|
|
||||||
```bash
|
> *Make a site, make it fast.*
|
||||||
phpunit
|
|
||||||
```
|
Laps is a lightweight plugin that displays real-time page load and performance information directly in the admin toolbar.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- **Page profiling:** Automatically tracks PHP baseline, core initialization, plugin and theme load times, the main query loop, and sidebars.
|
||||||
|
- **Database queries:** Detailed query logs and execution times (when `SAVEQUERIES` is defined and set to `true`).
|
||||||
|
- **HTTP requests:** Tracks external network requests made via the WordPress HTTP API.
|
||||||
|
- **API profiling:** Emits Server Timing API headers for Ajax and REST API requests, inspectable directly in browser DevTools.
|
||||||
|
- **Access control:** Metrics and frontend/admin assets are only exposed to users with administrative capabilities (customizable via the `laps_can_see` filter).
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
1. Download the latest `laps.zip` from the **Releases** page.
|
||||||
|
2. In the WordPress Admin, go to **Plugins → Add New → Upload Plugin**.
|
||||||
|
3. Upload `laps.zip` and activate.
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
- **WordPress / ClassicPress:** WordPress 6.2+ or ClassicPress 2.0+ (e.g. 2.7.3)
|
||||||
|
- **PHP:** 7.4 or higher
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
MIT
|
MIT
|
||||||
+89
-16
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
declare( strict_types=1 );
|
||||||
|
|
||||||
require __DIR__ . '/vendor/autoload.php';
|
require __DIR__ . '/vendor/autoload.php';
|
||||||
|
|
||||||
@@ -15,13 +16,13 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
public function watch() {
|
public function watch() {
|
||||||
|
|
||||||
$this->taskWatch()
|
$this->taskWatch()
|
||||||
->monitor( [ 'public/css/variables.less', 'public/css/laps.less' ], function () {
|
->monitor( [ 'public/css/variables.less', 'public/css/laps.less' ], function () {
|
||||||
$this->makeCss();
|
$this->makeCss();
|
||||||
} )
|
} )
|
||||||
->monitor( 'public/js/source.js', function () {
|
->monitor( 'public/js/source.js', function () {
|
||||||
$this->makeJs();
|
$this->makeJs();
|
||||||
} )
|
} )
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,7 +43,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
$this->taskExec( 'lessc public/css/laps.less public/css/laps.css --source-map=public/css/laps.css.map' )->run();
|
$this->taskExec( 'lessc public/css/laps.less public/css/laps.css --source-map=public/css/laps.css.map' )->run();
|
||||||
|
|
||||||
$this->taskMinify( 'public/css/laps.css' )
|
$this->taskMinify( 'public/css/laps.css' )
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,11 +55,11 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
'vendor/twbs/bootstrap/js/tooltip.js',
|
'vendor/twbs/bootstrap/js/tooltip.js',
|
||||||
'public/js/source.js',
|
'public/js/source.js',
|
||||||
] )
|
] )
|
||||||
->to( 'public/js/laps.js' )
|
->to( 'public/js/laps.js' )
|
||||||
->run();
|
->run();
|
||||||
|
|
||||||
$this->taskMinify( 'public/js/laps.js' )
|
$this->taskMinify( 'public/js/laps.js' )
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,14 +69,65 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
$dir = __DIR__ . '/src/mustache/cache';
|
$dir = __DIR__ . '/src/mustache/cache';
|
||||||
$this->_cleanDir( $dir );
|
$this->_cleanDir( $dir );
|
||||||
$mustache = new \Mustache_Engine(
|
$mustache = new \Mustache_Engine(
|
||||||
array(
|
[
|
||||||
'loader' => new \Mustache_Loader_FilesystemLoader( __DIR__ . '/src/mustache' ),
|
'loader' => new \Mustache_Loader_FilesystemLoader( __DIR__ . '/src/mustache' ),
|
||||||
'cache' => $dir,
|
'cache' => $dir,
|
||||||
)
|
]
|
||||||
);
|
);
|
||||||
$mustache->loadTemplate( 'laps' );
|
$mustache->loadTemplate( 'laps' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates release zip
|
||||||
|
*
|
||||||
|
* @param string $php PHP version to target.
|
||||||
|
*/
|
||||||
|
public function makeArchive( $php = '7.4' ): void {
|
||||||
|
|
||||||
|
$composer = json_decode( file_get_contents( __DIR__ . '/composer.json' ) );
|
||||||
|
$package = $composer->name;
|
||||||
|
|
||||||
|
[ $vendor, $name ] = explode( '/', $package );
|
||||||
|
|
||||||
|
if ( empty( $vendor ) || empty( $name ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->_mkdir( 'release' );
|
||||||
|
|
||||||
|
$version = $this->latestTag();
|
||||||
|
|
||||||
|
$this->taskExec( "composer create-project {$package} {$name} {$version}" )
|
||||||
|
->dir( __DIR__ . '/release' )
|
||||||
|
->arg( '--prefer-dist' )
|
||||||
|
->arg( '--no-install' )
|
||||||
|
->run();
|
||||||
|
|
||||||
|
if ( $php ) {
|
||||||
|
$this->taskExec( "composer config platform.php {$php}" )
|
||||||
|
->dir( __DIR__ . "/release/{$name}" )
|
||||||
|
->run();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->taskExec( 'composer remove composer/installers --no-update' )
|
||||||
|
->dir( __DIR__ . "/release/{$name}" )
|
||||||
|
->run();
|
||||||
|
|
||||||
|
$this->taskExec( 'composer update --no-dev --optimize-autoloader' )
|
||||||
|
->dir( __DIR__ . "/release/{$name}" )
|
||||||
|
->run();
|
||||||
|
|
||||||
|
$zipFile = "release/{$name}.zip";
|
||||||
|
|
||||||
|
$this->_remove( $zipFile );
|
||||||
|
|
||||||
|
$this->taskPack( $zipFile )
|
||||||
|
->addDir( $name, "release/{$name}" )
|
||||||
|
->run();
|
||||||
|
|
||||||
|
$this->_deleteDir( "release/{$name}" );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates version in header and makes git version tag.
|
* Updates version in header and makes git version tag.
|
||||||
*
|
*
|
||||||
@@ -83,12 +135,13 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
*/
|
*/
|
||||||
public function tag( $version ) {
|
public function tag( $version ) {
|
||||||
|
|
||||||
$this->versionSet( $version );
|
$this->makeVersion( $version );
|
||||||
|
|
||||||
$this->taskGitStack()
|
$this->taskGitStack()
|
||||||
->stopOnFail()
|
->stopOnFail()
|
||||||
|
->add( 'CHANGELOG.md' )
|
||||||
->add( 'laps.php' )
|
->add( 'laps.php' )
|
||||||
->commit( "Updated header version to {$version}" )
|
->commit( "Released version $version" )
|
||||||
->tag( $version )
|
->tag( $version )
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
@@ -98,11 +151,31 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
*
|
*
|
||||||
* @param string $version Version string.
|
* @param string $version Version string.
|
||||||
*/
|
*/
|
||||||
public function versionSet( $version ) {
|
public function makeVersion( $version ) {
|
||||||
|
|
||||||
|
$this->taskReplaceInFile( 'CHANGELOG.md' )
|
||||||
|
->from( '## Unreleased' )
|
||||||
|
->to( '## Unreleased' . PHP_EOL . PHP_EOL . "## $version - " . date_format( date_create(), 'Y-m-d' ) )
|
||||||
|
->run();
|
||||||
|
|
||||||
$this->taskReplaceInFile( 'laps.php' )
|
$this->taskReplaceInFile( 'laps.php' )
|
||||||
->regex( '|^Version:.*$|m' )
|
->regex( '|^Version:.*$|m' )
|
||||||
->to( 'Version: ' . $version )
|
->to( 'Version: ' . $version )
|
||||||
->run();
|
->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function upload() {
|
||||||
|
$version = $this->latestTag();
|
||||||
|
$zipFile = __DIR__ . '/release/laps.zip';
|
||||||
|
|
||||||
|
$this->makeArchive();
|
||||||
|
$this->_exec("gh release create $version $zipFile");
|
||||||
|
$this->_remove( $zipFile );
|
||||||
|
}
|
||||||
|
|
||||||
|
private function latestTag(): string {
|
||||||
|
$commit = escapeshellarg( exec( 'git rev-list --tags --max-count=1' ) );
|
||||||
|
|
||||||
|
return escapeshellarg( exec( "git describe --tags {$commit}" ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+14
-5
@@ -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,16 +25,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require" : {
|
"require" : {
|
||||||
"php" : "^7.1.3 || ^8",
|
"php" : "^7.4 || ^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",
|
||||||
"brain/monkey" : "^2.2",
|
"brain/monkey" : "^2.2",
|
||||||
"pds/skeleton": "^1.0"
|
"pds/skeleton": "^1.0",
|
||||||
|
"phpunit/phpunit": "^8.5 || ^9.5"
|
||||||
},
|
},
|
||||||
"extra" : {
|
"extra" : {
|
||||||
"light-ignore-plugin": {
|
"light-ignore-plugin": {
|
||||||
@@ -49,5 +50,13 @@
|
|||||||
"Tests"
|
"Tests"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"allow-plugins": {
|
||||||
|
"composer/installers": true
|
||||||
|
},
|
||||||
|
"platform": {
|
||||||
|
"php": "7.4"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Generated
-788
@@ -1,788 +0,0 @@
|
|||||||
{
|
|
||||||
"_readme": [
|
|
||||||
"This file locks the dependencies of your project to a known state",
|
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
||||||
"This file is @generated automatically"
|
|
||||||
],
|
|
||||||
"content-hash": "56d31c242653d4e375949ef0356705dc",
|
|
||||||
"packages": [
|
|
||||||
{
|
|
||||||
"name": "composer/installers",
|
|
||||||
"version": "v2.0.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/composer/installers.git",
|
|
||||||
"reference": "a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/composer/installers/zipball/a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8",
|
|
||||||
"reference": "a241e78aaeb09781f5f5b92ac01ffd13ab43e5e8",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"composer-plugin-api": "^1.0 || ^2.0",
|
|
||||||
"php": "^7.2 || ^8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"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-main": "2.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Composer\\Installers\\": "src/Composer/Installers"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Kyle Robinson Young",
|
|
||||||
"email": "kyle@dontkry.com",
|
|
||||||
"homepage": "https://github.com/shama"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "A multi-framework Composer library installer",
|
|
||||||
"homepage": "https://composer.github.io/installers/",
|
|
||||||
"keywords": [
|
|
||||||
"Dolibarr",
|
|
||||||
"Eliasis",
|
|
||||||
"Hurad",
|
|
||||||
"ImageCMS",
|
|
||||||
"Kanboard",
|
|
||||||
"Lan Management System",
|
|
||||||
"MODX Evo",
|
|
||||||
"MantisBT",
|
|
||||||
"Mautic",
|
|
||||||
"Maya",
|
|
||||||
"OXID",
|
|
||||||
"Plentymarkets",
|
|
||||||
"Porto",
|
|
||||||
"RadPHP",
|
|
||||||
"SMF",
|
|
||||||
"Starbug",
|
|
||||||
"Thelia",
|
|
||||||
"Whmcs",
|
|
||||||
"WolfCMS",
|
|
||||||
"agl",
|
|
||||||
"annotatecms",
|
|
||||||
"attogram",
|
|
||||||
"bitrix",
|
|
||||||
"cakephp",
|
|
||||||
"chef",
|
|
||||||
"cockpit",
|
|
||||||
"codeigniter",
|
|
||||||
"concrete5",
|
|
||||||
"croogo",
|
|
||||||
"dokuwiki",
|
|
||||||
"drupal",
|
|
||||||
"eZ Platform",
|
|
||||||
"elgg",
|
|
||||||
"expressionengine",
|
|
||||||
"fuelphp",
|
|
||||||
"grav",
|
|
||||||
"installer",
|
|
||||||
"itop",
|
|
||||||
"known",
|
|
||||||
"kohana",
|
|
||||||
"laravel",
|
|
||||||
"lavalite",
|
|
||||||
"lithium",
|
|
||||||
"magento",
|
|
||||||
"majima",
|
|
||||||
"mako",
|
|
||||||
"mediawiki",
|
|
||||||
"miaoxing",
|
|
||||||
"modulework",
|
|
||||||
"modx",
|
|
||||||
"moodle",
|
|
||||||
"osclass",
|
|
||||||
"pantheon",
|
|
||||||
"phpbb",
|
|
||||||
"piwik",
|
|
||||||
"ppi",
|
|
||||||
"processwire",
|
|
||||||
"puppet",
|
|
||||||
"pxcms",
|
|
||||||
"reindex",
|
|
||||||
"roundcube",
|
|
||||||
"shopware",
|
|
||||||
"silverstripe",
|
|
||||||
"sydes",
|
|
||||||
"sylius",
|
|
||||||
"tastyigniter",
|
|
||||||
"wordpress",
|
|
||||||
"yawik",
|
|
||||||
"zend",
|
|
||||||
"zikula"
|
|
||||||
],
|
|
||||||
"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.13.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/bobthecow/mustache.php.git",
|
|
||||||
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/bobthecow/mustache.php/zipball/e95c5a008c23d3151d59ea72484d4f72049ab7f4",
|
|
||||||
"reference": "e95c5a008c23d3151d59ea72484d4f72049ab7f4",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.2.4"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"friendsofphp/php-cs-fixer": "~1.11",
|
|
||||||
"phpunit/phpunit": "~3.7|~4.0|~5.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Mustache": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Justin Hileman",
|
|
||||||
"email": "justin@justinhileman.info",
|
|
||||||
"homepage": "http://justinhileman.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "A Mustache implementation in PHP.",
|
|
||||||
"homepage": "https://github.com/bobthecow/mustache.php",
|
|
||||||
"keywords": [
|
|
||||||
"mustache",
|
|
||||||
"templating"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/bobthecow/mustache.php/issues",
|
|
||||||
"source": "https://github.com/bobthecow/mustache.php/tree/master"
|
|
||||||
},
|
|
||||||
"time": "2019-11-23T21:40:31+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pimple/pimple",
|
|
||||||
"version": "v3.4.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/silexphp/Pimple.git",
|
|
||||||
"reference": "86406047271859ffc13424a048541f4531f53601"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/86406047271859ffc13424a048541f4531f53601",
|
|
||||||
"reference": "86406047271859ffc13424a048541f4531f53601",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.2.5",
|
|
||||||
"psr/container": "^1.1"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"symfony/phpunit-bridge": "^5.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.4.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Pimple": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Pimple, a simple Dependency Injection Container",
|
|
||||||
"homepage": "https://pimple.symfony.com",
|
|
||||||
"keywords": [
|
|
||||||
"container",
|
|
||||||
"dependency injection"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/silexphp/Pimple/tree/v3.4.0"
|
|
||||||
},
|
|
||||||
"time": "2021-03-06T08:28:00+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "psr/container",
|
|
||||||
"version": "1.1.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-fig/container.git",
|
|
||||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
|
||||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.2.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Psr\\Container\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "PHP-FIG",
|
|
||||||
"homepage": "https://www.php-fig.org/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Common Container Interface (PHP FIG PSR-11)",
|
|
||||||
"homepage": "https://github.com/php-fig/container",
|
|
||||||
"keywords": [
|
|
||||||
"PSR-11",
|
|
||||||
"container",
|
|
||||||
"container-interface",
|
|
||||||
"container-interop",
|
|
||||||
"psr"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/php-fig/container/issues",
|
|
||||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
|
||||||
},
|
|
||||||
"time": "2021-03-05T17:36:06+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/service-contracts",
|
|
||||||
"version": "v2.4.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/service-contracts.git",
|
|
||||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
|
||||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.2.5",
|
|
||||||
"psr/container": "^1.1"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"symfony/service-implementation": ""
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-main": "2.4-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",
|
|
||||||
"contracts",
|
|
||||||
"decoupling",
|
|
||||||
"interfaces",
|
|
||||||
"interoperability",
|
|
||||||
"standards"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/service-contracts/tree/v2.4.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-04-01T10:43:52+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "symfony/stopwatch",
|
|
||||||
"version": "v4.4.27",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/symfony/stopwatch.git",
|
|
||||||
"reference": "c85d997af06a58ba83e2d2538e335b894c24523d"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/c85d997af06a58ba83e2d2538e335b894c24523d",
|
|
||||||
"reference": "c85d997af06a58ba83e2d2538e335b894c24523d",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.1.3",
|
|
||||||
"symfony/service-contracts": "^1.0|^2"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Symfony\\Component\\Stopwatch\\": ""
|
|
||||||
},
|
|
||||||
"exclude-from-classmap": [
|
|
||||||
"/Tests/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Fabien Potencier",
|
|
||||||
"email": "fabien@symfony.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Symfony Community",
|
|
||||||
"homepage": "https://symfony.com/contributors"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Provides a way to profile code",
|
|
||||||
"homepage": "https://symfony.com",
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/symfony/stopwatch/tree/v4.4.27"
|
|
||||||
},
|
|
||||||
"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-10T08:41:57+00:00"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"packages-dev": [
|
|
||||||
{
|
|
||||||
"name": "antecedent/patchwork",
|
|
||||||
"version": "2.1.15",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/antecedent/patchwork.git",
|
|
||||||
"reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/antecedent/patchwork/zipball/0430ceaac7f447f1778c199ec19d7e4362a6f961",
|
|
||||||
"reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.4.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": ">=4"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Ignas Rudaitis",
|
|
||||||
"email": "ignas.rudaitis@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Method redefinition (monkey-patching) functionality for PHP.",
|
|
||||||
"homepage": "http://patchwork2.org/",
|
|
||||||
"keywords": [
|
|
||||||
"aop",
|
|
||||||
"aspect",
|
|
||||||
"interception",
|
|
||||||
"monkeypatching",
|
|
||||||
"redefinition",
|
|
||||||
"runkit",
|
|
||||||
"testing"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/antecedent/patchwork/issues",
|
|
||||||
"source": "https://github.com/antecedent/patchwork/tree/2.1.15"
|
|
||||||
},
|
|
||||||
"time": "2021-08-22T08:00:13+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "brain/monkey",
|
|
||||||
"version": "2.6.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/Brain-WP/BrainMonkey.git",
|
|
||||||
"reference": "7042140000b4b18034c0c0010d86274a00f25442"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/7042140000b4b18034c0c0010d86274a00f25442",
|
|
||||||
"reference": "7042140000b4b18034c0c0010d86274a00f25442",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"antecedent/patchwork": "^2.0",
|
|
||||||
"mockery/mockery": ">=0.9 <2",
|
|
||||||
"php": ">=5.6.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.6 || ^0.7",
|
|
||||||
"phpcompatibility/php-compatibility": "^9.3.0",
|
|
||||||
"phpunit/phpunit": "^5.7.9 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-version/1": "1.x-dev",
|
|
||||||
"dev-master": "2.0.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Brain\\Monkey\\": "src/"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"inc/api.php"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Giuseppe Mazzapica",
|
|
||||||
"email": "giuseppe.mazzapica@gmail.com",
|
|
||||||
"homepage": "https://gmazzap.me",
|
|
||||||
"role": "Developer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Mocking utility for PHP functions and WordPress plugin API",
|
|
||||||
"keywords": [
|
|
||||||
"Monkey Patching",
|
|
||||||
"interception",
|
|
||||||
"mock",
|
|
||||||
"mock functions",
|
|
||||||
"mockery",
|
|
||||||
"patchwork",
|
|
||||||
"redefinition",
|
|
||||||
"runkit",
|
|
||||||
"test",
|
|
||||||
"testing"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/Brain-WP/BrainMonkey/issues",
|
|
||||||
"source": "https://github.com/Brain-WP/BrainMonkey"
|
|
||||||
},
|
|
||||||
"time": "2020-10-13T17:56:14+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "hamcrest/hamcrest-php",
|
|
||||||
"version": "v2.0.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/hamcrest/hamcrest-php.git",
|
|
||||||
"reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
|
|
||||||
"reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": "^5.3|^7.0|^8.0"
|
|
||||||
},
|
|
||||||
"replace": {
|
|
||||||
"cordoval/hamcrest-php": "*",
|
|
||||||
"davedevelopment/hamcrest-php": "*",
|
|
||||||
"kodova/hamcrest-php": "*"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"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.1-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"classmap": [
|
|
||||||
"hamcrest"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"BSD-3-Clause"
|
|
||||||
],
|
|
||||||
"description": "This is the PHP port of Hamcrest Matchers",
|
|
||||||
"keywords": [
|
|
||||||
"test"
|
|
||||||
],
|
|
||||||
"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.4.4",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/mockery/mockery.git",
|
|
||||||
"reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
|
|
||||||
"reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"hamcrest/hamcrest-php": "^2.0.1",
|
|
||||||
"lib-pcre": ">=7.0",
|
|
||||||
"php": "^7.3 || ^8.0"
|
|
||||||
},
|
|
||||||
"conflict": {
|
|
||||||
"phpunit/phpunit": "<8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "^8.5 || ^9.3"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "1.4.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Mockery": "library/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"BSD-3-Clause"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Pádraic Brady",
|
|
||||||
"email": "padraic.brady@gmail.com",
|
|
||||||
"homepage": "http://blog.astrumfutura.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Dave Marshall",
|
|
||||||
"email": "dave.marshall@atstsolutions.co.uk",
|
|
||||||
"homepage": "http://davedevelopment.co.uk"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Mockery is a simple yet flexible PHP mock object framework",
|
|
||||||
"homepage": "https://github.com/mockery/mockery",
|
|
||||||
"keywords": [
|
|
||||||
"BDD",
|
|
||||||
"TDD",
|
|
||||||
"library",
|
|
||||||
"mock",
|
|
||||||
"mock objects",
|
|
||||||
"mockery",
|
|
||||||
"stub",
|
|
||||||
"test",
|
|
||||||
"test double",
|
|
||||||
"testing"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/mockery/mockery/issues",
|
|
||||||
"source": "https://github.com/mockery/mockery/tree/1.4.4"
|
|
||||||
},
|
|
||||||
"time": "2021-09-13T15:28:59+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "pds/skeleton",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/php-pds/skeleton.git",
|
|
||||||
"reference": "95e476e5d629eadacbd721c5a9553e537514a231"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/php-pds/skeleton/zipball/95e476e5d629eadacbd721c5a9553e537514a231",
|
|
||||||
"reference": "95e476e5d629eadacbd721c5a9553e537514a231",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"bin": [
|
|
||||||
"bin/pds-skeleton"
|
|
||||||
],
|
|
||||||
"type": "standard",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Pds\\Skeleton\\": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"CC-BY-SA-4.0"
|
|
||||||
],
|
|
||||||
"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.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/twbs/bootstrap.git",
|
|
||||||
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/68b0d231a13201eb14acd3dc84e51543d16e5f7e",
|
|
||||||
"reference": "68b0d231a13201eb14acd3dc84e51543d16e5f7e",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"replace": {
|
|
||||||
"twitter/bootstrap": "self.version"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.4.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jacob Thornton",
|
|
||||||
"email": "jacobthornton@gmail.com"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Mark Otto",
|
|
||||||
"email": "markdotto@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The most popular front-end framework for developing responsive, mobile first projects on the web.",
|
|
||||||
"homepage": "https://getbootstrap.com/",
|
|
||||||
"keywords": [
|
|
||||||
"JS",
|
|
||||||
"css",
|
|
||||||
"framework",
|
|
||||||
"front-end",
|
|
||||||
"less",
|
|
||||||
"mobile-first",
|
|
||||||
"responsive",
|
|
||||||
"web"
|
|
||||||
],
|
|
||||||
"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": [],
|
|
||||||
"minimum-stability": "stable",
|
|
||||||
"stability-flags": [],
|
|
||||||
"prefer-stable": false,
|
|
||||||
"prefer-lowest": false,
|
|
||||||
"platform": {
|
|
||||||
"php": "^7.1.3 || ^8"
|
|
||||||
},
|
|
||||||
"platform-dev": [],
|
|
||||||
"plugin-api-version": "2.1.0"
|
|
||||||
}
|
|
||||||
@@ -5,9 +5,10 @@ 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.5
|
Version: 3.4.0
|
||||||
Author URI: https://www.rarst.net/
|
Author URI: https://www.rarst.net/
|
||||||
Requires PHP: 7.1.3
|
Requires at least: 6.2
|
||||||
|
Requires PHP: 7.4
|
||||||
Update URI: false
|
Update URI: false
|
||||||
License: MIT
|
License: MIT
|
||||||
*/
|
*/
|
||||||
@@ -20,8 +21,8 @@ if ( ! class_exists( '\Rarst\Laps\Plugin' ) ) {
|
|||||||
trigger_error( 'Laps not fully installed! Please install with Composer or download full release archive.', E_USER_ERROR );
|
trigger_error( 'Laps not fully installed! Please install with Composer or download full release archive.', E_USER_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( PHP_VERSION_ID < 70103 ) {
|
if ( PHP_VERSION_ID < 70400 ) {
|
||||||
trigger_error( 'Laps requires PHP version >=7.1.3.', E_USER_ERROR );
|
trigger_error( 'Laps requires PHP version >=7.4.', E_USER_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
$laps = new \Rarst\Laps\Plugin();
|
$laps = new \Rarst\Laps\Plugin();
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
totallyTyped="false"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="https://getpsalm.org/schema/config"
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||||
|
errorLevel="2"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
<directory name="src"/>
|
<directory name="src"/>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class Asset_Manager {
|
|||||||
wp_register_script( 'laps', plugins_url( "public/js/laps{$suffix}.js", dirname( __DIR__ ) ), [ 'jquery' ], '3.4.0', true );
|
wp_register_script( 'laps', plugins_url( "public/js/laps{$suffix}.js", dirname( __DIR__ ) ), [ 'jquery' ], '3.4.0', true );
|
||||||
wp_register_style( 'laps', plugins_url( "public/css/laps{$suffix}.css", dirname( __DIR__ ) ) );
|
wp_register_style( 'laps', plugins_url( "public/css/laps{$suffix}.css", dirname( __DIR__ ) ) );
|
||||||
|
|
||||||
if ( is_admin_bar_showing() ) {
|
if ( is_admin_bar_showing() && apply_filters( 'laps_can_see', current_user_can( 'manage_options' ) ) ) {
|
||||||
wp_enqueue_script( 'laps' );
|
wp_enqueue_script( 'laps' );
|
||||||
wp_enqueue_style( 'laps' );
|
wp_enqueue_style( 'laps' );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ 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.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Record_Interface[]
|
* @return Record_Interface[]
|
||||||
|
*
|
||||||
|
* @psalm-suppress PossiblyUndefinedArrayOffset
|
||||||
*/
|
*/
|
||||||
public function get_records(): array {
|
public function get_records(): array {
|
||||||
|
|
||||||
@@ -36,8 +38,12 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
$php = 'PHP Load – ' . PHP_VERSION;
|
$php = 'PHP Load – ' . PHP_VERSION;
|
||||||
|
|
||||||
if ( function_exists( 'opcache_get_status' ) ) {
|
if ( $this->opcache_api_available() ) {
|
||||||
$zend_status = opcache_get_status();
|
/**
|
||||||
|
* This is silenced since it might still emit warning for correct `opcache.resrict_api` configuration.
|
||||||
|
* @see https://github.com/php/php-src/issues/8799
|
||||||
|
*/
|
||||||
|
$zend_status = @opcache_get_status();
|
||||||
$php .= empty( $zend_status['opcache_enabled'] ) ? '' : ' – OPcache';
|
$php .= empty( $zend_status['opcache_enabled'] ) ? '' : ' – OPcache';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,4 +58,22 @@ class Core_Load_Collector implements Record_Collector_Interface {
|
|||||||
new Record( $load, $timestart, $this->timeload - $timestart, '', 'core' ),
|
new Record( $load, $timestart, $this->timeload - $timestart, '', 'core' ),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function opcache_api_available(): bool {
|
||||||
|
if ( ! function_exists( 'opcache_get_status' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$restrict_api = ini_get( 'opcache.restrict_api' );
|
||||||
|
|
||||||
|
if ( ! $restrict_api ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The paths aren't normalized, because it is unclear if they are in PHP itself
|
||||||
|
* and this should rather be false negative to prevent warning emitted.
|
||||||
|
*/
|
||||||
|
return 0 === stripos( __FILE__, $restrict_api );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -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 ) {
|
||||||
|
|
||||||
@@ -104,7 +103,6 @@ class Hook_Collector extends Stopwatch_Collector {
|
|||||||
* @param int $start_priority Start hook priority (defaults to -1).
|
* @param int $start_priority Start hook priority (defaults to -1).
|
||||||
* @param int $stop_priority Stop hook priority (defaults to max int).
|
* @param int $stop_priority Stop hook priority (defaults to max int).
|
||||||
*
|
*
|
||||||
* @psalm-suppress MissingClosureReturnType
|
|
||||||
* @psalm-suppress MissingClosureParamType
|
* @psalm-suppress MissingClosureParamType
|
||||||
*/
|
*/
|
||||||
private function add_event(
|
private function add_event(
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
*
|
*
|
||||||
* @return false|array|\WP_Error
|
* @return false|array|\WP_Error
|
||||||
*
|
*
|
||||||
* @psalm-suppress RedundantConditionGivenDocblockType
|
* @psalm-suppress RedundantCondition
|
||||||
* @noinspection PhpUnusedParameterInspection
|
* @noinspection PhpUnusedParameterInspection
|
||||||
*/
|
*/
|
||||||
public function pre_http_request( $false, $args, $url ) {
|
public function pre_http_request( $false, $args, $url ) {
|
||||||
@@ -68,7 +68,7 @@ class Http_Collector extends Stopwatch_Collector {
|
|||||||
*
|
*
|
||||||
* @return array|\WP_Error
|
* @return array|\WP_Error
|
||||||
*
|
*
|
||||||
* @psalm-suppress RedundantConditionGivenDocblockType
|
* @psalm-suppress RedundantCondition
|
||||||
* @noinspection PhpUnusedParameterInspection
|
* @noinspection PhpUnusedParameterInspection
|
||||||
*/
|
*/
|
||||||
public function http_api_debug( $response, $type, $class, $args, $url ) {
|
public function http_api_debug( $response, $type, $class, $args, $url ) {
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ class Sql_Collector implements Record_Collector_Interface {
|
|||||||
|
|
||||||
/** @var array $wpdb->queries */
|
/** @var array $wpdb->queries */
|
||||||
/** @psalm-var array<int, QueryData> $wpdb->queries */
|
/** @psalm-var array<int, QueryData> $wpdb->queries */
|
||||||
|
/** @psalm-suppress PossiblyInvalidArgument */
|
||||||
$records = array_filter( array_map( [ $this, 'transform' ], array_keys( $wpdb->queries ), $wpdb->queries ) );
|
$records = array_filter( array_map( [ $this, 'transform' ], array_keys( $wpdb->queries ), $wpdb->queries ) );
|
||||||
|
|
||||||
return $records;
|
return $records;
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ class Stopwatch_Collector implements Record_Collector_Interface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @psalm-suppress PossiblyInvalidArgument */
|
||||||
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ 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>
|
||||||
|
*
|
||||||
|
* @psalm-suppress TooManyTemplateParams
|
||||||
*/
|
*/
|
||||||
class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator {
|
class Recursive_Record_Iterator extends \ArrayIterator implements \RecursiveIterator {
|
||||||
|
|
||||||
@@ -15,7 +20,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 +72,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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,12 +5,13 @@ 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.
|
||||||
*
|
*
|
||||||
* @psalm-suppress PropertyNotSetInConstructor
|
* @template-implements \Iterator<array>
|
||||||
|
*
|
||||||
|
* @psalm-suppress PropertyNotSetInConstructor, TooManyTemplateParams
|
||||||
*/
|
*/
|
||||||
class Timeline_Iterator implements \Iterator {
|
class Timeline_Iterator implements \Iterator {
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ class Timeline_Iterator implements \Iterator {
|
|||||||
/**
|
/**
|
||||||
* @param Recursive_Record_Iterator $iterator Record iterator.
|
* @param Recursive_Record_Iterator $iterator Record iterator.
|
||||||
*
|
*
|
||||||
* @psalm-suppress PossiblyFalsePropertyAssignmentValue
|
* @psalm-suppress PossiblyFalsePropertyAssignmentValue, PossiblyUndefinedArrayOffset
|
||||||
*/
|
*/
|
||||||
public function __construct( Recursive_Record_Iterator $iterator ) {
|
public function __construct( Recursive_Record_Iterator $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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,9 +36,33 @@ class AssetTest extends LapsTestCase {
|
|||||||
Functions\expect( 'wp_register_style' )->once();
|
Functions\expect( 'wp_register_style' )->once();
|
||||||
Functions\expect( 'plugins_url' )->zeroOrMoreTimes();
|
Functions\expect( 'plugins_url' )->zeroOrMoreTimes();
|
||||||
Functions\expect( 'is_admin_bar_showing' )->once()->andReturn( true );
|
Functions\expect( 'is_admin_bar_showing' )->once()->andReturn( true );
|
||||||
|
Functions\expect( 'current_user_can' )
|
||||||
|
->once()
|
||||||
|
->with( 'manage_options' )
|
||||||
|
->andReturn( true );
|
||||||
Functions\expect( 'wp_enqueue_script' )->once();
|
Functions\expect( 'wp_enqueue_script' )->once();
|
||||||
Functions\expect( 'wp_enqueue_style' )->once();
|
Functions\expect( 'wp_enqueue_style' )->once();
|
||||||
|
|
||||||
$manager->enqueue_scripts();
|
$manager->enqueue_scripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::enqueue_scripts
|
||||||
|
* @depends test__construct
|
||||||
|
*/
|
||||||
|
public function testEnqueue_scripts_hidden( Asset_Manager $manager ) {
|
||||||
|
|
||||||
|
Functions\expect( 'wp_register_script' )->once();
|
||||||
|
Functions\expect( 'wp_register_style' )->once();
|
||||||
|
Functions\expect( 'plugins_url' )->zeroOrMoreTimes();
|
||||||
|
Functions\expect( 'is_admin_bar_showing' )->once()->andReturn( true );
|
||||||
|
Functions\expect( 'current_user_can' )
|
||||||
|
->once()
|
||||||
|
->with( 'manage_options' )
|
||||||
|
->andReturn( false );
|
||||||
|
Functions\expect( 'wp_enqueue_script' )->never();
|
||||||
|
Functions\expect( 'wp_enqueue_style' )->never();
|
||||||
|
|
||||||
|
$manager->enqueue_scripts();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user