These are no longer required as of PHP 8.1.
$reflection = new \ReflectionClass($e);
$property = $reflection->getProperty('information');
- $property->setAccessible(true);
if ($property->getValue($e)) {
throw new \Exception("Using the 'information' property of SystemException is not supported any more.");
}
$reflection = new \ReflectionClass($e);
$property = $reflection->getProperty('information');
- $property->setAccessible(true);
if ($property->getValue($e)) {
throw new \Exception("Using the 'information' property of SystemException is not supported any more.");
}
// avoid issues with links
$reflectionClass = new \ReflectionClass(RequestHandler::class);
$reflectionProperty = $reflectionClass->getProperty('isACPRequest');
- $reflectionProperty->setAccessible(true);
$reflectionProperty->setValue(RequestHandler::getInstance(), false);
/**
{
$reflectionClass = new \ReflectionClass(\get_class($cacheBuilder));
$reflectionProperty = $reflectionClass->getProperty('cache');
- $reflectionProperty->setAccessible(true);
$reflectionProperty->setValue($cacheBuilder, []);
}
}
// reset page cache
$reflectionClass = new \ReflectionClass(PageCache::class);
$reflectionProperty = $reflectionClass->getProperty('cache');
- $reflectionProperty->setAccessible(true);
$reflectionProperty->setValue(PageCache::getInstance(), PageCacheBuilder::getInstance()->getData());
// reset controller map
$reflectionClass = new \ReflectionClass(ControllerMap::class);
$reflectionMethod = $reflectionClass->getMethod('init');
- $reflectionMethod->setAccessible(true);
$reflectionMethod->invoke(ControllerMap::getInstance());
}
}