melhorenvio / magento2

Other
5 stars 8 forks source link

main.CRITICAL: Exception: User Deprecated Functionality #14

Open andrebassumo opened 1 year ago

andrebassumo commented 1 year ago

Boa tarde, estou recebendo o seguinte erro no arquivo exception.log após acessar no admin VENDAS/METODOS DE ENVIO, a tela aparece vazia Magento 2.4.6 - PHP 8.1 (OBS: modulo atual com o ultimo pull #13)

[2023-05-21T20:23:47.010476+00:00] main.CRITICAL: Exception: User Deprecated Functionality: Class is deprecated in /home/appilumi/public_html/vendor/magento/framework/HTTP/ZendClient.php on line 27 in /home/appilumi/public_html/vendor/magento/framework/App/ErrorHandler.php:62 Stack trace:

0 [internal function]: Magento\Framework\App\ErrorHandler->handler(16384, 'Class is deprec...', '/home/appilumi/...', 27)

1 /home/appilumi/public_html/vendor/magento/framework/HTTP/ZendClient.php(27): trigger_error('Class is deprec...', 16384)

2 /home/appilumi/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\HTTP\ZendClient->__construct(NULL, NULL)

3 /home/appilumi/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewo...', Array)

4 /home/appilumi/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...', Array)

5 /home/appilumi/public_html/generated/code/Magento/Framework/HTTP/ZendClientFactory.php(43): Magento\Framework\ObjectManager\ObjectManager->create('\Magento\Framew...', Array)

6 /home/appilumi/public_html/app/code/MelhorEnvio/Quote/Model/Services/Client/ZendClient.php(64): Magento\Framework\HTTP\ZendClientFactory->create()

7 /home/appilumi/public_html/app/code/MelhorEnvio/Quote/Model/Services/Companies.php(38): MelhorEnvio\Quote\Model\Services\Client\ZendClient->doRequest(Object(MelhorEnvio\Quote\Model\Services\Companies))

8 /home/appilumi/public_html/app/code/MelhorEnvio/Quote/Model/Config/Source/Services.php(43): MelhorEnvio\Quote\Model\Services\Companies->doRequest()

9 /home/appilumi/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Field.php(461): MelhorEnvio\Quote\Model\Config\Source\Services->toOptionArray(true)

10 /home/appilumi/public_html/vendor/magento/module-config/Model/Config/Structure/Element/Field.php(379): Magento\Config\Model\Config\Structure\Element\Field->_getOptionsFromSourceModel(Object(MelhorEnvio\Quote\Model\Config\Source\Services))

11 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(394): Magento\Config\Model\Config\Structure\Element\Field->getOptions()

12 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(316): Magento\Config\Block\System\Config\Form->_initElement(Object(Magento\Config\Model\Config\Structure\Element\Field), Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor), 'carriers/melhor...', '', '')

13 /home/appilumi/public_html/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(32): Magento\Config\Block\System\Config\Form->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Group\Proxy), Object(Magento\Config\Model\Config\Structure\Element\Section), '', '')

14 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(256): Magento\Config\Block\System\Config\Form\Interceptor->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Group\Proxy), Object(Magento\Config\Model\Config\Structure\Element\Section))

15 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(302): Magento\Config\Block\System\Config\Form->_initGroup(Object(Magento\Config\Model\Config\Structure\Element\Group\Proxy), Object(Magento\Config\Model\Config\Structure\Element\Section), Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor))

16 /home/appilumi/public_html/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(32): Magento\Config\Block\System\Config\Form->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Group), Object(Magento\Config\Model\Config\Structure\Element\Section), '', '')

17 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(256): Magento\Config\Block\System\Config\Form\Interceptor->initFields(Object(Magento\Framework\Data\Form\Element\Fieldset\Interceptor), Object(Magento\Config\Model\Config\Structure\Element\Group), Object(Magento\Config\Model\Config\Structure\Element\Section))

18 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(202): Magento\Config\Block\System\Config\Form->_initGroup(Object(Magento\Config\Model\Config\Structure\Element\Group), Object(Magento\Config\Model\Config\Structure\Element\Section), Object(Magento\Framework\Data\Form))

19 /home/appilumi/public_html/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(23): Magento\Config\Block\System\Config\Form->initForm()

20 /home/appilumi/public_html/vendor/magento/module-config/Block/System/Config/Form.php(542): Magento\Config\Block\System\Config\Form\Interceptor->initForm()

21 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1094): Magento\Config\Block\System\Config\Form->_beforeToHtml()

22 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1099): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()

23 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(660): Magento\Framework\View\Element\AbstractBlock->_loadCache()

24 /home/appilumi/public_html/generated/code/Magento/Config/Block/System/Config/Form/Interceptor.php(536): Magento\Framework\View\Element\AbstractBlock->toHtml()

25 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(578): Magento\Config\Block\System\Config\Form\Interceptor->toHtml()

26 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('system\config\f...')

27 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('system\config\f...')

28 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system\config\f...')

29 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('system\config\f...', true)

30 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(507): Magento\Framework\View\Layout\Interceptor->renderElement('system\config\f...', true)

31 /home/appilumi/public_html/var/view_preprocessed/pub/static/vendor/magento/module-config/view/adminhtml/templates/system/config/edit.phtml(1): Magento\Framework\View\Element\AbstractBlock->getChildHtml('form')

32 /home/appilumi/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('/home/appilumi/...')

33 /home/appilumi/public_html/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Config\Block\System\Config\Edit), '/home/appilumi/...', Array)

