klaviyo / magento2-klaviyo

37 stars 51 forks source link

Magento 2.4.6 - PHP8.2 - Deprecated Functionality: Creation of dynamic property #243

Closed MauroNigrele closed 1 year ago

MauroNigrele commented 1 year ago

Environment details

PHP version: 8.2 Magento version: 2.4.6 Klaviyo extension version: 4.0.10

This is the error we see on Frontend after install:

Deprecated Functionality: Creation of dynamic property Klaviyo\Reclaim\Helper\ScopeSetting::$_storeId is deprecated in /var/www/html/vendor/klaviyo/magento2-extension/Helper/ScopeSetting.php on line 54

Steps to reproduce

  1. Install the extension
  2. ensure deploy:mode is developer
  3. Go to the frontend

Expected result

Home Page is displayed:

Actual result

this exception is shown instead:

`1 exception(s): Exception #0 (Exception): Deprecated Functionality: Creation of dynamic property Klaviyo\Reclaim\Helper\ScopeSetting::$_storeId is deprecated in /var/www/html/vendor/klaviyo/magento2-extension/Helper/ScopeSetting.php on line 54

Exception #0 (Exception): Deprecated Functionality: Creation of dynamic property Klaviyo\Reclaim\Helper\ScopeSetting::$_storeId is deprecated in /var/www/html/vendor/klaviyo/magento2-extension/Helper/ScopeSetting.php on line 54

#1 Klaviyo\Reclaim\Helper\ScopeSetting->__construct(&Magento\Framework\App\Helper\Context#0000000000000ab50000000000000000#, &Magento\Framework\App\State\Interceptor#00000000000000210000000000000000#, &Magento\Store\Model\StoreManager\Interceptor#0000000000000ba30000000000000000#, &Magento\Framework\Module\ModuleList#00000000000008f40000000000000000#, &Magento\Framework\App\Config\Storage\Writer#00000000000017a80000000000000000#) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#2 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Klaviyo\Reclaim\...', array(&Magento\Framework\App\Helper\Context#0000000000000ab50000000000000000#, &Magento\Framework\App\State\Interceptor#00000000000000210000000000000000#, &Magento\Store\Model\StoreManager\Interceptor#0000000000000ba30000000000000000#, &Magento\Framework\Module\ModuleList#00000000000008f40000000000000000#, &Magento\Framework\App\Config\Storage\Writer#00000000000017a80000000000000000#)) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Klaviyo\Reclaim\...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get('Klaviyo\Reclaim\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:170]
#5 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Klaviyo\Reclaim\...'), 'Klaviyo\Reclaim\...', NULL, 'klaviyoScopeSett...', 'Klaviyo\Reclaim\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:276]
#6 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Klaviyo\Reclaim\...', array('klaviyoScopeSett...', 'Klaviyo\Reclaim\...', true, NULL, false), array('data' => array())) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:239]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Klaviyo\Reclaim\...', array(array('context', 'Magento\Framewor...', true, NULL, false), array('klaviyoScopeSett...', 'Klaviyo\Reclaim\...', true, NULL, false), array('session', 'Magento\Customer...', true, NULL, false), array('data', NULL, false, array(), false)), array('data' => array())) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#8 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Klaviyo\Reclaim\...', array(array('context', 'Magento\Framewor...', true, NULL, false), array('klaviyoScopeSett...', 'Klaviyo\Reclaim\...', true, NULL, false), array('session', 'Magento\Customer...', true, NULL, false), array('data', NULL, false, array(), false)), array('data' => array())) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#9 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Klaviyo\Reclaim\...', array('data' => array())) called at [vendor/magento/framework/ObjectManager/ObjectManager.php:56]
#10 Magento\Framework\ObjectManager\ObjectManager->create('Klaviyo\Reclaim\...', array('data' => array())) called at [vendor/magento/framework/View/Element/BlockFactory.php:44]
#11 Magento\Framework\View\Element\BlockFactory->createBlock('Klaviyo\Reclaim\...', array('data' => array())) called at [vendor/magento/framework/View/Layout/Generator/Block.php:272]
#12 Magento\Framework\View\Layout\Generator\Block->getBlockInstance('Klaviyo\Reclaim\...', array('data' => array())) called at [vendor/magento/framework/View/Layout/Generator/Block.php:252]
#13 Magento\Framework\View\Layout\Generator\Block->createBlock('Klaviyo\Reclaim\...', 'klaviyo.initiali...', array('data' => array())) called at [vendor/magento/framework/View/Layout/Generator/Block.php:225]
#14 Magento\Framework\View\Layout\Generator\Block->generateBlock(&Magento\Framework\View\Layout\ScheduledStructure#00000000000009590000000000000000#, &Magento\Framework\View\Layout\Data\Structure#00000000000015b80000000000000000#, 'klaviyo.initiali...') called at [vendor/magento/framework/View/Layout/Generator/Block.php:134]
#15 Magento\Framework\View\Layout\Generator\Block->process(&Magento\Framework\View\Layout\Reader\Context#00000000000013fc0000000000000000#, &Magento\Framework\View\Layout\Generator\Context#00000000000008700000000000000000#) called at [vendor/magento/framework/View/Layout/GeneratorPool.php:93]
#16 Magento\Framework\View\Layout\GeneratorPool->process(&Magento\Framework\View\Layout\Reader\Context#00000000000013fc0000000000000000#, &Magento\Framework\View\Layout\Generator\Context#00000000000008700000000000000000#) called at [vendor/magento/framework/View/Layout.php:365]
#17 Magento\Framework\View\Layout->generateElements() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#18 Magento\Framework\View\Layout\Interceptor->___callParent('generateElements', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#19 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#20 Magento\Framework\View\Layout\Interceptor->___callPlugins('generateElements', array(), array(array('layout-model-cac...', 'core-session-dep...', 'customer-session...', 'catalog-session-...', 'persistent-sessi...', 'customer-segment...', 'checkout-session...', 'tax-session-depe...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:68]
#21 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#22 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:65]
#23 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#24 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:271]
#25 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:896]
#26 Magento\Framework\View\Layout->getBlock('page_content_hea...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:293]
#27 Magento\Framework\View\Layout\Interceptor->getBlock('page_content_hea...') called at [vendor/magento/module-cms/Helper/Page.php:216]
#28 Magento\Cms\Helper\Page->prepareResultPage(&Magento\Cms\Controller\Index\Index\Interceptor#00000000000013780000000000000000#, 'home') called at [vendor/magento/module-cms/Controller/Index/Index.php:74]
#29 Magento\Cms\Controller\Index\Index->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#30 Magento\Cms\Controller\Index\Index\Interceptor->___callParent('execute', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#31 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#32 Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('execute', array(), array(array('storeCheck', 'designLoader', 'customerNotifica...', 'tax-app-action-d...', 'weee-app-action-...', 'invalidate_expir...', 'customer-app-act...'))) called at [generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php:23]
#33 Magento\Cms\Controller\Index\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:111]
#34 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#35 Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#36 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/module-company/Plugin/Framework/App/Action/AbstractActionPlugin.php:65]
#37 Magento\Company\Plugin\Framework\App\Action\AbstractActionPlugin->aroundDispatch(&Magento\Cms\Controller\Index\Index\Interceptor#00000000000013780000000000000000#, &Closure#00000000000010b60000000000000000#, &Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#38 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#39 Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#), array(array('ajaxcartpro-acti...'), array('contextPlugin', 'customer-segment...'))) called at [generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php:32]
#40 Magento\Cms\Controller\Index\Index\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/App/FrontController.php:245]
#41 Magento\Framework\App\FrontController->getActionResponse(&Magento\Cms\Controller\Index\Index\Interceptor#00000000000013780000000000000000#, &Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/App/FrontController.php:212]
#42 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#, &Magento\Cms\Controller\Index\Index\Interceptor#00000000000013780000000000000000#) called at [vendor/magento/framework/App/FrontController.php:146]
#43 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#44 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#45 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99]
#46 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000000000151b0000000000000000#, &Closure#00000000000015ff0000000000000000#, &Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#47 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:71]
#48 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#000000000000151b0000000000000000#, &Closure#00000000000015ff0000000000000000#, &Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#49 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#50 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#51 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000000002870000000000000000#) called at [vendor/magento/framework/App/Http.php:116]
#52 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#53 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:264]
#54 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000000004050000000000000000#) called at [pub/index.php:30]
` ### Additional information _No response_
cykolln commented 1 year ago

Fixed in https://github.com/klaviyo/magento2-klaviyo/releases/tag/4.0.11

MauroNigrele commented 1 year ago

Great news!!!