Description
By updating from Contao 5.2.10 to 5.3 an error appears:
Fatal error: Declaration of HeimrichHannot\UtilsBundle\Util\ContainerUtil::getSubscribedServices() must be compatible with Symfony\Contracts\Service\ServiceSubscriberInterface::getSubscribedServices(): array in ...\vendor\heimrichhannot\contao-utils-bundle\src\Util\ContainerUtil.php on line 176
These two changes solved the problem:
In UtilsBundle\Util\ContainerUtil.php the line 176 has to be changed.
From:
public static function getSubscribedServices()
to:
public static function getSubscribedServices(): array
In UtilsBundle\Util\Utils.php the line 119 has to be changed.
From:
public static function getSubscribedServices()
to:
public static function getSubscribedServices(): array
Context Contao version: 5.3 Bundle version: 3.0.0-beta3 PHP version: 8.2.3
Description By updating from Contao 5.2.10 to 5.3 an error appears:
Fatal error: Declaration of HeimrichHannot\UtilsBundle\Util\ContainerUtil::getSubscribedServices() must be compatible with Symfony\Contracts\Service\ServiceSubscriberInterface::getSubscribedServices(): array in ...\vendor\heimrichhannot\contao-utils-bundle\src\Util\ContainerUtil.php on line 176
These two changes solved the problem:
In UtilsBundle\Util\ContainerUtil.php the line 176 has to be changed. From: public static function getSubscribedServices() to: public static function getSubscribedServices(): array
In UtilsBundle\Util\Utils.php the line 119 has to be changed. From: public static function getSubscribedServices() to: public static function getSubscribedServices(): array