34 /home/appilumi/public_html/vendor/magento/framework/View/Element/Template.php(293): Magento\Framework\View\Element\Template->fetchView('/home/appilumi/...')

35 /home/appilumi/public_html/vendor/magento/module-backend/Block/Template.php(141): Magento\Framework\View\Element\Template->_toHtml()

36 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1095): Magento\Backend\Block\Template->_toHtml()

37 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(1099): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}()

38 /home/appilumi/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(660): Magento\Framework\View\Element\AbstractBlock->_loadCache()

39 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(578): Magento\Framework\View\Element\AbstractBlock->toHtml()

40 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(555): Magento\Framework\View\Layout->_renderBlock('system.config.e...')

41 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('system.config.e...')

42 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('system.config.e...')

43 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('system.config.e...', false)

44 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('system.config.e...', false)

45 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('content', false)

46 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('content')

47 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')

48 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('content', false)

49 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('content', false)

50 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('admin.scope.col...', false)

51 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('admin.scope.col...')

52 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('admin.scope.col...')

53 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('admin.scope.col...', false)

54 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('admin.scope.col...', false)

55 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('main.col', false)

56 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('main.col')

57 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.col')

58 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('main.col', false)

59 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('main.col', false)

60 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.main.conta...', false)

61 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('page.main.conta...')

62 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.main.conta...')

63 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('page.main.conta...', false)

64 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('page.main.conta...', false)

65 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.content', false)

66 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('page.content')

67 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.content')

68 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('page.content', false)

69 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('page.content', false)

70 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)

71 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')

72 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')

73 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('page.wrapper', false)

74 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)

75 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('backend.page', false)

76 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('backend.page')

77 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('backend.page')

78 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('backend.page', false)

79 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(606): Magento\Framework\View\Layout\Interceptor->renderElement('backend.page', false)

80 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(557): Magento\Framework\View\Layout->_renderContainer('root', false)

81 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(149): Magento\Framework\View\Layout->renderNonCachedElement('root')

82 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(510): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')

83 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(140): Magento\Framework\View\Layout->renderElement('root', true)

84 /home/appilumi/public_html/vendor/magento/framework/View/Layout.php(975): Magento\Framework\View\Layout\Interceptor->renderElement('root')

85 /home/appilumi/public_html/generated/code/Magento/Framework/View/Layout/Interceptor.php(347): Magento\Framework\View\Layout->getOutput()

86 /home/appilumi/public_html/vendor/magento/framework/View/Result/Page.php(260): Magento\Framework\View\Layout\Interceptor->getOutput()

87 /home/appilumi/public_html/vendor/magento/framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))

88 /home/appilumi/public_html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

89 /home/appilumi/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Backend\Model\View\Result\Page\Interceptor->___callParent('renderResult', Array)

90 /home/appilumi/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Model\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))

91 /home/appilumi/public_html/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(140): Magento\Backend\Model\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)

92 /home/appilumi/public_html/vendor/magento/framework/App/Http.php(120): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))

93 /home/appilumi/public_html/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()

94 /home/appilumi/public_html/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()

95 /home/appilumi/public_html/pub/index.php(30): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))

96 {main} {"exception":"[object] (Exception(code: 0): User Deprecated Functionality: Class is deprecated in /home/appilumi/public_html/vendor/magento/framework/HTTP/ZendClient.php on line 27 at /home/appilumi/public_html/vendor/magento/framework/App/ErrorHandler.php:62)"} []

Cyber-Root0 commented 1 year ago

Nós também estamos com o mesmo problema, a partir do Magento 2.4.6, não está sendo utilizado mais o Zend_Http_Client , foi substituído pelo \Laminas\Http\Request. @marcalpizzi @Carlessso @ScopelEduardo @valiati100 @LucasPereira762xi se puder nos ajudar atualizando o módulo o quanto antes, por favor.

Grato!

mateus-almeida-me commented 1 year ago

Boa tarde, pessoal, tudo bem?

Eu sou o Mateus, faço parte do time do Melhor Envio, o módulo aqui disponível não é compatível com as versões do Magento que utilizam PHP 8.x+.

Como consta em nosso manual de ajuda: https://ajuda.melhorenvio.com.br/pt-BR/articles/6101306-manual-de-integracao-magento-2

Não há qualquer previsão de que ele será atualizado para ser compatível com as novas versões.

Atenciosamente,

Cyber-Root0 commented 1 year ago

@mateus-almeida-me

Bom dia! aceita um pull request com a compatibilidade p/ magento2.4.6?

mateus-almeida-me commented 12 months ago

Boa tarde, @Cyber-Root0, tudo bem?

Você possui ele pronto ou gostaria de desenvolvê-lo? Você saberia informar a lista de recursos afetados, benefícios, consequências, mais detalhes da sua implementação? O PR seria exclusivamente para passar a funcionar além das versões já aceitas, só a 2.4.6?

Estou fazendo essas perguntas, pois pela diferença de versões de PHP, acredito que tenha que disponibilizar módulos separados para seguir atendendo as versões anteriores e a sua a partir do PR, correto?

Tenho que verificar a disponibilidade da equipe para validar seu PR antes de aceitar a publicação.

Atenciosamente,

Cyber-Root0 commented 12 months ago

Olá Boa tarde @mateus-almeida-me !

Documentei o PR aqui. https://github.com/melhorenvio/magento2/pull/15

Grato!

lmarquine commented 6 months ago

Pessoal, recentemente precisei fazer os ajustes para rodar o módulo no Magento 2.4.6-p4+ com PHP 8.2+ quem ficou na mão aí com a Melhor Envios se quiser entrar em contato, também ajustei o módulo da Kangu.