summaryrefslogtreecommitdiffstats
path: root/php-aura-di-php8.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2021-03-31 11:28:43 +0200
committerRemi Collet <remi@remirepo.net>2021-03-31 11:28:43 +0200
commit8b9a3424d30034e439c7977533aeaa1613a6211e (patch)
tree6e7e31a33b0cbf704adef88e73304e7538c376c5 /php-aura-di-php8.patch
parent6c3e5957cb1a5a560b6f80f504b15ee902c16f49 (diff)
add minimal fix for PHP 8HEADmaster
use range dependencies
Diffstat (limited to 'php-aura-di-php8.patch')
-rw-r--r--php-aura-di-php8.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/php-aura-di-php8.patch b/php-aura-di-php8.patch
new file mode 100644
index 0000000..889af96
--- /dev/null
+++ b/php-aura-di-php8.patch
@@ -0,0 +1,24 @@
+diff -up ./src/Resolver/AutoResolver.php.php8 ./src/Resolver/AutoResolver.php
+--- ./src/Resolver/AutoResolver.php.php8 2021-03-31 11:23:21.738880158 +0200
++++ ./src/Resolver/AutoResolver.php 2021-03-31 11:23:24.532869778 +0200
+@@ -54,7 +54,7 @@ class AutoResolver extends Resolver
+ }
+
+ // use an explicit auto-resolution?
+- $rtype = $rparam->getClass();
++ $rtype = @$rparam->getClass();
+ if ($rtype && isset($this->types[$rtype->name])) {
+ return $this->types[$rtype->name];
+ }
+diff -up ./src/Resolver/Resolver.php.php8 ./src/Resolver/Resolver.php
+--- ./src/Resolver/Resolver.php.php8 2021-03-31 11:21:49.964221101 +0200
++++ ./src/Resolver/Resolver.php 2021-03-31 11:22:01.635177740 +0200
+@@ -266,7 +266,7 @@ class Resolver
+ $spec = [[], []];
+
+ // fetch the values for parents so we can inherit them
+- $parent = get_parent_class($class);
++ $parent = class_exists($class) ? get_parent_class($class) : null;
+ if ($parent) {
+ $spec = $this->getUnified($parent);
+ }