Symfony folder structure standard

is there anyone who can explain in detail the standard used by symfony * to specify folders and files in a directory structure?

MyBundle
├─ Controller/                 <-- 1) why singular?
├─ Model/                      <-- 2) why singular?
├─ Resources/                  <-- 3) why plural?
│  ├─ config/                  <-- 4) why the "c" is lowercase?
│  ├─ translations/
│  ├─ views/                   <-- 5) why the "v" is lowercase and views is plural?
│  │  └─ Default/              <-- 6) Why uppercase?
│  │     └─ my_view.html.twig  <-- 7) Why lowercase and snake case?
│  └─ public/
├─ Service/                    <-- 8) why singular?
└─ Tests/

This leads to another question: if I want to create a folder containing classes ArchiveSectioninside the Model folder, what should I name it?

  • Model / ArchiveSections /
  • Model / ArchiveSection /
  • Model / archive_sections /

Thanks you!

* I am using Symfony 2.3.

+4
source share
2 answers

See docs for a discussion of package directory structure.

, , Resources , . Command.

, , , symfony ( Twig twig, Serializer ...).

, .

+1

symfony . .

, , . , , .

, symfony. : Me , "", .

0

All Articles