Skip to content

Commit 2c2176a

Browse files
committed
chore: pre-release
1 parent 9c69baf commit 2c2176a

File tree

6 files changed

+74
-12
lines changed

6 files changed

+74
-12
lines changed

vendor/composer/ClassLoader.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ public function unregister()
429429
public function loadClass($class)
430430
{
431431
if ($file = $this->findFile($class)) {
432-
(self::$includeFile)($file);
432+
$includeFile = self::$includeFile;
433+
$includeFile($file);
433434

434435
return true;
435436
}
@@ -560,7 +561,10 @@ private function findFileWithExtension($class, $ext)
560561
return false;
561562
}
562563

563-
private static function initializeIncludeClosure(): void
564+
/**
565+
* @return void
566+
*/
567+
private static function initializeIncludeClosure()
564568
{
565569
if (self::$includeFile !== null) {
566570
return;
@@ -574,8 +578,8 @@ private static function initializeIncludeClosure(): void
574578
* @param string $file
575579
* @return void
576580
*/
577-
self::$includeFile = static function($file) {
581+
self::$includeFile = \Closure::bind(static function($file) {
578582
include $file;
579-
};
583+
}, null, null);
580584
}
581585
}

vendor/composer/InstalledVersions.php

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
9898
{
9999
foreach (self::getInstalled() as $installed) {
100100
if (isset($installed['versions'][$packageName])) {
101-
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
101+
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
102102
}
103103
}
104104

@@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
119119
*/
120120
public static function satisfies(VersionParser $parser, $packageName, $constraint)
121121
{
122-
$constraint = $parser->parseConstraints($constraint);
122+
$constraint = $parser->parseConstraints((string) $constraint);
123123
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
124124

125125
return $provided->matches($constraint);
@@ -328,7 +328,9 @@ private static function getInstalled()
328328
if (isset(self::$installedByVendor[$vendorDir])) {
329329
$installed[] = self::$installedByVendor[$vendorDir];
330330
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331-
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
331+
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
332+
$required = require $vendorDir.'/composer/installed.php';
333+
$installed[] = self::$installedByVendor[$vendorDir] = $required;
332334
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
333335
self::$installed = $installed[count($installed) - 1];
334336
}
@@ -340,12 +342,17 @@ private static function getInstalled()
340342
// only require the installed.php file if this file is loaded from its dumped location,
341343
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
342344
if (substr(__DIR__, -8, 1) !== 'C') {
343-
self::$installed = require __DIR__ . '/installed.php';
345+
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
346+
$required = require __DIR__ . '/installed.php';
347+
self::$installed = $required;
344348
} else {
345349
self::$installed = array();
346350
}
347351
}
348-
$installed[] = self::$installed;
352+
353+
if (self::$installed !== array()) {
354+
$installed[] = self::$installed;
355+
}
349356

350357
return $installed;
351358
}

vendor/composer/autoload_classmap.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,16 @@
101101
'getid3_wtv' => $vendorDir . '/james-heinrich/getid3/getid3/module.audio-video.wtv.php',
102102
'getid3_xz' => $vendorDir . '/james-heinrich/getid3/getid3/module.archive.xz.php',
103103
'getid3_zip' => $vendorDir . '/james-heinrich/getid3/getid3/module.archive.zip.php',
104+
'mauricerenck\\Podcaster\\AudioTools' => $baseDir . '/app/AudioTools.php',
104105
'mauricerenck\\Podcaster\\Feed' => $baseDir . '/app/Feed.php',
106+
'mauricerenck\\Podcaster\\Migrations' => $baseDir . '/app/Migrations.php',
105107
'mauricerenck\\Podcaster\\Podcast' => $baseDir . '/app/Podcast.php',
108+
'mauricerenck\\Podcaster\\PodcasterDatabase' => $baseDir . '/app/PodcasterDatabase.php',
109+
'mauricerenck\\Podcaster\\PodcasterStats' => $baseDir . '/app/PodcasterStats.php',
110+
'mauricerenck\\Podcaster\\PodcasterStatsInterface' => $baseDir . '/app/PodcasterStats.interface.php',
111+
'mauricerenck\\Podcaster\\PodcasterStatsInterfaceBase' => $baseDir . '/app/PodcasterStats.interface.php',
112+
'mauricerenck\\Podcaster\\PodcasterStatsMatomo' => $baseDir . '/app/PodcasterStatsMatomo.php',
113+
'mauricerenck\\Podcaster\\PodcasterStatsMysql' => $baseDir . '/app/PodcasterStatsMysql.php',
114+
'mauricerenck\\Podcaster\\PodcasterStatsSqlite' => $baseDir . '/app/PodcasterStatsSqlite.php',
106115
'mauricerenck\\Podcaster\\TestCaseMocked' => $baseDir . '/app/TestCaseMocked.php',
107116
);

