symfony/skeleton and symfony/website-skeleton – Symfony

Photo of author
Written By M Ibrahim
composer-php symfony symfony4

The Problem:

At https://symfony.com/doc/current/setup.html you are instructed to run:

composer create-project symfony/website-skeleton my-project

whereas at http://symfony.com/doc/current/quick_tour/the_big_picture.html you are instructed to run:

composer create-project symfony/skeleton quick_tour

I have just done both. Using symfony/website-skeleton I got an error message in the browser: No route found for "GET /"

With symfony/skeleton I did get a Welcome to Symfony 4.0.4 page.

What are the differences between the two and why would you use one rather than the other?

The Solutions:

Solution 1: Difference between symfony/skeleton and symfony/website-skeleton

Symfony 4 has eliminated bundles. When you execute `composer create-project symfony/skeleton`, you only download the basic package for starting an application. You must manually download and include any additional dependencies (such as twig, routing, etc.) you require.

To address the needs of beginners, the Symfony core team introduced `composer create-project symfony/website-skeleton`, which includes the essential Symfony features. For more information, refer to the Symfony blog.

Solution 2: Differences between “symfony/website-skeleton” and “symfony/skeleton”

The composer create-project command allows you to quickly create a new Symfony project from a pre-defined skeleton. There are two main skeletons available:

  • symfony/skeleton: This is a minimal skeleton that includes only the essential components needed to run a Symfony application. It is suitable for building custom applications from scratch.
  • symfony/website-skeleton: This is a more complete skeleton that includes a number of additional components that are commonly used in web applications, such as a database, a templating engine, and a security system. It is suitable for building web applications quickly and easily.

The main difference between the two skeletons is the number of components that are included. symfony/skeleton is a minimal skeleton that includes only the essential components needed to run a Symfony application. symfony/website-skeleton is a more complete skeleton that includes a number of additional components that are commonly used in web applications.

Which skeleton you should use depends on your specific needs. If you are building a custom application from scratch, then symfony/skeleton is a good choice. If you are building a web application quickly and easily, then symfony/website-skeleton is a good choice.