-
Notifications
You must be signed in to change notification settings - Fork 206
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
Error: During inheritance of Countable: Uncaught Whoops\Exception\ErrorException: Return type of Twig\Node\Node::count() should either be compatible with Countable::count() #3088
Comments
I am getting this same error with two sites, one each running Hydrogen 5.5.14 and Helium 5.5.14 on Joomla! 4.2.5. I have one other site running the same version of Helium 5.5.15 that does NOT do this. So I upgraded the other two sites to 5.5.15 and it did not resolve this issue. But upgrading the Gantry package to 5.5.15 DID. |
@bascherz since this is a new problem, please open a different issue for this so it can be properly tracked. |
It seems the issue has been reported elsewhere (#3073), but similar to my posting is intermixed with other issues and this part seems to be getting overlooked/ignored. I am happy to create a new issue for it, though. |
I would just comment on the other one rather than open a new issue. |
Already created a new issue (#3103). I really like how this forum ties all these issues together when they are cited by link reference. |
I checked the source code and the Twig version (v1) used by Gantry is no longer supported under PHP 8.1.
|
The solution suggested by csbalazs solved the problem for me. |
Error: During inheritance of Countable: Uncaught Whoops\Exception\ErrorException: Return type of Twig\Node\Node::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\wamp64\www\joomla4\libraries\gantry5\compat\vendor\twig\twig\src\Node\Node.php:213 Stack trace: # 0 C:\wamp64\www\joomla4\libraries\gantry5\src\classes\Gantry\Component\Whoops\SystemFacade.php(119): Whoops\Run->handleError(8192, 'Return type of ...', 'C:\wamp64\www\j...', 213) # 1 C:\wamp64\www\joomla4\libraries\gantry5\compat\vendor\twig\twig\src\Node\Node.php(23): Gantry\Component\Whoops\SystemFacade->handleError(8192, 'Return type of ...', 'C:\wamp64\www\j...', 213) # 2 C:\wamp64\www\joomla4\libraries\vendor\composer\ClassLoader.php(571): include('C:\wamp64\www\j...') # 3
Helium template works under PHP version 8.0.13.
The text was updated successfully, but these errors were encountered: