Skip to content

Commit 36aadb7

Browse files
authored
chore: Update composer dependencies and prepare new release 3.2.0
2 parents 9b67b67 + c5f4252 commit 36aadb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1596
-552
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## 3.2.0
3+
- Security: Bumped `symfony/process` dependency to a version without security vulnerabilities (affects Windows servers only)
4+
- Updated: All composer dependencies to their latest supported versions for PHP >= 7.2.5 (same as Matomo 5 itself)
5+
26
## 3.1.0
37
- Added: Search for Node executable additionally in paths of `PATH` environment variable
48
- Improved: Provide directory search path in error message if executable cannot be found

Lighthouse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
require PIWIK_INCLUDE_PATH . '/plugins/PerformanceAudit/vendor/autoload.php';
66

7-
use Dzava\Lighthouse\Lighthouse as BaseLighthouse;
7+
use DevDavido\Lighthouse\Lighthouse as BaseLighthouse;
88
use Piwik\Plugins\PerformanceAudit\Exceptions\AuditFailedAuthoriseRefusedException;
99
use Piwik\Plugins\PerformanceAudit\Exceptions\AuditFailedException;
1010
use Piwik\Plugins\PerformanceAudit\Exceptions\AuditFailedMethodNotAllowedException;

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"php": ">=7.2.5",
1313
"ext-json": "*",
1414
"ext-spl": "*",
15-
"ducks-project/spl-types": "^1.2",
16-
"symfony/polyfill-mbstring": "^1.28",
17-
"symfony/process": "^4.4",
18-
"jeroen-g/lighthouse": "^0.2"
15+
"ducks-project/spl-types": "^5.0",
16+
"symfony/polyfill-mbstring": "^1.31",
17+
"symfony/process": "^5.4",
18+
"devdavido/lighthouse": "dev-master#91ddfe4126453d3c9cb4c8263a5238967fbdf9ac"
1919
},
2020
"require-dev": {
2121
"friendsofphp/php-cs-fixer": "^2.19"
@@ -37,5 +37,11 @@
3737
}
3838
},
3939
"minimum-stability": "dev",
40-
"prefer-stable": true
40+
"prefer-stable": true,
41+
"repositories": [
42+
{
43+
"type": "vcs",
44+
"url": "https://github.com/devdavido/lighthouse-php"
45+
}
46+
]
4147
}

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "PerformanceAudit",
33
"description": "Daily performance audits of all your sites in Matomo.",
4-
"version": "3.1.0",
4+
"version": "3.2.0",
55
"theme": false,
66
"require": {
77
"php": ">=7.2.5",

vendor/composer/ClassLoader.php

Lines changed: 45 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -45,66 +45,63 @@ class ClassLoader
4545
/** @var \Closure(string):void */
4646
private static $includeFile;
4747

48-
/** @var ?string */
48+
/** @var string|null */
4949
private $vendorDir;
5050

5151
// PSR-4
5252
/**
53-
* @var array[]
54-
* @psalm-var array<string, array<string, int>>
53+
* @var array<string, array<string, int>>
5554
*/
5655
private $prefixLengthsPsr4 = array();
5756
/**
58-
* @var array[]
59-
* @psalm-var array<string, array<int, string>>
57+
* @var array<string, list<string>>
6058
*/
6159
private $prefixDirsPsr4 = array();
6260
/**
63-
* @var array[]
64-
* @psalm-var array<string, string>
61+
* @var list<string>
6562
*/
6663
private $fallbackDirsPsr4 = array();
6764

6865
// PSR-0
6966
/**
70-
* @var array[]
71-
* @psalm-var array<string, array<string, string[]>>
67+
* List of PSR-0 prefixes
68+
*
69+
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
70+
*
71+
* @var array<string, array<string, list<string>>>
7272
*/
7373
private $prefixesPsr0 = array();
7474
/**
75-
* @var array[]
76-
* @psalm-var array<string, string>
75+
* @var list<string>
7776
*/
7877
private $fallbackDirsPsr0 = array();
7978

8079
/** @var bool */
8180
private $useIncludePath = false;
8281

8382
/**
84-
* @var string[]
85-
* @psalm-var array<string, string>
83+
* @var array<string, string>
8684
*/
8785
private $classMap = array();
8886

8987
/** @var bool */
9088
private $classMapAuthoritative = false;
9189

9290
/**
93-
* @var bool[]
94-
* @psalm-var array<string, bool>
91+
* @var array<string, bool>
9592
*/
9693
private $missingClasses = array();
9794

98-
/** @var ?string */
95+
/** @var string|null */
9996
private $apcuPrefix;
10097

10198
/**
102-
* @var self[]
99+
* @var array<string, self>
103100
*/
104101
private static $registeredLoaders = array();
105102

106103
/**
107-
* @param ?string $vendorDir
104+
* @param string|null $vendorDir
108105
*/
109106
public function __construct($vendorDir = null)
110107
{
@@ -113,7 +110,7 @@ public function __construct($vendorDir = null)
113110
}
114111

115112
/**
116-
* @return string[]
113+
* @return array<string, list<string>>
117114
*/
118115
public function getPrefixes()
119116
{
@@ -125,44 +122,39 @@ public function getPrefixes()
125122
}
126123

127124
/**
128-
* @return array[]
129-
* @psalm-return array<string, array<int, string>>
125+
* @return array<string, list<string>>
130126
*/
131127
public function getPrefixesPsr4()
132128
{
133129
return $this->prefixDirsPsr4;
134130
}
135131

136132
/**
137-
* @return array[]
138-
* @psalm-return array<string, string>
133+
* @return list<string>
139134
*/
140135
public function getFallbackDirs()
141136
{
142137
return $this->fallbackDirsPsr0;
143138
}
144139

145140
/**
146-
* @return array[]
147-
* @psalm-return array<string, string>
141+
* @return list<string>
148142
*/
149143
public function getFallbackDirsPsr4()
150144
{
151145
return $this->fallbackDirsPsr4;
152146
}
153147

154148
/**
155-
* @return string[] Array of classname => path
156-
* @psalm-return array<string, string>
149+
* @return array<string, string> Array of classname => path
157150
*/
158151
public function getClassMap()
159152
{
160153
return $this->classMap;
161154
}
162155

163156
/**
164-
* @param string[] $classMap Class to filename map
165-
* @psalm-param array<string, string> $classMap
157+
* @param array<string, string> $classMap Class to filename map
166158
*
167159
* @return void
168160
*/
@@ -179,24 +171,25 @@ public function addClassMap(array $classMap)
179171
* Registers a set of PSR-0 directories for a given prefix, either
180172
* appending or prepending to the ones previously set for this prefix.
181173
*
182-
* @param string $prefix The prefix
183-
* @param string[]|string $paths The PSR-0 root directories
184-
* @param bool $prepend Whether to prepend the directories
174+
* @param string $prefix The prefix
175+
* @param list<string>|string $paths The PSR-0 root directories
176+
* @param bool $prepend Whether to prepend the directories
185177
*
186178
* @return void
187179
*/
188180
public function add($prefix, $paths, $prepend = false)
189181
{
182+
$paths = (array) $paths;
190183
if (!$prefix) {
191184
if ($prepend) {
192185
$this->fallbackDirsPsr0 = array_merge(
193-
(array) $paths,
186+
$paths,
194187
$this->fallbackDirsPsr0
195188
);
196189
} else {
197190
$this->fallbackDirsPsr0 = array_merge(
198191
$this->fallbackDirsPsr0,
199-
(array) $paths
192+
$paths
200193
);
201194
}
202195

@@ -205,19 +198,19 @@ public function add($prefix, $paths, $prepend = false)
205198

206199
$first = $prefix[0];
207200
if (!isset($this->prefixesPsr0[$first][$prefix])) {
208-
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
201+
$this->prefixesPsr0[$first][$prefix] = $paths;
209202

210203
return;
211204
}
212205
if ($prepend) {
213206
$this->prefixesPsr0[$first][$prefix] = array_merge(
214-
(array) $paths,
207+
$paths,
215208
$this->prefixesPsr0[$first][$prefix]
216209
);
217210
} else {
218211
$this->prefixesPsr0[$first][$prefix] = array_merge(
219212
$this->prefixesPsr0[$first][$prefix],
220-
(array) $paths
213+
$paths
221214
);
222215
}
223216
}
@@ -226,27 +219,28 @@ public function add($prefix, $paths, $prepend = false)
226219
* Registers a set of PSR-4 directories for a given namespace, either
227220
* appending or prepending to the ones previously set for this namespace.
228221
*
229-
* @param string $prefix The prefix/namespace, with trailing '\\'
230-
* @param string[]|string $paths The PSR-4 base directories
231-
* @param bool $prepend Whether to prepend the directories
222+
* @param string $prefix The prefix/namespace, with trailing '\\'
223+
* @param list<string>|string $paths The PSR-4 base directories
224+
* @param bool $prepend Whether to prepend the directories
232225
*
233226
* @throws \InvalidArgumentException
234227
*
235228
* @return void
236229
*/
237230
public function addPsr4($prefix, $paths, $prepend = false)
238231
{
232+
$paths = (array) $paths;
239233
if (!$prefix) {
240234
// Register directories for the root namespace.
241235
if ($prepend) {
242236
$this->fallbackDirsPsr4 = array_merge(
243-
(array) $paths,
237+
$paths,
244238
$this->fallbackDirsPsr4
245239
);
246240
} else {
247241
$this->fallbackDirsPsr4 = array_merge(
248242
$this->fallbackDirsPsr4,
249-
(array) $paths
243+
$paths
250244
);
251245
}
252246
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -256,18 +250,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
256250
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
257251
}
258252
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
259-
$this->prefixDirsPsr4[$prefix] = (array) $paths;
253+
$this->prefixDirsPsr4[$prefix] = $paths;
260254
} elseif ($prepend) {
261255
// Prepend directories for an already registered namespace.
262256
$this->prefixDirsPsr4[$prefix] = array_merge(
263-
(array) $paths,
257+
$paths,
264258
$this->prefixDirsPsr4[$prefix]
265259
);
266260
} else {
267261
// Append directories for an already registered namespace.
268262
$this->prefixDirsPsr4[$prefix] = array_merge(
269263
$this->prefixDirsPsr4[$prefix],
270-
(array) $paths
264+
$paths
271265
);
272266
}
273267
}
@@ -276,8 +270,8 @@ public function addPsr4($prefix, $paths, $prepend = false)
276270
* Registers a set of PSR-0 directories for a given prefix,
277271
* replacing any others previously set for this prefix.
278272
*
279-
* @param string $prefix The prefix
280-
* @param string[]|string $paths The PSR-0 base directories
273+
* @param string $prefix The prefix
274+
* @param list<string>|string $paths The PSR-0 base directories
281275
*
282276
* @return void
283277
*/
@@ -294,8 +288,8 @@ public function set($prefix, $paths)
294288
* Registers a set of PSR-4 directories for a given namespace,
295289
* replacing any others previously set for this namespace.
296290
*
297-
* @param string $prefix The prefix/namespace, with trailing '\\'
298-
* @param string[]|string $paths The PSR-4 base directories
291+
* @param string $prefix The prefix/namespace, with trailing '\\'
292+
* @param list<string>|string $paths The PSR-4 base directories
299293
*
300294
* @throws \InvalidArgumentException
301295
*
@@ -481,9 +475,9 @@ public function findFile($class)
481475
}
482476

