Closed FabienYt closed 2 years ago
No idea what's going on here. Haven't tested with the Twig plugin. PR welcome!
I just found the problem, it comes from PHP 8.1 and not from Kirby Twig as I thought at first. I push the PR quickly. (Done: #15 )
https://wiki.php.net/rfc/internal_method_return_types
Unfortunately, union return types impose a compatibility challenge for libraries: as this construct is only supported since PHP 8.0, libraries would have to accept the fact by default that their code triggers E_DEPRECATED notices on PHP 8.1 if they also want to support PHP versions below 8.0. As a remedy, this RFC proposes to add a ReturnTypeWillChange attribute which could be used to suppress the related E_DEPRECATED notices. Thanks to the backward compatible syntax of attributes, this can be done in code which is compatible with PHP 7 and below.
Nice one. Thanks! Fixed in v2.1.0.
I would like to use your plugin with kirby-twig, unfortunately I have a fatal error when running.
Environment:
Error: