added path for default container in Symfony 4 #1367
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1295
By default, Symfony 4 generate application containers based on Kernel properties.
Method
Symfony\Component\HttpKernel\Kernel@initializeContainer()
useSymfony\Component\HttpKernel\Kernel@getContainerClass()
to build file name for container based on following Kernel class properties:$name
– base dir for Kernel class (src)$class
– FQN for Kernel class, backslash replaced with underscore (App\Kernel > App_Kernel)$environment
– configured environment, based on APP_ENV (Dev, Test, Prod, etc.)$debug
– debug mode, adds Debug to file name, based on APP_DEBUG ("Debug" or empty string)All these variables prepended to base name "Container".
So, default container filename for DEV environment with Debug enabled will always:
src + App_Kernel +Dev + Debug + Container -> srcApp_KernelDevDebugContainer
Tested on PhpStorm 2019.2.1 with Symfony 4.3 (both on Full Stack Framework and Microservices versions)