Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace Doctrine\Common\Reflection\Compatibility\Php7;

use ReflectionException;

trait ReflectionClass
{
/**
* {@inheritDoc}
*/
public function getConstants()
{
throw new ReflectionException('Method not implemented');
}

/**
* {@inheritDoc}
*/
public function newInstance($args)
{
throw new ReflectionException('Method not implemented');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Doctrine\Common\Reflection\Compatibility\Php7;

use ReflectionException;

trait ReflectionMethod
{
/**
* {@inheritDoc}
*/
public function invoke($object, $parameter = null)
{
throw new ReflectionException('Method not implemented');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace Doctrine\Common\Reflection\Compatibility\Php8;

use ReflectionException;

trait ReflectionClass
{
/**
* {@inheritDoc}
*/
public function getConstants(?int $filter = null)
{
throw new ReflectionException('Method not implemented');
}

/**
* {@inheritDoc}
*/
public function newInstance(mixed ...$args)
{
throw new ReflectionException('Method not implemented');
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Doctrine\Common\Reflection\Compatibility\Php8;

use ReflectionException;

trait ReflectionMethod
{
/**
* {@inheritDoc}
*/
public function invoke(?object $object, mixed ...$args)
{
throw new ReflectionException('Method not implemented');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Doctrine\Common\Reflection\Compatibility;

use const PHP_VERSION_ID;
use function class_alias;

if (PHP_VERSION_ID >= 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
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

<?php

namespace Doctrine\Common\Reflection\Compatibility;

use const PHP_VERSION_ID;
use function class_alias;

if (PHP_VERSION_ID >= 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
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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}
*/
Expand Down Expand Up @@ -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}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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}
*/
Expand Down