Skip to content

Fatal error on cache:clear with 1.30.1 #845

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

Closed
pkly opened this issue Mar 23, 2021 · 2 comments · Fixed by #847
Closed

Fatal error on cache:clear with 1.30.1 #845

pkly opened this issue Mar 23, 2021 · 2 comments · Fixed by #847

Comments

@pkly
Copy link

pkly commented Mar 23, 2021

Hello

The added SetDoctrineAnnotatedPrefixesPass has an issue on line 41

$isAnnotated = 'doctrine.orm.'.$managerName.'_annotation_metadata_driver' === (string) $arguments[0];

Object of class Symfony\Component\DependencyInjection\Definition could not be converted to string

This happens on symfony 4.4.20, I'm assuming it applies to all versions of symfony 4.4
The __toString method doesn't exist in class Definition in 4.4 so that's the issue.

@sadikoff
Copy link
Contributor

Hey @pkly

Same I have the same error, probably you have more than one metadata driver, in my case it was Xml driver which was added by 3rd party bundle.

@RuSS-B
Copy link

RuSS-B commented Mar 23, 2021

Same issue for me

I'm using SF5.2 and ApiPlatform

!!  Error {#1306
!!    #message: "Object of class Symfony\Component\DependencyInjection\Definition could not be converted to string"
!!    #code: 0
!!    #file: "./vendor/symfony/maker-bundle/src/DependencyInjection/CompilerPass/SetDoctrineAnnotatedPrefixesPass.php"
!!    #line: 41
!!    trace: {
!!      ./vendor/symfony/maker-bundle/src/DependencyInjection/CompilerPass/SetDoctrineAnnotatedPrefixesPass.php:41 { …}
!!      ./vendor/symfony/dependency-injection/Compiler/Compiler.php:91 { …}
!!      ./vendor/symfony/dependency-injection/ContainerBuilder.php:736 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:541 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:780 { …}
!!      ./vendor/symfony/http-kernel/Kernel.php:121 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:168 { …}
!!      ./vendor/symfony/framework-bundle/Console/Application.php:74 { …}
!!      ./vendor/symfony/console/Application.php:166 { …}
!!      ./bin/console:42 {
!!        › $application = new Application($kernel);
!!        › $application->run($input);
!!        › 
!!        arguments: {
!!          $input: Symfony\Component\Console\Input\ArgvInput {#5 …}
!!        }
!!      }
!!    }
!!  }

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