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

InvalidArgumentException: Class "Symfony\Component\Cache\Adapter\AdapterInterface" does not exist #190

Open
imironyak opened this issue Mar 19, 2025 · 0 comments

Comments

@imironyak
Copy link

imironyak commented Mar 19, 2025

Describe the bug
When running the bin/console cache:clear command, an exception occurs indicating that the class Symfony\Component\Cache\Adapter\AdapterInterface does not exist.

The error suggests that Proxifier is trying to process the cache.system service definition which references Symfony\Component\Cache\Adapter\AdapterInterface interface but the ProxifierAssertions::assertServiceIsNotReadOnly requires a class.

Steps To Reproduce
Run the following command in the Symfony project directory:

bin/console cache:clear -v

Observe the error message in the console output.

Expected behavior
Proxifier should allow abstract service definitions that reference an interface

Environment (please complete the following information):

  • OS: macOS
  • PHP Version: 8.4
  • Swoole Version: 6.0.0
  • Symfony Version: 7.2.4
  • Running in docker: Yes

Additional context
Docker image: phpswoole/swoole:6.0.0-php8.4-dev

Logs

Exception trace

Class "Symfony\Component\Cache\Adapter\AdapterInterface" does not exist at /app/vendor/beberlei/assert/lib/Assert/Assertion.php:2728 Assert\Assertion::createException() at /app/vendor/beberlei/assert/lib/Assert/Assertion.php:1866 Assert\Assertion::classExists() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServices/ProxifierAssertions.php:17 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\Proxifier->assertServiceIsNotReadOnly() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServices/Proxifier.php:63 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\Proxifier->proxifyService() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServicesPass.php:183 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServicesPass->proxifyKnownStatefulServices() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServicesPass.php:72 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServicesPass->process() at /app/vendor/symfony/dependency-injection/Compiler/Compiler.php:73 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /app/vendor/symfony/dependency-injection/ContainerBuilder.php:814 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /app/vendor/symfony/http-kernel/Kernel.php:498 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Kernel/CoroutinesSupportingKernel.php:48 Bidpath\Kernel->initializeContainer() at /app/vendor/symfony/http-kernel/Kernel.php:743 Symfony\Component\HttpKernel\Kernel->preBoot() at /app/vendor/symfony/http-kernel/Kernel.php:120 Symfony\Component\HttpKernel\Kernel->boot() at /app/vendor/symfony/framework-bundle/Console/Application.php:177 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /app/vendor/symfony/framework-bundle/Console/Application.php:69 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:193 Symfony\Component\Console\Application->run() at /app/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /app/vendor/autoload_runtime.php:29 require_once() at /app/bin/console:15

Another similar bug exception trace

Class "Symfony\Contracts\HttpClient\HttpClientInterface" does not exist. at /app/vendor/beberlei/assert/lib/Assert/Assertion.php:2728 Assert\Assertion::createException() at /app/vendor/beberlei/assert/lib/Assert/Assertion.php:1866 Assert\Assertion::classExists() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServices/ProxifierAssertions.php:17 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\Proxifier->assertServiceIsNotReadOnly() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServices/Proxifier.php:63 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServices\Proxifier->proxifyService() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServicesPass.php:183 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServicesPass->proxifyKnownStatefulServices() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Bundle/DependencyInjection/CompilerPass/StatefulServicesPass.php:72 SwooleBundle\SwooleBundle\Bridge\Symfony\Bundle\DependencyInjection\CompilerPass\StatefulServicesPass->process() at /app/vendor/symfony/dependency-injection/Compiler/Compiler.php:73 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /app/vendor/symfony/dependency-injection/ContainerBuilder.php:814 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /app/vendor/symfony/http-kernel/Kernel.php:498 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /app/vendor/swoole-bundle/swoole-bundle/src/Bridge/Symfony/Kernel/CoroutinesSupportingKernel.php:48 Bidpath\Kernel->initializeContainer() at /app/vendor/symfony/http-kernel/Kernel.php:743 Symfony\Component\HttpKernel\Kernel->preBoot() at /app/vendor/symfony/http-kernel/Kernel.php:120 Symfony\Component\HttpKernel\Kernel->boot() at /app/vendor/symfony/framework-bundle/Console/Application.php:177 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /app/vendor/symfony/framework-bundle/Console/Application.php:69 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /app/vendor/symfony/console/Application.php:193 Symfony\Component\Console\Application->run() at /app/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /app/vendor/autoload_runtime.php:29 require_once() at /app/bin/console:15

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

No branches or pull requests

1 participant