483477
/**
484-
* Returns the currently registered loaders indexed by their corresponding vendor directories.
478+
* Returns the currently registered loaders keyed by their corresponding vendor directories.
485479
*
486-
* @return self[]
480+
* @return array<string, self>
487481
*/
488482
public static function getRegisteredLoaders()
489483
{

vendor/composer/autoload_classmap.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
'Composer\\Autoload\\ClassLoader' => $vendorDir . '/composer/ClassLoader.php',
1212
'Composer\\Autoload\\ComposerStaticInit98dde460e8a16c8877d8f8d8a8e6921c' => $vendorDir . '/composer/autoload_static.php',
1313
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
14+
'DevDavido\\Lighthouse\\Exceptions\\AuditFailedException' => $vendorDir . '/devdavido/lighthouse/src/Exceptions/AuditFailedException.php',
15+
'DevDavido\\Lighthouse\\Lighthouse' => $vendorDir . '/devdavido/lighthouse/src/Lighthouse.php',
16+
'DevDavido\\Lighthouse\\Tests\\Integration\\LighthouseTest' => $vendorDir . '/devdavido/lighthouse/tests/Integration/LighthouseTest.php',
17+
'DevDavido\\Lighthouse\\Tests\\Unit\\LighthouseTest' => $vendorDir . '/devdavido/lighthouse/tests/Unit/LighthouseTest.php',
18+
'DevDavido\\Lighthouse\\Tests\\Unit\\MockLighthouse' => $vendorDir . '/devdavido/lighthouse/tests/Unit/LighthouseTest.php',
1419
'Ducks\\Component\\SplTypes\\SplBool' => $vendorDir . '/ducks-project/spl-types/SplBool.php',
1520
'Ducks\\Component\\SplTypes\\SplEnum' => $vendorDir . '/ducks-project/spl-types/SplEnum.php',
1621
'Ducks\\Component\\SplTypes\\SplFloat' => $vendorDir . '/ducks-project/spl-types/SplFloat.php',
1722
'Ducks\\Component\\SplTypes\\SplInt' => $vendorDir . '/ducks-project/spl-types/SplInt.php',
1823
'Ducks\\Component\\SplTypes\\SplString' => $vendorDir . '/ducks-project/spl-types/SplString.php',
1924
'Ducks\\Component\\SplTypes\\SplType' => $vendorDir . '/ducks-project/spl-types/SplType.php',
20-
'Dzava\\Lighthouse\\Exceptions\\AuditFailedException' => $vendorDir . '/jeroen-g/lighthouse/src/Exceptions/AuditFailedException.php',
21-
'Dzava\\Lighthouse\\Lighthouse' => $vendorDir . '/jeroen-g/lighthouse/src/Lighthouse.php',
22-
'Dzava\\Lighthouse\\Tests\\Integration\\LighthouseTest' => $vendorDir . '/jeroen-g/lighthouse/tests/Integration/LighthouseTest.php',
23-
'Dzava\\Lighthouse\\Tests\\Unit\\LighthouseTest' => $vendorDir . '/jeroen-g/lighthouse/tests/Unit/LighthouseTest.php',
24-
'Dzava\\Lighthouse\\Tests\\Unit\\MockLighthouse' => $vendorDir . '/jeroen-g/lighthouse/tests/Unit/LighthouseTest.php',
2525
'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php',
2626
'Piwik\\Plugins\\PerformanceAudit\\API' => $baseDir . '/API.php',
2727
'Piwik\\Plugins\\PerformanceAudit\\Archiver' => $baseDir . '/Archiver.php',
@@ -78,7 +78,7 @@
7878
'Piwik\\Plugins\\PerformanceAudit\\Tasks' => $baseDir . '/Tasks.php',
7979
'Piwik\\Plugins\\PerformanceAudit\\Updates_1_1_0' => $baseDir . '/Updates/1.1.0.php',
8080
'Piwik\\Plugins\\PerformanceAudit\\tests\\Integration\\ApiTest' => $baseDir . '/tests/Integration/ApiTest.php',
81-
'Piwik\\Plugins\\PerformanceAudit\\tests\\Integration\\PerformanceAuditIntegrationTest' => $baseDir . '/tests/Integration/PerformanceAuditIntegrationTest.php',
81+
'Piwik\\Plugins\\PerformanceAudit\\tests\\Integration\\PerformanceAuditIntegrationPreparation' => $baseDir . '/tests/Integration/PerformanceAuditIntegrationPreparation.php',
8282
'Piwik\\Plugins\\PerformanceAudit\\tests\\Unit\\Filter\\AuditScoreClassifierTest' => $baseDir . '/tests/Unit/Filter/AuditScoreClassifierTest.php',
8383
'Piwik\\Plugins\\PerformanceAudit\\tests\\Unit\\Metric\\PercentTest' => $baseDir . '/tests/Unit/Metric/PercentTest.php',
8484
'Piwik\\Plugins\\PerformanceAudit\\tests\\Unit\\Metric\\SecondsTest' => $baseDir . '/tests/Unit/Metric/SecondsTest.php',

vendor/composer/autoload_psr4.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
1010
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
1111
'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'),
12-
'Dzava\\Lighthouse\\' => array($vendorDir . '/jeroen-g/lighthouse/src'),
1312
'Ducks\\Component\\SplTypes\\' => array($vendorDir . '/ducks-project/spl-types'),
13+
'DevDavido\\Lighthouse\\' => array($vendorDir . '/devdavido/lighthouse/src'),
1414
);

0 commit comments

Comments
 (0)