vendor/composer/autoload_static.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,17 @@ class ComposerStaticInit9574998a8d6f27428f2fc454b8cd7e84
124124
'getid3_wtv' => __DIR__ . '/..' . '/james-heinrich/getid3/getid3/module.audio-video.wtv.php',
125125
'getid3_xz' => __DIR__ . '/..' . '/james-heinrich/getid3/getid3/module.archive.xz.php',
126126
'getid3_zip' => __DIR__ . '/..' . '/james-heinrich/getid3/getid3/module.archive.zip.php',
127+
'mauricerenck\\Podcaster\\AudioTools' => __DIR__ . '/../..' . '/app/AudioTools.php',
127128
'mauricerenck\\Podcaster\\Feed' => __DIR__ . '/../..' . '/app/Feed.php',
129+
'mauricerenck\\Podcaster\\Migrations' => __DIR__ . '/../..' . '/app/Migrations.php',
128130
'mauricerenck\\Podcaster\\Podcast' => __DIR__ . '/../..' . '/app/Podcast.php',
131+
'mauricerenck\\Podcaster\\PodcasterDatabase' => __DIR__ . '/../..' . '/app/PodcasterDatabase.php',
132+
'mauricerenck\\Podcaster\\PodcasterStats' => __DIR__ . '/../..' . '/app/PodcasterStats.php',
133+
'mauricerenck\\Podcaster\\PodcasterStatsInterface' => __DIR__ . '/../..' . '/app/PodcasterStats.interface.php',
134+
'mauricerenck\\Podcaster\\PodcasterStatsInterfaceBase' => __DIR__ . '/../..' . '/app/PodcasterStats.interface.php',
135+
'mauricerenck\\Podcaster\\PodcasterStatsMatomo' => __DIR__ . '/../..' . '/app/PodcasterStatsMatomo.php',
136+
'mauricerenck\\Podcaster\\PodcasterStatsMysql' => __DIR__ . '/../..' . '/app/PodcasterStatsMysql.php',
137+
'mauricerenck\\Podcaster\\PodcasterStatsSqlite' => __DIR__ . '/../..' . '/app/PodcasterStatsSqlite.php',
129138
'mauricerenck\\Podcaster\\TestCaseMocked' => __DIR__ . '/../..' . '/app/TestCaseMocked.php',
130139
);
131140

vendor/composer/installed.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
'dev_requirement' => false,
3030
),
3131
'matomo/matomo-php-tracker' => array(
32-
'pretty_version' => '3.1.2',
33-
'version' => '3.1.2.0',
34-
'reference' => '78932f61692b18c6b5de923dbc3880ad3380e328',
32+
'pretty_version' => '3.2.0',
33+
'version' => '3.2.0.0',
34+
'reference' => 'c9e7816d63ddf99bffb1414cfbe45f4c4edf1d4b',
3535
'type' => 'library',
3636
'install_path' => __DIR__ . '/../matomo/matomo-php-tracker',
3737
'aliases' => array(),

vendor/matomo/matomo-php-tracker/MatomoTracker.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ public function __construct($idSite, $apiUrl = '')
161161

162162
// Allow debug while blocking the request
163163
$this->requestTimeout = 600;
164+
$this->requestConnectTimeout = 300;
164165
$this->doBulkRequests = false;
165166
$this->storedTrackingActions = [];
166167

@@ -172,6 +173,11 @@ public function __construct($idSite, $apiUrl = '')
172173
$this->incomingTrackerCookies = [];
173174
}
174175

176+
public function setApiUrl(string $url)
177+
{
178+
self::$URL = $url;
179+
}
180+
175181
/**
176182
* By default, Matomo expects utf-8 encoded values, for example
177183
* for the page URL parameter values, Page Title, etc.
@@ -1692,6 +1698,32 @@ public function setRequestTimeout($timeout)
16921698
return $this;
16931699
}
16941700

1701+
/**
1702+
* Returns the maximum number of seconds the tracker will spend trying to connect to Matomo.
1703+
* Defaults to 300 seconds.
1704+
*/
1705+
public function getRequestConnectTimeout()
1706+
{
1707+
return $this->requestConnectTimeout;
1708+
}
1709+
1710+
/**
1711+
* Sets the maximum number of seconds that the tracker will spend tryint to connect to Matomo.
1712+
*
1713+
* @param int $timeout
1714+
* @return $this
1715+
* @throws Exception
1716+
*/
1717+
public function setRequestConnectTimeout($timeout)
1718+
{
1719+
if (!is_int($timeout) || $timeout < 0) {
1720+
throw new Exception("Invalid value supplied for request connect timeout: $timeout");
1721+
}
1722+
1723+
$this->requestConnectTimeout = $timeout;
1724+
return $this;
1725+
}
1726+
16951727
/**
16961728
* Sets the request method to POST, which is recommended when using setTokenAuth()
16971729
* to prevent the token from being recorded in server logs. Avoid using redirects
@@ -1747,6 +1779,7 @@ protected function prepareCurlOptions($url, $method, $data, $forcePostUrlEncoded
17471779
CURLOPT_USERAGENT => $this->userAgent,
17481780
CURLOPT_HEADER => true,
17491781
CURLOPT_TIMEOUT => $this->requestTimeout,
1782+
CURLOPT_CONNECTTIMEOUT => $this->requestConnectTimeout,
17501783
CURLOPT_RETURNTRANSFER => true,
17511784
CURLOPT_HTTPHEADER => array(
17521785
'Accept-Language: ' . $this->acceptLanguage,

0 commit comments

Comments
 (0)