Can it be, there is a gap between thee out of the box delivered Fymfony framework inside “vendor” and the corresponding composer.json file. If I wathc the composer.lock file, I can’t find the corresponding upgrade for Symfony 5.4.. However, this given Symfony framework is version 5.4., yet it is restricted to 5…2* inside composer.json!
If you use composer update “yes | composer update”, you can see all those downgrades of the installed Symfony version. Using potential composer.json extensions I would rate this as a critical bug, since it could destroy your whole application, if you trust the SuiteCRM 8.5.0 out of the box bundle
If you try to modify the module routing and add an overwrite to module_routing.php, Symfony will run into a critical error due to data type conflicts. So far I edited the composer.json and fixed first type errors within core/backend.
Please let me know, in case my finding makes no sense at all =)
Well that background story sounds somehow suitable…I did run composer update. If you do so, you should see those downgrading messages by the given vendor folder. Actually I face that issue by using the extension section for module-routing throwing data-type error for function param “ContainerBuilder”
If you install Symfony 5.2 and compare the relevant files, where the error is casted, you will see the difference. My screenshot illustrates left side Symfony 5.4 PHPFileLoader.php (located inside your 8.5.0 package) vs. downgraded Symfony 5.2 PHPFileLoader.php on the right side. There are also many other differences, but that specific one gave me a lot of headaches…
php bin/console cache:clear
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Symfony\Component\DependencyInjection\Loader\ProtectedPhpFileLoader::Symfony\Component\DependencyInjection\Loader\Configurator\{closure}() must be an instance of Symfony\Component\DependencyInjection\ContainerBuilder, instance of Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator given, called in /home/rsteinig/projects/xxx_crm_8_5_0/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php on line 50 and defined in /home/rsteinig/xxx/xxx_crm_8_5_0/extensions/defaultExt/config/services/module/module_routing.php:15