Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding symfony/http-kernel requirement #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

callum-zero1
Copy link

There is a requirement for the symfony/http-kernel package that isn't defined in the composer.json.

Example error:

[2023-06-13 07:29:59] main.CRITICAL: Error: Class 'Symfony\Component\HttpKernel\Exception\HttpException' not found in /home/magento/htdocs/vendor/hyva-themes/magento2-hyva-checkout/src/Model/Magewire/Component/Resolver/Checkout.php:78
Stack trace:
#0 /home/magento/htdocs/vendor/magewirephp/magewire/src/Controller/Post/Livewire.php(106): Hyva\Checkout\Model\Magewire\Component\Resolver\Checkout->reconstruct(Object(Magewirephp\Magewire\Model\Request))
#1 /home/magento/htdocs/generated/code/Magewirephp/Magewire/Controller/Post/Livewire/Interceptor.php(32): Magewirephp\Magewire\Controller\Post\Livewire->locateWireComponent(Array)
#2 /home/magento/htdocs/vendor/magewirephp/magewire/src/Controller/Post/Livewire.php(75): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->locateWireComponent(Array)
#3 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magewirephp\Magewire\Controller\Post\Livewire->execute()
#4 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->___callParent('execute', Array)
#5 /home/magento/htdocs/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->Magento\Framework\Interception\{closure}()
#6 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute(Object(Magewirephp\Magewire\Controller\Post\Livewire\Interceptor), Object(Closure))
#7 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->Magento\Framework\Interception\{closure}()
#8 /home/magento/htdocs/generated/code/Magewirephp/Magewire/Controller/Post/Livewire/Interceptor.php(23): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->___callPlugins('execute', Array, Array)
#9 /home/magento/htdocs/vendor/magento/framework/App/FrontController.php(188): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->execute()
#10 /home/magento/htdocs/vendor/magento/framework/App/FrontController.php(118): Magento\Framework\App\FrontController->processRequest(Object(Magento\Framework\App\Request\Http), Object(Magewirephp\Magewire\Controller\Post\Livewire\Interceptor))
#11 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#13 /home/magento/htdocs/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(99): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#14 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#15 /home/magento/htdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#16 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#18 /home/magento/htdocs/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#19 /home/magento/htdocs/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#20 /home/magento/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#21 /home/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch()
#22 /home/magento/htdocs/pub/index.php(29): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#23 {main} [] []

I have removed the requirement of symfony/http-foundation as this is now required by symfony/http-kernel.

I required version 4.4 because requiring 5.4 (matching the previously declared symfony/http-foundation requirement version) causes conflicts with other Symfony packages used by Magento 2.4.2.

magento/product-community-edition  2.4.2     requires  symfony/event-dispatcher (~4.4.0)
magento/product-community-edition  2.4.2     requires  symfony/console (~4.4.0)

@wpoortman
Copy link
Collaborator

wpoortman commented Jun 13, 2023

@callum-zero1,

How can we be sure this isn't gonna conflict elsewhere on a higher Magento version?

I've been looking into #98 again. Maybe it's a better idea to try and get rid of any \Symfony\Component\HttpKernel\Exception\HttpException exception.

Not sure if it's possible, but if it's the only place where this is being used, it could be the better solution.

@jissereitsma
Copy link

My 50 cents here: #135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants