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

Auto discovery broken in Symfony 4.4 ? #149

Closed
XWB opened this issue Dec 4, 2019 · 3 comments · Fixed by #150
Closed

Auto discovery broken in Symfony 4.4 ? #149

XWB opened this issue Dec 4, 2019 · 3 comments · Fixed by #150

Comments

@XWB
Copy link

XWB commented Dec 4, 2019

After upgrading to Symfony 4.4, I got the following error:

bin/console

image

Stack trace:

[Http\Discovery\Exception\ClassInstantiationFailedException]  
  Unexpected exception when instantiating class

  at vendor/php-http/discovery/src/ClassDiscovery.php:210
 Http\Discovery\ClassDiscovery::instantiateClass() at vendor/php-http/discovery/src/HttpClientDiscovery.php:34
 Http\Discovery\HttpClientDiscovery::find() at vendor/friendsofapi/localise.biz/src/HttpClientConfigurator.php:59
 FAPI\Localise\HttpClientConfigurator->__construct() at var/cache/dev/ContainerBZs79FG/getPhpTranslation_Adapter_LocoService.php:17
 require() at var/cache/dev/ContainerBZs79FG/srcApp_KernelDevDebugContainer.php:742
 ContainerBZs79FG\srcApp_KernelDevDebugContainer->load() at var/cache/dev/ContainerBZs79FG/getPhpTranslation_Storage_WdaService.php:16
 require() at var/cache/dev/ContainerBZs79FG/srcApp_KernelDevDebugContainer.php:742
 ContainerBZs79FG\srcApp_KernelDevDebugContainer->load() at var/cache/dev/ContainerBZs79FG/getPhpTranslation_StorageManagerService.php:13
 require() at var/cache/dev/ContainerBZs79FG/srcApp_KernelDevDebugContainer.php:742
 ContainerBZs79FG\srcApp_KernelDevDebugContainer->load() at var/cache/dev/ContainerBZs79FG/getPhpTranslator_Console_DeleteObsoleteService.php:15
 require() at var/cache/dev/ContainerBZs79FG/srcApp_KernelDevDebugContainer.php:742
 ContainerBZs79FG\srcApp_KernelDevDebugContainer->load() at vendor/symfony/dependency-injection/Container.php:444
 Symfony\Component\DependencyInjection\Container->getService() at vendor/symfony/dependency-injection/Argument/ServiceLocator.php:40
 Symfony\Component\DependencyInjection\Argument\ServiceLocator->get() at vendor/symfony/console/CommandLoader/ContainerCommandLoader.php:45
 Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() at vendor/symfony/console/Application.php:542
 Symfony\Component\Console\Application->has() at vendor/symfony/console/Application.php:743
 Symfony\Component\Console\Application->all() at vendor/symfony/framework-bundle/Console/Application.php:143
 Symfony\Bundle\FrameworkBundle\Console\Application->all() at vendor/symfony/console/Descriptor/ApplicationDescription.php:91
 Symfony\Component\Console\Descriptor\ApplicationDescription->inspectApplication() at vendor/symfony/console/Descriptor/ApplicationDescription.php:68
 Symfony\Component\Console\Descriptor\ApplicationDescription->getCommands() at vendor/symfony/console/Descriptor/TextDescriptor.php:202
 Symfony\Component\Console\Descriptor\TextDescriptor->describeApplication() at vendor/symfony/console/Descriptor/Descriptor.php:55
 Symfony\Component\Console\Descriptor\Descriptor->describe() at vendor/symfony/console/Helper/DescriptorHelper.php:67
 Symfony\Component\Console\Helper\DescriptorHelper->describe() at vendor/symfony/console/Command/ListCommand.php:75
 Symfony\Component\Console\Command\ListCommand->execute() at vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at vendor/symfony/console/Application.php:1029
 Symfony\Component\Console\Application->doRunCommand() at vendor/symfony/framework-bundle/Console/Application.php:100
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at vendor/symfony/console/Application.php:272
 Symfony\Component\Console\Application->doRun() at vendor/symfony/framework-bundle/Console/Application.php:83
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at bin/console:36

Related packages I have installed:

php-http/guzzle6-adapter
php-translation/symfony-bundle
php-translation/loco-adapter

I fixed it by installing http-interop/http-factory-guzzle but I wonder what has changed in Symfony 4.4 that broke the http discovery?

@XWB
Copy link
Author

XWB commented Dec 4, 2019

@mbabker
Copy link
Contributor

mbabker commented Dec 4, 2019

This is a bit of a stab in the dark but I think #150 is a possible fix for this issue. Otherwise, hopefully someone has a better suggestion if that one ends up not being a viable fix.

@NicoHaase
Copy link

Any news about this? I just ran in the same problem: the linked list of packages suggests I should install guzzlehttp/psr7, but that is definitely available on my system

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

Successfully merging a pull request may close this issue.

3 participants