Symfony 4: Directory Structure Updates

Fabien Potencier
1 min readJul 3, 2017

--

Update: This article has been updated to add missing steps.

After a long discussion in the community, the directory structure has been slightly changed.

etc/ was renamed to config/, and web/ to public/. My blog posts about Symfony 4 have just been updated to reflect these changes.

If you already have a project using Symfony Flex, upgrading is as simple as:

  • Renaming etc/ to config/;
  • Renaming web/ to public/;
  • Updating your web server configuration to take into account the new public/ directory;
  • Upgrading symfony/flex to the latest version;
  • Update composer.json to replace %WEB_DIR% to %PUBLIC_DIR%;
  • Update the content of src/Kernel.php with the one from the updated recipe;
  • Done.

Originally published at fabien.potencier.org.

--

--

Fabien Potencier

founder and CEO @SensioLabs and @blackfireio, founder and project lead @Symfony