Closed Perf closed 7 months ago
Thank you for your report!
We'll need an isolated failing demo link from: http://getrector.com/demo, that way we can reproduce the bug.
hey @TomasVotruba, thank you for quick response! I tried to use this environment, but it seems it's not suitable for my case. Nevertheless, here it is: https://getrector.com/demo/f6e93322-c48d-4f01-bfba-cb32b8b680ab
Thanks :+1:
Looks good, just the configs contained non-existing paths and extra rules. Always use only the reported rule, so we are sure it's not mix of other rules. See: https://getrector.com/demo/7e07ee71-581b-4477-a83b-5f24876c96ee
The provided config could not be converted, because there is dependency on external check:
if ($containerConfigurator->env() === 'test') {
The solution is to split this part as suggested in the exception error. To env /config/tests
and load it there without inner condition.
Hi @TomasVotruba, thanx a lot for looking into it!
So, as I understood, I need to extract part of code inside if ($containerConfigurator->env() === 'test') {
into a separate file like security_test.php
, correct?
Yes, something like that. The exact path depends on your Kernel setup.
Check symfony/demo project for standard location and Kerneloading
Bug Report
I am trying to follow the quide https://getrector.com/blog/modernize-symfony-configs to convert YAML config files to a proper PHP ones with full support for IDE autocomplete. I stuck on a step: "How can we flip those arrays to config builder classes?" I am running command
vendor/bin/rector p config/packages/security.php
But getting an error:Debug output
Expected Behaviour
security.php
config should look something like: