Skip to content

Commit 1886e9f

Browse files
authored
Merge pull request #1007 from nextcloud/deps/noid/php-saml-stable-5.2
[stable-5.2] build(deps): bump onelogin/php-saml to 4.3.1
2 parents 4f5210d + a3ce846 commit 1886e9f

Some content is hidden

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

41 files changed

+780
-316
lines changed

.github/workflows/integration.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- '.github/workflows/integration.yml'
7+
- '3rdparty/**'
78
- 'appinfo/**'
89
- 'lib/**'
910
- 'tests/**'

.github/workflows/phpunit-mysql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
paths:
1111
- '.github/workflows/**'
12+
- '3rdparty/**'
1213
- 'appinfo/**'
1314
- 'lib/**'
1415
- 'templates/**'

.github/workflows/phpunit-oci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
paths:
1111
- '.github/workflows/**'
12+
- '3rdparty/**'
1213
- 'appinfo/**'
1314
- 'lib/**'
1415
- 'templates/**'

.github/workflows/phpunit-pgsql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
paths:
1111
- '.github/workflows/**'
12+
- '3rdparty/**'
1213
- 'appinfo/**'
1314
- 'lib/**'
1415
- 'templates/**'

.github/workflows/phpunit-sqlite.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
pull_request:
1010
paths:
1111
- '.github/workflows/**'
12+
- '3rdparty/**'
1213
- 'appinfo/**'
1314
- 'lib/**'
1415
- 'templates/**'

3rdparty/composer.lock

Lines changed: 31 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3rdparty/vendor/autoload.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
echo $err;
1515
}
1616
}
17-
trigger_error(
18-
$err,
19-
E_USER_ERROR
20-
);
17+
throw new RuntimeException($err);
2118
}
2219

2320
require_once __DIR__ . '/composer/autoload_real.php';

3rdparty/vendor/composer/InstalledVersions.php

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,23 @@
2626
*/
2727
class InstalledVersions
2828
{
29+
/**
30+
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
31+
* @internal
32+
*/
33+
private static $selfDir = null;
34+
2935
/**
3036
* @var mixed[]|null
3137
* @psalm-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[]}>}|array{}|null
3238
*/
3339
private static $installed;
3440

41+
/**
42+
* @var bool
43+
*/
44+
private static $installedIsLocalDir;
45+
3546
/**
3647
* @var bool|null
3748
*/
@@ -309,6 +320,24 @@ public static function reload($data)
309320
{
310321
self::$installed = $data;
311322
self::$installedByVendor = array();
323+
324+
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
325+
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
326+
// so we have to assume it does not, and that may result in duplicate data being returned when listing
327+
// all installed packages for example
328+
self::$installedIsLocalDir = false;
329+
}
330+
331+
/**
332+
* @return string
333+
*/
334+
private static function getSelfDir()
335+
{
336+
if (self::$selfDir === null) {
337+
self::$selfDir = strtr(__DIR__, '\\', '/');
338+
}
339+
340+
return self::$selfDir;
312341
}
313342

314343
/**
@@ -322,19 +351,27 @@ private static function getInstalled()
322351
}
323352

324353
$installed = array();
354+
$copiedLocalDir = false;
325355

326356
if (self::$canGetVendors) {
357+
$selfDir = self::getSelfDir();
327358
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
359+
$vendorDir = strtr($vendorDir, '\\', '/');
328360
if (isset(self::$installedByVendor[$vendorDir])) {
329361
$installed[] = self::$installedByVendor[$vendorDir];
330362
} elseif (is_file($vendorDir.'/composer/installed.php')) {
331363
/** @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 */
332364
$required = require $vendorDir.'/composer/installed.php';
333-
$installed[] = self::$installedByVendor[$vendorDir] = $required;
334-
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
335-
self::$installed = $installed[count($installed) - 1];
365+
self::$installedByVendor[$vendorDir] = $required;
366+
$installed[] = $required;
367+
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
368+
self::$installed = $required;
369+
self::$installedIsLocalDir = true;
336370
}
337371
}
372+
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
373+
$copiedLocalDir = true;
374+
}
338375
}
339376
}
340377

@@ -350,7 +387,7 @@ private static function getInstalled()
350387
}
351388
}
352389

353-
if (self::$installed !== array()) {
390+
if (self::$installed !== array() && !$copiedLocalDir) {
354391
$installed[] = self::$installed;
355392
}
356393

3rdparty/vendor/composer/autoload_static.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,30 @@
77
class ComposerStaticInitcc75f134f7630c1ee3a8e4d7c86f3bcc
88
{
99
public static $prefixLengthsPsr4 = array (
10-
'R' =>
10+
'R' =>
1111
array (
1212
'RobRichards\\XMLSecLibs\\' => 23,
1313
),
14-
'O' =>
14+
'O' =>
1515
array (
1616
'OneLogin\\' => 9,
1717
),
18-
'F' =>
18+
'F' =>
1919
array (
2020
'Firebase\\JWT\\' => 13,
2121
),
2222
);
2323

2424
public static $prefixDirsPsr4 = array (
25-
'RobRichards\\XMLSecLibs\\' =>
25+
'RobRichards\\XMLSecLibs\\' =>
2626
array (
2727
0 => __DIR__ . '/..' . '/robrichards/xmlseclibs/src',
2828
),
29-
'OneLogin\\' =>
29+
'OneLogin\\' =>
3030
array (
3131
0 => __DIR__ . '/..' . '/onelogin/php-saml/src',
3232
),
33-
'Firebase\\JWT\\' =>
33+
'Firebase\\JWT\\' =>
3434
array (
3535
0 => __DIR__ . '/..' . '/firebase/php-jwt/src',
3636
),

0 commit comments

Comments
 (0)