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

fix: adding symfony/http-foundation require #98

Merged
merged 1 commit into from
May 16, 2023

Conversation

adamzero1
Copy link
Contributor

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

Error: Class 'Symfony\Component\HttpFoundation\Response' not found in /home/magento/htdocs/vendor/magewirephp/magewire/src/Controller/Post/Livewire.php:155
Stack trace:
#0 /home/magento/htdocs/generated/code/Magewirephp/Magewire/Controller/Post/Livewire/Interceptor.php(77): Magewirephp\Magewire\Controller\Post\Livewire->getHttpResponseStatuses()
#1 /home/magento/htdocs/vendor/magewirephp/magewire/src/Controller/Post/Livewire.php(114): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->getHttpResponseStatuses()
#2 /home/magento/htdocs/generated/code/Magewirephp/Magewire/Controller/Post/Livewire/Interceptor.php(41): Magewirephp\Magewire\Controller\Post\Livewire->throwException(Object(Magento\Framework\Exception\LocalizedException))
#3 /home/magento/htdocs/vendor/magewirephp/magewire/src/Controller/Post/Livewire.php(93): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->throwException(Object(Magento\Framework\Exception\LocalizedException))
#4 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magewirephp\Magewire\Controller\Post\Livewire->execute()
#5 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->___callParent('execute', Array)
#6 /home/magento/htdocs/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->Magento\Framework\Interception\{closure}()
#7 /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))
#8 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->Magento\Framework\Interception\{closure}()
#9 /home/magento/htdocs/generated/code/Magewirephp/Magewire/Controller/Post/Livewire/Interceptor.php(23): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->___callPlugins('execute', Array, Array)
#10 /home/magento/htdocs/vendor/magento/framework/App/FrontController.php(188): Magewirephp\Magewire\Controller\Post\Livewire\Interceptor->execute()
#11 /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))
#12 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#13 /home/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#14 /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))
#15 /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))
#16 /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))
#17 /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))
#18 /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))
#19 /home/magento/htdocs/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#20 /home/magento/htdocs/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#21 /home/magento/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http->launch()
#22 /home/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch()
#23 /home/magento/htdocs/pub/index.php(29): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#24 {main}

This may not have shown up in testing as symfony/http-foundation is a requirment of the dev dependencies.
So doing composer install would "fix" the issue.

magento@17582-php-fpm:~/htdocs$ composer why symfony/http-foundation
allure-framework/allure-php-api                1.1.8  requires  symfony/http-foundation (^2.0 || ^3.0 || ^4.0 || ^5.0)  
magento/magento2-functional-testing-framework  3.5.1  requires  symfony/http-foundation (^5.0)

But doing composer install --no-dev

magento@17582-php-fpm:~/htdocs$ composer why symfony/http-foundation

                                                                    
  [InvalidArgumentException]                                        
  Could not find package "symfony/http-foundation" in your project  
                                                                    

depends [-r|--recursive] [-t|--tree] [--] <package> [<constraint>]

@wpoortman wpoortman merged commit 685611b into magewirephp:main May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants