In the past, Symfony projects were created with Composer, the dependency manager
for PHP applications. However, the current recommendation is to use the Symfony
Installer, which has to be installed before creating your first project.

Best Practice

Best Practice

Use the Symfony Installer to create new Symfony-based projects.

Read the installation chapter of the Symfony Book to
learn how to install and use the Symfony Installer.

Now that everything is correctly set up, you can create a new project based on
Symfony. In your command console, browse to a directory where you have permission
to create files and execute the following commands:

This command creates a new directory called blog that contains a fresh new
project based on the most recent stable Symfony version available. In addition,
the installer checks if your system meets the technical requirements to execute
Symfony applications. If not, you'll see the list of changes needed to meet those
requirements.

Tip

Symfony releases are digitally signed for security reasons. If you want to
verify the integrity of your Symfony installation, take a look at the
public checksums repository and follow these steps to verify the
signatures.

When Symfony 2.0 was released, most developers naturally adopted the symfony
1.x way of dividing applications into logical modules. That's why many Symfony
apps use bundles to divide their code into logical features: UserBundle,
ProductBundle, InvoiceBundle, etc.

But a bundle is meant to be something that can be reused as a stand-alone
piece of software. If UserBundle cannot be used "as is" in other Symfony
apps, then it shouldn't be its own bundle. Moreover, if InvoiceBundle depends on
ProductBundle, then there's no advantage to having two separate bundles.

Best Practice

Best Practice

Create only one bundle called AppBundle for your application logic

Implementing a single AppBundle bundle in your projects will make your code
more concise and easier to understand. Starting in Symfony 2.6, the official
Symfony documentation uses the AppBundle name.

Note

There is no need to prefix the AppBundle with your own vendor (e.g.
AcmeAppBundle), because this application bundle is never going to be
shared.