Skip to content

Commit 6d82d64

Browse files
committed
chore: Update psr/container to 1.1.2
Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
1 parent 72a1711 commit 6d82d64

File tree

10 files changed

+65
-55
lines changed

10 files changed

+65
-55
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"php-opencloud/openstack": "^3.1",
4545
"phpseclib/phpseclib": "^2.0.38",
4646
"pimple/pimple": "^3.5.0",
47-
"psr/container": "^1.1.1",
47+
"psr/container": "^1.1.2",
4848
"psr/event-dispatcher": "^1.0",
4949
"punic/punic": "^1.6",
5050
"sabre/dav": "^4.4.0",

composer.lock

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

composer/ClassLoader.php

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
*/
4343
class ClassLoader
4444
{
45+
/** @var \Closure(string):void */
46+
private static $includeFile;
47+
4548
/** @var ?string */
4649
private $vendorDir;
4750

@@ -106,6 +109,7 @@ class ClassLoader
106109
public function __construct($vendorDir = null)
107110
{
108111
$this->vendorDir = $vendorDir;
112+
self::initializeIncludeClosure();
109113
}
110114

111115
/**
@@ -425,7 +429,8 @@ public function unregister()
425429
public function loadClass($class)
426430
{
427431
if ($file = $this->findFile($class)) {
428-
includeFile($file);
432+
$includeFile = self::$includeFile;
433+
$includeFile($file);
429434

430435
return true;
431436
}
@@ -555,18 +560,26 @@ private function findFileWithExtension($class, $ext)
555560

556561
return false;
557562
}
558-
}
559563

560-
/**
561-
* Scope isolated include.
562-
*
563-
* Prevents access to $this/self from included files.
564-
*
565-
* @param string $file
566-
* @return void
567-
* @private
568-
*/
569-
function includeFile($file)
570-
{
571-
include $file;
564+
/**
565+
* @return void
566+
*/
567+
private static function initializeIncludeClosure()
568+
{
569+
if (self::$includeFile !== null) {
570+
return;
571+
}
572+
573+
/**
574+
* Scope isolated include.
575+
*
576+
* Prevents access to $this/self from included files.
577+
*
578+
* @param string $file
579+
* @return void
580+
*/
581+
self::$includeFile = \Closure::bind(static function($file) {
582+
include $file;
583+
}, null, null);
584+
}
572585
}

composer/autoload_classmap.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,6 +3353,7 @@
33533353
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => $vendorDir . '/symfony/service-contracts/ServiceProviderInterface.php',
33543354
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberInterface.php',
33553355
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/service-contracts/ServiceSubscriberTrait.php',
3356+
'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/service-contracts/Test/ServiceLocatorTest.php',
33563357
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/translation-contracts/LocaleAwareInterface.php',
33573358
'Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/translation-contracts/TranslatableInterface.php',
33583359
'Symfony\\Contracts\\Translation\\TranslatorInterface' => $vendorDir . '/symfony/translation-contracts/TranslatorInterface.php',

composer/autoload_real.php

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,18 @@ public static function getLoader()
3838
$loader->setClassMapAuthoritative(true);
3939
$loader->register(true);
4040

41-
$includeFiles = \Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::$files;
42-
foreach ($includeFiles as $fileIdentifier => $file) {
43-
composerRequire2f23f73bc0cc116b4b1eee1521aa8652($fileIdentifier, $file);
41+
$filesToLoad = \Composer\Autoload\ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652::$files;
42+
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
43+
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
44+
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
45+
46+
require $file;
47+
}
48+
}, null, null);
49+
foreach ($filesToLoad as $fileIdentifier => $file) {
50+
$requireFile($fileIdentifier, $file);
4451
}
4552

4653
return $loader;
4754
}
4855
}
49-
50-
/**
51-
* @param string $fileIdentifier
52-
* @param string $file
53-
* @return void
54-
*/
55-
function composerRequire2f23f73bc0cc116b4b1eee1521aa8652($fileIdentifier, $file)
56-
{
57-
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
58-
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
59-
60-
require $file;
61-
}
62-
}

