Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added path for default container in Symfony 4 #1367

Merged

Conversation

artemoliynyk
Copy link

@artemoliynyk artemoliynyk commented Sep 5, 2019

Fixes #1295
By default, Symfony 4 generate application containers based on Kernel properties.

Method Symfony\Component\HttpKernel\Kernel@initializeContainer() use Symfony\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)

@Haehnchen
Copy link
Owner

thx was thinking of a more complex way, but yes is doing the job on the Symfony standard 👍

@Haehnchen Haehnchen merged commit e239cdf into Haehnchen:master Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smarter container xml file detection
2 participants