doctrine / DoctrineFixturesBundle

Symfony integration for the doctrine/data-fixtures library
MIT License
2.46k stars 202 forks source link

Cache warmup of ConfigBuilder (Symfony 5.3) fails #349

Closed stephanvierkant closed 3 years ago

stephanvierkant commented 3 years ago

I've upgraded to Symfony 5.3 (beta 1) and the new CacheWarmer for ConfigBuilder (https://github.com/symfony/symfony/pull/40804) causes an issue with this bundle. Not sure if it's bug in Symfony or in this bundle.

I'm using version 3.4.0 of this bundle.

$ bin/console cache:clear

// Clearing the cache for the dev environment with debug true

In ConfigBuilderGenerator.php line 43:

Symfony\Component\Config\Builder\ConfigBuilderGenerator::build(): Argument #1 ($configuration) must be of type Symfony\Component\Config\Definition\ConfigurationInterface, null given, called in vendor/symfony/framework-bundle/CacheWarmer/ConfigBuilderCacheWarmer.php on line 81

Reproducible example: https://github.com/stephanvierkant/doctrine-fixtures-symfony53

wouterj commented 3 years ago

I think this is a bug in Symfony, as getConfiguration() is nullable. I've submitted a fix for Symfony while catching this bug in one of our applications in https://github.com/symfony/symfony/pull/40859

Nyholm commented 3 years ago

Could you try with symfony/framework-bundle: 5.x-dev, do you have the same issue there?

stephanvierkant commented 3 years ago

Yes, that works!

Nyholm commented 3 years ago

Awesome. You are a star for testing beta releases.

Thank you @wouterj for the fix.

I suggest closing this issue.