composer/autoload_static.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4020,6 +4020,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652
40204020
'Symfony\\Contracts\\Service\\ServiceProviderInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceProviderInterface.php',
40214021
'Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberInterface.php',
40224022
'Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/service-contracts/ServiceSubscriberTrait.php',
4023+
'Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/service-contracts/Test/ServiceLocatorTest.php',
40234024
'Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/LocaleAwareInterface.php',
40244025
'Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatableInterface.php',
40254026
'Symfony\\Contracts\\Translation\\TranslatorInterface' => __DIR__ . '/..' . '/symfony/translation-contracts/TranslatorInterface.php',

composer/installed.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3457,23 +3457,23 @@
34573457
},
34583458
{
34593459
"name": "psr/container",
3460-
"version": "1.1.1",
3461-
"version_normalized": "1.1.1.0",
3460+
"version": "1.1.2",
3461+
"version_normalized": "1.1.2.0",
34623462
"source": {
34633463
"type": "git",
34643464
"url": "https://github.com/php-fig/container.git",
3465-
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
3465+
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
34663466
},
34673467
"dist": {
34683468
"type": "zip",
3469-
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
3470-
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
3469+
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
3470+
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
34713471
"shasum": ""
34723472
},
34733473
"require": {
3474-
"php": ">=7.2.0"
3474+
"php": ">=7.4.0"
34753475
},
3476-
"time": "2021-03-05T17:36:06+00:00",
3476+
"time": "2021-11-05T16:50:12+00:00",
34773477
"type": "library",
34783478
"installation-source": "dist",
34793479
"autoload": {
@@ -3502,7 +3502,7 @@
35023502
],
35033503
"support": {
35043504
"issues": "https://github.com/php-fig/container/issues",
3505-
"source": "https://github.com/php-fig/container/tree/1.1.1"
3505+
"source": "https://github.com/php-fig/container/tree/1.1.2"
35063506
},
35073507
"install-path": "../psr/container"
35083508
},

composer/installed.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name' => 'nextcloud/3rdparty',
44
'pretty_version' => 'dev-master',
55
'version' => 'dev-master',
6-
'reference' => 'dd9bbb7e6179112ba9a726510ed9a024cf3ccefb',
6+
'reference' => 'e5652531729bc228026b7fe2d088e62d70352da8',
77
'type' => 'library',
88
'install_path' => __DIR__ . '/../',
99
'aliases' => array(),
@@ -337,7 +337,7 @@
337337
'nextcloud/3rdparty' => array(
338338
'pretty_version' => 'dev-master',
339339
'version' => 'dev-master',
340-
'reference' => 'dd9bbb7e6179112ba9a726510ed9a024cf3ccefb',
340+
'reference' => 'e5652531729bc228026b7fe2d088e62d70352da8',
341341
'type' => 'library',
342342
'install_path' => __DIR__ . '/../',
343343
'aliases' => array(),
@@ -488,9 +488,9 @@
488488
'dev_requirement' => false,
489489
),
490490
'psr/container' => array(
491-
'pretty_version' => '1.1.1',
492-
'version' => '1.1.1.0',
493-
'reference' => '8622567409010282b7aeebe4bb841fe98b58dcaf',
491+
'pretty_version' => '1.1.2',
492+
'version' => '1.1.2.0',
493+
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
494494
'type' => 'library',
495495
'install_path' => __DIR__ . '/../psr/container',
496496
'aliases' => array(),

psr/container/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"php": ">=7.2.0"
15+
"php": ">=7.4.0"
1616
},
1717
"autoload": {
1818
"psr-4": {

psr/container/src/ContainerExceptionInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
namespace Psr\Container;
44

5+
use Throwable;
6+
57
/**
68
* Base interface representing a generic exception in a container.
79
*/
8-
interface ContainerExceptionInterface
10+
interface ContainerExceptionInterface extends Throwable
911
{
1012
}

0 commit comments

Comments
 (0)