-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php8 support #42
Comments
This error is due to the fact that in PHP 8.1, return types have been added to the methods of built-in interfaces and classes, a change that may cause some compatibility issues. In your code, the return type of There are two ways to solve this problem:
#[\ReturnTypeWillChange]
public function current()
{
// ... your code here ...
}
public function current(): mixed
{
// ... your code here ...
} Please note that both solutions require you to have the permission to modify the source code. If you cannot modify the source code, you may need to contact the maintainers of this library and ask them to fix the issue. |
Call code public static function calculatingIpv6Subnets(string $ipv6_cidr): array
{
$subnets_64 = [];
$networks = \IPTools\Network::parse($ipv6_cidr)->moveTo('64');
foreach ($networks as $network) {
$subnets_64[] = (string) $network;
}
return $subnets_64;
} |
During inheritance of Iterator: Uncaught think\exception\ErrorException: Return type of IPTools\Network::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/wwwroot/project/vendor/s1lentium/iptools/src/Network.php:326
The text was updated successfully, but these errors were encountered: