doctrine / DoctrineBundle

Symfony Bundle for Doctrine ORM and DBAL
https://www.doctrine-project.org/projects/doctrine-bundle.html
MIT License
4.71k stars 451 forks source link

Update to 2.12 breaks Symfony debug toolbar #1807

Closed jirikmik closed 3 months ago

jirikmik commented 4 months ago

Hello,

after update to 2.12 debug toolbar stopped work with message

An error occurred while loading the web debug toolbar. Open the web profiler.

After click it shows:

The profiler template "@Doctrine/Collector/db.html.twig" for data collector "db" does not exist.

Symfony 7.0.8 and 7.1.0.

How to solve? Thanks

dmaicher commented 4 months ago

I cannot reproduce that. Works fine for me on Symfony 7.0.8.

Can you list your doctrine/* and symfony/* composer dependencies?

And one more thing: So this fails for you? bin/console debug:twig @Doctrine/Collector/db.html.twig?

jirikmik commented 4 months ago

Yes, after upgrade to 2.12 it fails:

Matched File
------------
 Template name "@Doctrine/Collector/db.html.twig" not found

Configured Paths
----------------
 ----------- --------------------------------------------------
  Namespace   Paths
 ----------- --------------------------------------------------
  @Doctrine   vendor/doctrine/doctrine-bundle/Resources/views/
 ----------- --------------------------------------------------
jirikmik commented 4 months ago

Excuse me, list of dependencies: dependencies.txt

dmaicher commented 4 months ago

Yes, after upgrade to 2.12 it fails:

Matched File
------------
 Template name "@Doctrine/Collector/db.html.twig" not found

Configured Paths
----------------
 ----------- --------------------------------------------------
  Namespace   Paths
 ----------- --------------------------------------------------
  @Doctrine   vendor/doctrine/doctrine-bundle/Resources/views/
 ----------- --------------------------------------------------

Hm strange. It should be using the new directory structure. Here my output

Matched File
------------

 [OK] vendor/doctrine/doctrine-bundle/templates/Collector/db.html.twig                                                  

Configured Paths
----------------

 ----------- -------------------------------------------- 
  Namespace   Paths                                       
 ----------- -------------------------------------------- 
  @Doctrine   vendor/doctrine/doctrine-bundle/templates/  
 ----------- -------------------------------------------- 

@ostrolucky any idea? :thinking:

dmaicher commented 4 months ago

@jirikmik did you try to completely purge your cache? like rm -rf var/cache/*?

ostrolucky commented 4 months ago

Ah yeah, this looks like a stale cache

jirikmik commented 4 months ago

A did clean only dev cache but now I removed whole cache dir with rm -fvr command and it is does not help.

ostrolucky commented 4 months ago

I think we will need a self contained reproducer for this :/

jirikmik commented 4 months ago

Sorry, I am new here - what does it mean for me?

ostrolucky commented 4 months ago

Eg. a ZIP file or a link to repository which contains a project where we can just do composer install and run bin/console and it will show us the error you experience

jirikmik commented 3 months ago

During preparing data I have found that completely remove and than resync vendor directory solved this problem. Three projects (6.4, 7.0, 7,1) and two different webservers... I am developing in PhpStorm on Windows and also composer I am running on my pc and than synchronize changes with PhpStorms Diff. Same tool I used for new upload of vendor directory. Thanks to everybody for help.