@@ -279,9 +279,11 @@ public static function provideRegistry(): iterable
279279
280280 // Class aliases. For more information see:
281281 // https://github.com/humbug/php-scoper/blob/master/docs/further-reading.md#class-aliases
282- function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
283- if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
284- spl_autoload_call($prefixed);
282+ if (!function_exists('humbug_phpscoper_expose_class')) {
283+ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
284+ if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
285+ spl_autoload_call($prefixed);
286+ }
285287 }
286288 }
287289 humbug_phpscoper_expose_class('A\Foo', 'Humbug\A\Foo');
@@ -323,9 +325,11 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
323325
324326 // Class aliases. For more information see:
325327 // https://github.com/humbug/php-scoper/blob/master/docs/further-reading.md#class-aliases
326- function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
327- if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
328- spl_autoload_call($prefixed);
328+ if (!function_exists('humbug_phpscoper_expose_class')) {
329+ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
330+ if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
331+ spl_autoload_call($prefixed);
332+ }
329333 }
330334 }
331335 humbug_phpscoper_expose_class('Foo', 'Humbug\Foo');
@@ -376,9 +380,11 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
376380 // Class aliases. For more information see:
377381 // https://github.com/humbug/php-scoper/blob/master/docs/further-reading.md#class-aliases
378382 namespace {
379- function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
380- if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
381- spl_autoload_call($prefixed);
383+ if (!function_exists('humbug_phpscoper_expose_class')) {
384+ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void {
385+ if (!class_exists($exposed, false) && !interface_exists($exposed, false) && !trait_exists($exposed, false)) {
386+ spl_autoload_call($prefixed);
387+ }
382388 }
383389 }
384390 humbug_phpscoper_expose_class('A\Foo', 'Humbug\A\Foo');
0 commit comments