t3solution / t3sbootstrap

Startup extension to use bootstrap 5 classes, components and more out of the box.
GNU General Public License v2.0
24 stars 20 forks source link

PHP Runtime Deprecation Notice - PHP 8.2 #407

Open peterschoene opened 1 month ago

peterschoene commented 1 month ago

TYPO3 V 12.4.20 t3sbs/t3sbootstrap (v5.3.15) PHP 8.2

When calling the scheduler I get

[CRITICAL] request="604d2908e4a66" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB: BE): TYPO3\CMS\Core\Error\Exception, code #1476107295, file /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php, line 138: PHP Runtime Deprecation Notice: Creation of dynamic property T3SBS\T3sbootstrap\Command\CustomScss::$configurationManager is deprecated in /var/www/html/vendor/t3sbs/t3sbootstrap/Classes/Command/CustomScss.php line 35- Exception: PHP Runtime Deprecation Notice: Creation of dynamic property T3SBS\T3sbootstrap\Command\CustomScss::$configurationManager is deprecated in /var/www/html/vendor/t3sbs/t3sbootstrap/Classes/Command/CustomScss.php line 35, in file /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php:138 - {"mode":"WEB","application_mode":"BE","exception_class":"TYPO3\CMS\Core\Error\Exception","exception_code":1476107295,"file":"/var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php","line":138,"message":"PHP Runtime Deprecation Notice: Creation of dynamic property T3SBS\T3sbootstrap\Command\CustomScss::$configurationManager is deprecated in /var/www/html/vendor/t3sbs/t3sbootstrap/Classes/Command/CustomScss.php line 35"

Can be fixed by using PHP 8.1 or replacing the lines 27-36 in t3sbs/t3sbootstrap/Classes/Command/CustomScss.php

public function initializeAction()
    {
        parent::initializeAction();
    }

    public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
    {
        $this->configurationManager = $configurationManager;
    }

by

   /**
     * @var ConfigurationManagerInterface
     */
    protected ConfigurationManagerInterface $configurationManager;

    public function initializeAction()
    {
        parent::initializeAction();
    }

    public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager)
    {
        $this->configurationManager = $configurationManager;
    }
at-ac commented 1 month ago

Hi, same here

TYPO3 12.4.20 t3sbootstrap 5.3.15 PHP 8.3.12

Solution from @peterschoene worked for me :)

t3solution commented 1 month ago

Should be fixed with v5.3.16!