diff --git a/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/Php7/ReflectionClass.php b/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/Php7/ReflectionClass.php new file mode 100644 index 0000000..ec4c180 --- /dev/null +++ b/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/Php7/ReflectionClass.php @@ -0,0 +1,24 @@ += 80000) { + class_alias('Doctrine\Common\Reflection\Compatibility\Php8\ReflectionClass', 'Doctrine\Common\Reflection\Compatibility\ReflectionClass'); +} else { + class_alias('Doctrine\Common\Reflection\Compatibility\Php7\ReflectionClass', 'Doctrine\Common\Reflection\Compatibility\ReflectionClass'); +} + +if (false) { + class ReflectionClass + { + } +} diff --git a/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/ReflectionMethod.php b/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/ReflectionMethod.php new file mode 100644 index 0000000..5971206 --- /dev/null +++ b/lib/doctrine/common/lib/Doctrine/Common/Reflection/Compatibility/ReflectionMethod.php @@ -0,0 +1,19 @@ + += 80000) { + class_alias('Doctrine\Common\Reflection\Compatibility\Php8\ReflectionMethod', 'Doctrine\Common\Reflection\Compatibility\ReflectionMethod'); +} else { + class_alias('Doctrine\Common\Reflection\Compatibility\Php7\ReflectionMethod', 'Doctrine\Common\Reflection\Compatibility\ReflectionMethod'); +} + +if (false) { + class ReflectionMethod + { + } +} diff --git a/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php b/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php index b65979a..a2cebe5 100644 --- a/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php +++ b/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionClass.php @@ -19,11 +19,14 @@ namespace Doctrine\Common\Reflection; +use Doctrine\Common\Reflection\Compatibility\ReflectionClass as CompatibilityReflectionClass; use ReflectionClass; use ReflectionException; class StaticReflectionClass extends ReflectionClass { + use CompatibilityReflectionClass; + /** * The static reflection parser object. * @@ -103,14 +106,6 @@ public function getConstant($name) throw new ReflectionException('Method not implemented'); } - /** - * {@inheritDoc} - */ - public function getConstants() - { - throw new ReflectionException('Method not implemented'); - } - /** * {@inheritDoc} */ @@ -391,14 +386,6 @@ public function isUserDefined() throw new ReflectionException('Method not implemented'); } - /** - * {@inheritDoc} - */ - public function newInstance($args) - { - throw new ReflectionException('Method not implemented'); - } - /** * {@inheritDoc} */ diff --git a/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php b/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php index 8d5380b..b5e5d5f 100644 --- a/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php +++ b/lib/doctrine/common/lib/Doctrine/Common/Reflection/StaticReflectionMethod.php @@ -19,11 +19,14 @@ namespace Doctrine\Common\Reflection; +use Doctrine\Common\Reflection\Compatibility\ReflectionMethod as CompatibilityReflectionMethod; use ReflectionException; use ReflectionMethod; class StaticReflectionMethod extends ReflectionMethod { + use CompatibilityReflectionMethod; + /** * The PSR-0 parser object. * @@ -128,14 +131,6 @@ public function getPrototype() throw new ReflectionException('Method not implemented'); } - /** - * {@inheritDoc} - */ - public function invoke($object, $parameter = null) - { - throw new ReflectionException('Method not implemented'); - } - /** * {@inheritDoc} */