I have a problem on my symfony project version 4.4.9, when i type php bin/console make:entity this errors it display to me
There is no extension able to load the configuration for "when@test"
composer.json
"require": {
"php": ">=7.1.3",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/annotations": "^1.13",
"doctrine/doctrine-bundle": "^2.5",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.11",
"symfony/console": "4.4.*",
"symfony/dotenv": "4.4.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "4.4.*",
"symfony/proxy-manager-bridge": "4.4.*",
"symfony/twig-bundle": "4.4.*",
"symfony/yaml": "4.4.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
2
Answers
problem solved : i delete this part of code from config>packages>doctrine.yaml :
when@test: doctrine: dbal: # "TEST_TOKEN" is typically set by ParaTest dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod: doctrine: orm: auto_generate_proxy_classes: false query_cache_driver: type: pool pool: doctrine.system_cache_pool result_cache_driver: type: pool pool: doctrine.result_cache_pool
The syntax when@{env} was introduced on Symfony ^5.3
You need to downgrade the doctrine-bundle to a compatible version that works with Symfony ^4.4.