This tutorial has a new version, check it out!

Symfony 4: Let's Launch!

Video not working?

It looks like your browser may not support the H264 codec. If you're using Linux, try a different browser or try installing the gstreamer0.10-ffmpeg gstreamer0.10-plugins-good packages.

Thanks! This saves us from needing to use Flash or encode videos in multiple formats. And that let's us get back to making more videos :). But as always, please feel free to message us.

Hey guys! Yes! It's Symfony 4 time! I am so excited. Why? Because nothing makes me happier than sitting down to work inside a framework where coding is actually fun, and where I can build features fast, but without sacrificing quality. Well, maybe I'd be even happier doing all of that on a beach... with, maybe a cold drink?

Anyways, Symfony 4 completely re-imagined the developer experience: you're going to create better features, faster than ever. And, Symfony has a new, unique super-power: it starts as a microframework, then automatically scales in size as your project grows. How? Stay tuned...

Oh, and did I mention that Symfony 4 is the fastest version ever? And the fastest PHP framework? Honestly, all frameworks are fast enough anyways, but the point is this: you're building on a seriously awesome foundation.


See for the third-party benchmark stats!

Prep: Download & Update Composer

Ok, let's get started already! Open a new terminal and move into whatever directory you want. Make sure that you already have Composer installed globally so that you can just say composer. If you have any questions, ask us in the comments!

And also make sure you have the latest version:

composer self-update

That's important: Composer had a recent bug fix to help Symfony.

Install Symfony!

To download your new Symfony project, run composer create-project symfony/skeleton and put this into a new directory called the_spacebar.

composer create-project symfony/skeleton the_spacebar '4.4.*'

That's the name of our project! "The Spacebar" will be the place for people from across the galaxy to communicate, share news and argue about celebrities and BitCoin. It's going to be amazing!

This command clones the symfony/skeleton project and then runs composer install to download its dependencies.

Further down, there's something special: something about "recipes". OooOOO. Recipes are a new and very important concept. We'll talk about them in a few minutes.

Starting the Web Server

And at the bottom, cool! Symfony gives us clear instructions about what to do next. Move into the new directory:

cd the_spacebar

Apparently, we can run our app immediately by executing:

php -S -t public

This starts the built-in PHP web server, which is great for development. public/ is the document root of the project - but more on that soon!


If you want to use Nginx or Apache for local development, you can! See

Time to blast off! Move to your browser and go to http://localhost:8000. Say hello to your new Symfony app!

Our Tiny Project


Symfony no longer creates a Git repository automatically for you. But, no problem! Just type git init once to initialize your repository.

Back in the terminal, I'll create a new terminal tab. Symfony already inititalized a new git repository for us and gave us a perfect .gitignore file. Thanks Symfony!


If you're using PhpStorm, you'll want to ignore the .idea directory from git. I already have it ignored in my global .gitignore file:

That means we can create our first commit just by saying:

git init
git add .
git commit

Create a calm and well-thought-out commit message.


Woh! Check this out: the entire project - including Composer and .gitignore stuff - is only 16 files! Our app is teenie-tiny!

Let's learn more about our project next and setup our editor to make Symfony development amazing!

Leave a comment!

  • 2020-06-15 Diego Aguiar

    Hey Travel RN Hub

    That happens when you haven't initialized GIT in your project. Just run git init and follow the steps :)


  • 2020-06-15 Travel RN Hub

    how come when I run $ git status, i get this message "fatal: not a git repository (or any of the parent directories): .git"
    thank you

  • 2020-02-11 Diego Aguiar

    Hey Irene

    Which distribution of Symfony did you install? It seems to me that you installed the "skeleton" distribution. If what you want is a website application, you should start with the "website-skeleton" distribution, the only difference between distributions is that one comes with more packages than the other one. Check it by yourself:
    - Skeleton:
    - Website-skeleton:

    Anyway, if you want the Profiler component, you will have to install it by running composer require profiler

    I hope it helps. Cheers!

  • 2020-02-11 Irene

    I have PhpStorm 2019.3 and Symfony 5. I use build-in server ( and Symfony Support plugin is not working correct - Symfony Profiler is empty, and no templates exist for creating Controller (but exist for Services/Yaml|XML).
    How can I fix templates and profiler?

  • 2019-12-10 Dung Le

    Thank you for your support.

  • 2019-12-10 Victor Bocharsky

    Hey Dung!

    Ah, I see... OK, glad you figured out the problem yourself, good job! Yeah, by default that dump() works only in dev env.


  • 2019-12-10 Victor Bocharsky

    Hey Dung,

    Thank you for sharing this tip with others! Well, I'm not confident with this command, I mostly do things like "chown", but if it works for you - great! I'm far from Linux expert :) And yeah, permissions might be tricky sometimes :/


  • 2019-12-10 Victor Bocharsky

    Hey Dung,

    Please, keep in mind that you may have 2 php.ini: for CLI and for PHP-FPM. So, where to do changes - depends on what you're using. Also, you need to restart PHP-FPM and re-start the local web server to apply changes. Do you hit this error when executing "bin/console cache:clear"? If so, it's weird... but you can try to clear the cache manually, in your terminal just do "rm -rf var/cache/dev" or any other environment for what you want to clear the cache.


  • 2019-12-09 Dung Le

    Sorry and please ignore all of my comments above, i was so confused by many things. The actual issue with this is because I left a dump statement in twig template hence it will load with error 500 in PROD environment! This took me down to rabbit hole. All is fixed now.

    {{ dump() }}

    Thank you for your time!

  • 2019-12-09 Dung Le

    Ok, the Error message is kinda misleading, this article helped me figure it out that permission for apache to write to var/log/prod.log dir was not there. Not sure why but I already gave group www-data rwx permission. So i ran command

    setfacl -R -m u:www-data:rwx log/

    that fixed the issue, now all is working.

    Thanks again Victor Bocharsky for pointing me.

  • 2019-12-09 Dung Le

    Interesting I ran into

    PHP Fatal error: Out of memory (allocated 834666496) in /var/www/ on line 107

    in log /var/log/apache2/error.log

    To give the max I set in php.ini

    memory_limit = -1

    I still get the same error. I will keep digging. Please let me know if you have any advice.

    Thanks Victor!

  • 2019-12-09 Victor Bocharsky

    Hey Anshen,

    Ha, nice! Thank you checking it! Then, if double quotes works for you - I'll tweak the command to use package name in double quotes, it should prevent failures for more people :)


  • 2019-12-09 Victor Bocharsky

    Hey Dung,

    Make sure you clear the cache before access the page in browser. In prod environment files are not re-compiled automatically. So, try to run:
    $ bin/console cache:clear --env=prod

    first and then refresh the page. Does it help? If not - check "var/log/prod.log" file for more context about the error :)


  • 2019-12-08 Dung Le


    I am not sure why but for this Symfony 4 course if I set .env file to production such as


    - it will stop working and displayed error below, can you please tell me why? Thank you!

    Oops! An Error Occurred
    The server returned a "500 Internal Server Error".
    Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

    I would like to be able set it to production mode, because I have coded in with my custom codes.

    Best regards,

  • 2019-12-06 Anshen

    Hey Victor,

    it's works :

    $ composer create-project "symfony/skeleton:^4" the_spacebar

    My composer version it's 1.9.1



  • 2019-12-06 Victor Bocharsky

    Hey Anshen,

    Thank you for your reply! Hm, that's weird... it just should work. What if you wrap package name with version constraint in double quotes instead? Like:
    $ composer create-project "symfony/skeleton:^4" the_spacebar

    Does it help? Or probably it might also depend on your Composer version. What exactly version do you have?


  • 2019-12-06 Victor Bocharsky

    Hey Anshen,

    Thanks for pointing to this issue! Yeah, anyway, your version of this command is correct according to the docs.


  • 2019-12-06 Anshen


    This command works for me :

    λ composer create-project symfony/skeleton the_spacebar 4.4.*

  • 2019-12-06 Anshen

    Hey Victor,
    I'm sorry to answer that now. The classes are so exciting ... I am very happy to finally learn while keeping the smile inside.

    As OS, I use Windows 7 Professional and, as terminal I use Cmder.

    I just tested, this command, it does not work for me :
    $ composer create-project 'symfony/skeleton:^4' the_spacebar

    Thank you for your reply


  • 2019-12-04 Diego Aguiar

    Yeah, Symfony5 is just too new still. Symfony 4.3 should work too. Cheers!

  • 2019-12-04 Victor Bocharsky

    Hey Anshen,

    Ah, probably "^" symbol is a special for your terminal. I wonder what OS do you use? Because yours command does not work for my terminal, and I'm on Mac. I suppoose if you wrap the package name and its version with quotes - it shoudl fix the problem. Please, could you confirm that this command also work for you?

    $ composer create-project 'symfony/skeleton:^4' the_spacebar

    I think we should fix this command in script. Thanks for reporting it!


  • 2019-12-04 Anshen

    Hi @ Diego

    Actually, I cannot do the lessons with symfony 5.
    I installed symfony 4.0 but I could not do the course.
    thanks, I installed symfony 4.4 and it's ok for me.


  • 2019-12-04 Anshen

    I found the solution.
    the command below doesn't work:
    composer create-project symfony/skeleton:^4 the_spacebar

    I use this one :
    composer create-project symfony/skeleton the_spacebar 4.0.*

    Symfony4 will be installed and not symfony 5

  • 2019-12-03 Diego Aguiar

    Hey @Anshen

    Sadly, you cannot follow this tutorials by using Symfony5, it's still pretty new and the real problem are the dependencies, many of them haven't added support for Sf5.

    If you are using Symfony CLI you can pass the option --version=4.4 to install version 4.4 or pass any other version you want to use


  • 2019-12-03 Anshen

    I follow the course but I can' t install symfony 4 . It's Symfony 5 that it installed.
    Can I follow all courses with symfony 5 ?
    What I have to do to force composer to install symfony 4 ?
    ^4 to install symfony 4 generate an error.

    Thanks you four tour answer.

  • 2019-10-28 Victor Bocharsky

    Hey Sherwin,

    Sure, for a real web server you need some more configuration to spin up the website. Symfony has exmple configuration for both most popular web servers: Apache and Nginx, see this doc about it:

    I don't know what exactly web server you have, but here's a little hint for you in case you're using Apache: Install this that will execute its recipe and copy/paste the .htaccess file into your public directory:


  • 2019-10-24 Victor Bocharsky

    Hey Yusuf,

    We're sorry about it! But unfortunately nothing much we can do to unblock Vimeo in your country. I can only suggest to try some VPN servers that may bypass the blocking.

    Otherwise, we do want to make our coruses accessible to everyone, that's why we have scripts below each video with exactly what we're saying in the video. Also, those scripts include dynamic expandable code blocks of the exactly what we're coding in the videos. So you can still continue reading and coding with us.

    I hope this helps!


  • 2019-10-24 Victor Bocharsky

    Hey Yusuf,

    We're sorry about it! Yes, we do use Vimeo for hosting our videos, but unfortunately nothing much we can do here to make it non-blocked for your country. Probably some VPN could help you to get access to it.


  • 2019-10-24 Yusuf Ibr.

    For those from Indonesia cannot play all videos from this site since is totally blocked by Indonesia Goverment :(

  • 2019-10-24 Yusuf Ibr. is blocked by Indonesian goverment T_T

  • 2019-10-24 Yusuf Ibr. is unaccesible from my ubuntu laptops

  • 2019-10-24 Yusuf Ibr.

    Hi I am on the different laptop and account and the result is still the same error with following message "This is a modal window.The media could not be loaded, either because the server or network failed or because the format is not supported."

  • 2019-10-23 Diego Aguiar

    Hey Moh Yusuf

    That's odd but it's possible that Vimeo had an outage. Could you give it another try?


  • 2019-10-23 Moh Yusuf

    cannot play the video, tried to download but unsuccessful "Firefox can’t establish a connection to the server at" I have good internet connection

  • 2019-10-21 Sherwin Gaddis

    Seems like I always have to do things the hard way. I followed the tutorial and on my dev server that already has a running web server. I ran the composer create-project symfony/skeleton the_spacebar. When I went to I got a shock that it just listed the files in the directory. A huge red flag. Something is wrong. So, I opened the .env file instinctively. PHPStorm placed the red squiggly line under the file so I know more stuff is wrong.
    I tried to find how to setup symfony on an existing web server. Found way to much stuff that don't answer my question about the .env file config. I did run the suggested Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
    Still see directory list. I changed all the # to /. Still no joy and added TRUSTED_HOSTS='^localhost|my.url\.com$'.
    How do I fix this to run properly?

  • 2019-08-12 Victor Bocharsky

    Hey T. Wagner,

    Could you clarify what exactly is incorrect on your opinion? This message comes from Symfony, and it depends on the version of Symfony. If you upgrade the project dependencies - the message might be a slightly different.


  • 2019-08-12 T. Wagner

    Video 1 post project build is incorrect (obsolete)
    After the initial project build... The screen shows

    What's next?

    * Run your application:
    1. Go to the project directory
    2. Create your code repository with the git init command
    3. Download the Symfony CLI at to install a development web server

    * Read the documentation at

  • 2019-03-07 Victor Bocharsky

    Hey there!

    Ah, that's OK. Well, if you see the default " Welcome to Symfony" page - that's OK. It means it's the default temporary page from Symfony to get you started, but in your project there's no any route that handles "/" URL. So, when you create a route for "/" - Symfony will automatically renders *your* page instead of this default one. So, just go further in this tutorial and create a new controller for your custom homepage ;)


  • 2019-03-07 盛佳

    i have a problem when i create a empty project, when i come to the welcome page,it's ok,the web show me,but the log tell me there is a error
    "Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /" (from "")" at /my-project/vendor/symfony/http-kernel/EventListener/RouterListener.php line 139"
    i try lots of ways to solve it,but still error,i am new in symfony,could u help me?
    thank you so much

  • 2019-02-19 Victor Bocharsky

    Hey Hugo,

    In the video Ryan uses iTerm2 on his Mac. I suppose you're on Windows, so, you can take a look at Git Bash, or probably a popular .


  • 2019-02-19 Hugo Peña

    Can you tell me, which terminal are you using? I started using xampp shell, but for instance, can stop the server with ctrl c, and I had to close some windows and open new ones. I would like to use, the one you are using.


  • 2019-02-08 Ricardo Rodriguez

    Awesome! Thank you so much, worked like a charm.

  • 2019-02-07 Victor Bocharsky

    Hey Ricardo,

    Just replied to you in Twitter: . Installing curl PHP extension should fix the problem.


  • 2019-02-07 Ricardo Rodriguez

    Hello and thank you for this great material but I am getting an error that says:

    your requirements could not be resolved to an installable set of packages

    Problem is related to facebook/webdriver 1.6.0

    I wish I could upload image showing the error here, will try to do so by pasting from this URL: href="https://content.screencast....

    I am running PHP 7.3 and composer 1.8.3

    <img class="embeddedObject" src="" width="979" height="512" border="0"/>

  • 2018-12-17 Victor Bocharsky

    Hey Suleman,

    To upgrade Symfony with its dependencies - first of all you need to change version constraint for symfony/symfony in composer.json and then run "composer update". And you also need to look inside UPGRADE manuals that you can find in symfony repo: - for example, here's what you need to do to upgrade from Symfony 4.1 to 4.2: . Btw, we have a few tutorials where we show how to upgrade Symfony properly, you can take a look at:

    P.S. Also, keep in mind that new Symfony 4 requires PHP 7.1.3, if you have a lower version of your PHP - you won't be able to upgrade, upgrade your PHP first.


  • 2018-12-15 suleman khan

    thankyou sir

  • 2018-12-15 suleman khan

    how to update symfony its showing old version in my browser

    Welcome to Symfony 3.4.20

  • 2018-12-12 Victor Bocharsky

    Glad you got it working, great job!


  • 2018-12-12 Dennis

    Hi Victor,

    Thanks for your quick reply.

    I figured it out it had something to do with my PHP version, because when I wanted to upgrade to symfony 4, there was a warning. So I downloaded the correct PHP version, changed my environment variables in Windows and it worked.


    Best regards,

  • 2018-12-12 Victor Bocharsky

    Hey Dennis,

    It depends on your PHP version, Symfony 4 requires PHP ^7.1.3. If you have a lower version of PHP, Composer will resolve dependencies and install Symfony 3.4.

    You can check your PHP version with this command:
    $ php --version


  • 2018-12-12 Dennis

    Hey Ryan,

    When I run the command "composer create-project symfony/skeleton name_of_project" it installs version 3.4.20.
    How is this possible and how can I upgrade to symfony 4?

    Best regards,

    P.S. I did run composer self-update before installing the project.

  • 2018-10-12 Victor Bocharsky

    Hey Pawel,

    Both work great, because those libs are frontend part, but Symfony is a backend. With Webpack Encore you can organize both libs pretty well in your Symfony project. Though, it depends what's the best for you. It depends on the project and the tasks you need to implement.

    P.S. We don't have a screencasts about VueJS yet, but we do have ReactJS one, so you can look at it and see if it completely fits your needs:


  • 2018-10-12 Paweł Chry

    Hi guys, please help me choose js library for my team. It's about ReactJS or Vue. With one work better with Twig and Symfony?

  • 2018-10-02 Guilherme Billig

    Thank you

  • 2018-10-02 Victor Bocharsky

    Hey Guilherme,

    Ah, you probably have old version of PHP. Symfony 4 requires PHP 7.1.3 at least, see . What version of PHP do you use? You can check it with:
    $ php --version


  • 2018-10-02 Guilherme Billig

    Hi, why i get Symfony 3.4.16 when i start this project? (I am really new at this) Can I attend classes without having problems with version?

  • 2018-09-25 El Tebe


    And don't forget: Maybe your paths and links should not work if your windows username (personal folder path) contains extra characters, like UTF8 éáűőúöüóß, whitespace, etc... then U must use a lot of " and/or ' and escape characters.

  • 2018-09-25 Adiel Cristo


    Also, avoid creating things on C:\Windows, as it is one of the main system folders, and you could screw up the system. That's why you need admin permissions to make changes there.

    It's better to create the project on a personal folder where you already have the permissions.


  • 2018-09-24 Diego Aguiar

    Hey Maxim Mandrik

    I believe Ryan just ignored "src/Controller/.gitignore" ;)


  • 2018-09-24 Maxim Mandrik

    I checked in the project 17 files, not 16.

    $ git status
    new file: .env.dist
    new file: .gitignore
    new file: bin/console
    new file: composer.json
    new file: composer.lock
    new file: config/bundles.php
    new file: config/packages/dev/routing.yaml
    new file: config/packages/framework.yaml
    new file: config/packages/routing.yaml
    new file: config/packages/test/framework.yaml
    new file: config/packages/test/routing.yaml
    new file: config/routes.yaml
    new file: config/services.yaml
    new file: public/index.php
    new file: src/Controller/.gitignore
    new file: src/Kernel.php
    new file: symfony.lock

  • 2018-09-04 weaverryan

    Good tip El Tebe! Thanks for sharing :)

  • 2018-09-04 El Tebe

    If U get somthing like this: "Warning: unlink(XXXXXXX/var/cache/dev/ContainerHz2YWDR.legacy): No such file or directory"
    just set this directive to zero: xdebug.scream = 0 (in your php.ini)
    See this:

  • 2018-09-03 Victor Bocharsky

    Hey Raman,

    Ah, really, good catch! The "-t" option is missing :)

    And thank you for pointing about it in such an old thread!


  • 2018-09-01 Raman Paul

    Old thread but for new users stumble across this , it should be
    `$ php -S -t public`

    Switch `-t` is missing in above comment.

  • 2018-08-09 weaverryan

    Hey Irfan!

    Hmm, can you try it again? It works fine for me now - we use Vimeo as our backend, and my guess is that they had some sort of temporary issue. Annoying - sorry about that :/. If it's still not working, definitely let me know!


  • 2018-08-08 Irfan

    I got this " The media could not be loaded, either because the server or network failed or because the format is not supported.
    " on playing video. I am using windows 10 with chrome. Other videos work perfectly fine

  • 2018-08-06 Victor Bocharsky

    Hey Priya,

    Thank you for kind words! About your question - well, it depends on your OS. Looks like you're on Windows OS, and this OS is well-known as OS with a pretty bad command line, that is slightly different from command line used in Linux/Unix systems. I'm not on Windows, but I heard a lot of good feedbacks about Cmder - a console for Windows OS, see . I think it will fix your problem.


  • 2018-08-05 Priya Rajarajan

    First of all a very big thanks for this wonderful tutorial.I'm here because for creating a dealer management system for my client.When I started researching ,I came to know about symfony .But didn't know where to start with.But luckily,I reached your website.Everything worked fine for me.But I have 1question
    1.As the other member had asked it was going fine till ,I initated the git in my command prompt,it showed unrecognized keyword.But when I,installed Git,it opened in a MINGW64 editor.Then I changed to my project location and executed the rest of the steps in the MINGW64 editor which went perfectly well.Still a small confusion even though the repository is in the same project location,why it is not still recognizing in command prompt?.May be a silly question,but as a novice I want to be clear if I travelling in the right path

  • 2018-07-10 Diego Aguiar

    Hey Siwar Bondka

    Look's like you do not have the right permissions for writing on your project's folder. I'm not sure how to properly adjust them in Windows, but I just found this guide.
    I hope it helps


  • 2018-07-10 Siwar Bondka

    This is what i ve got while Creating my new project:


    C:\Windows>composer create-project symfony/skeleton my-project
    Installing symfony/skeleton (v4.1.0)

    mkdir(): Permission denied

    create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]


    Help please

  • 2018-06-20 weaverryan

    Hey Daniel Rolfs!

    Ah, sorry about that! I know the problem! Recently, Symfony removed this feature where you have a Git repository automatically created for you. We'll update the video with a note. Now, you just need to type

    git init

    first to initialize the git repository.


  • 2018-06-20 Daniel Rolfs

    Hi! everything worked fine, until i opend the new terminal tab and entered git status:

    fatal: Not a git repository (or any of the parent directories): .git

    what can i do?

  • 2018-04-16 Victor Bocharsky

    Hey Rafael,

    It works pretty straightforward, if HTML response contains closing body tag - the web debug toolbar adding some HTML/JS content before this closing body tag and that's why you see that toolbar. So, if your response does not contain closing body tag - you won't see it. Or... it just does not enable in configuration for your current environment :)


  • 2018-04-14 Rafael Ferreira

    Hi Guys!

    Could you tell me, why the debug toolbar is not showing?

  • 2018-04-13 Victor Bocharsky

    Hey Petru,

    Nope, Symfony just initialize an empty repo for you, and then you can do with it whatever you want, for example, commit changes and push to GitHub, etc.


  • 2018-04-13 Victor Bocharsky

    Hey Petru,

    Yeah, nice course to quickly join the topic and start with Git ;)


  • 2018-04-12 Petru Lebada

    Pff... spoke too soon.I just read the git interactive course and it enlightened me.Thanks

  • 2018-04-12 Petru Lebada

    I'm also new to git and i was wondering if and how i can see the files i've commited on the repository.And what is the default repository that come with symfony? Can it be seen on github or?

  • 2018-04-09 Vlad

    This is wicked!

  • 2018-03-27 Victor Bocharsky

    Hey Barrosy,

    Thanks for sharing those links for our Windows users. Answering your question: yes, you have to install Git as well. Git is a free and open source distributed version control system. In other words, Git allow you to store snapshots of your changes you made in your project (it's called commits). So Git allow you to safely work in a team and preventing from overwriting each other unintentionally. Also it's useful even if your working on the project alone. There's a lot to say about Git, better to read their docs: . You can also try to complete their free interactive course here: . To install Git - go to their website and find the latest version for your OS: .

    In our Symfony-related screencasts we assume that users have some developer background, at least they know PHP / Composer / Git / PhpStorm and have it installed locally, because these things are really basic and it's difficult to move forward without it. If you have weak knowledges of PHP or Composer, we have specific courses about it, so you can check them out first:

    Unfortunately, we don't have a course about Git, but like PhpStorm it's not required for Symfony courses but strongly recommended by us. And you can easily find information about it on the internet, Git is not complex at all and you need to know a very little to start using it.

    I hope it helps you and other devs.


  • 2018-03-24 Barrosy


    I have a couple of questions to you good sir, as I am a complete novice to Symfony.
    First of all to those who are just like me, new to symfony, you want to make sure to install PHP beforehand as (a program required to install Symfony called) Composer requires you to have PHP installed. If you are a Windows user like me, then the following page (as of today, any url refered to in this post might change in the future), you should be able to install PHP from here:
    You can install it on the root of any of your disks available to you or you could make a folder called "programming" on any of your disks and save it there (for example: D:\programming\PHP\).

    Then you can install composer from here (as of today aswell):

    Okay so here is my question: From 3 minutes and 15 seconds onward, you start talking about Git, but for someone like me who's entirely new to Symfony, what is Git actually? If I run the same command, my prompt will say that the command is not recognized, so I'd assume I would have to install that aswell? Anyways, I will try and figure, but I can imagine other people might encounter to have some trouble getting through here.

  • 2018-03-19 weaverryan

    Hey John!

    Oh man, lame! Let's see if we can get this working for you :). Here's the key error that looks weird to me:

    > PHP Fatal error: Unknown: Failed opening required 'public'

    This tells me that, somehow, after you move into your /var/www/tests/php/symfony/sf4/the_spacebar directory, there is NOT a public/ directory inside! That's definitely a mystery, but it gives us a place to start. So, if you look at your /var/www/tests/php/symfony/sf4/the_spacebar directory, what do you see inside? Is there a public directory?


  • 2018-03-19 Victor Bocharsky

    Hey milosh96 ,

    Well, it depends, if you're going to work with a project which is on Symfony 3 - I'd recommend to start with Symfony 3 track then. But if you're going to start a new project from scratch - it's definitely better to start with Symfony 4. But since Symfony 4 is pretty new - we don't have a lot of screencasts about it, so probably after watching all our courses about Symfony 4 you can continue watching ones from Symfony 3 track, but of course, do them in Symfony 4 way because you'll know a lot about it after finishing Symfony 4 track.


  • 2018-03-19 Victor Bocharsky

    Good point, thanks Alessandro Lai !

    Symfony really requires PHP 7.1.3 or higher. Check your PHP version with:

    php --version

    And upgrade it to the minimum required version if you want to use the latest Symfony 4.


  • 2018-03-17 John

    Hi there,

    I have this issue :

    $ cd /var/www/tests/php/symfony/sf4/the_spacebar
    $ php -S public
    PHP Development Server started at Sat Mar 17 23:13:26 2018
    Listening on
    Document root is /var/www/tests/php/symfony/sf4/the_spacebar
    Press Ctrl-C to quit.
    [Sat Mar 17 23:13:37 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
    [Sat Mar 17 23:13:37 2018] PHP Fatal error: Unknown: Failed opening required 'public' (include_path='.:/usr/share/php') in Unknown on line 0

    I got this error running my browser to the url (it's a blank page).
    I check the permissions, the directories in vendor/, everything seems good, but... not enough to work. Why did the video run the server so easily, and not me ?

  • 2018-03-17 milosh96

    I have a good knowledge of Laravel 5>, and I want to learn (switch to) Symfony. I followed "Getting Started" guide for Symfony 4, but I'm wondering, is it better for a newbie (like me), to learn Symfony 3 first, and then switch to Symfony 4 later. What's your opinion? Thanks.

  • 2018-03-16 Alessandro Lai

    Symfony 4 requires PHP 7.1 or newer. Do you have it?

  • 2018-03-16 Diego Aguiar

    Hey @Arkadiusz

    I'm not sure why is that happening (I just tried it my self and it installed version 4.0.5). I believe you have to clear your composer's cache

    $ composer clearcache

    Give it a try and let me know if that worked


  • 2018-03-16 Arkadiusz

    Why composer version
    composer --version
    Composer version 1.6.3 2018-01-31 16:28:17
    after use:
    composer create-project symfony/skeleton the_spacebar
    Installing symfony/skeleton (v3.4.5)

    Is downloading and instaling symfony version 3.4.5? I want minimum 4.0.4.

  • 2018-03-16 weaverryan

    No problem - I'm happy the mystery is solved :). I also noticed in the next patch version of Symfony, the welcome page will ALWAYS show if you don't have a homepage, even if you have other routes. So, it should fix this weird user-experience quirk.


  • 2018-03-15 Victor Bocharsky

    Hey Tess,

    Glad you found the problem!


  • 2018-03-15 Tess Hsu

    hi Victor,
    no worries, sorry it was my falut, I was forget to run the server:
    php -S -t public
    it's been work perfectly, your tutorial is really awesome

  • 2018-03-15 Kavitha

    @weaverryan Thx.

  • 2018-03-15 Amy

    Thank you. I'll confess that I had done the getting started bit from the symfony page, and then used my up arrow and simply changed the project name to start the_spacebar. I didn't notice the difference in the commands. I apologize for doubting you.

  • 2018-03-14 weaverryan

    Hi Kavitha!

    Good job finding that GitHub pull request! So, here is some information about what's happening:

    1) Due to some recent changes in Symfony, it appears that *sometimes* the pretty welcome page doesn't display. The pull request you linked to will fix this. But, it has not been included in a release yet. At some point over the next few weeks, it will be included in a new Symfony release, and this issue should go away.

    2) BUT, it's ok! The pretty welcome page was just meant to be a friendly first thing to see. But if you see "No route found GET /" instead of the welcome page, that's ok - your app is working perfectly fine and you can continue like normal. You'll learn about routes over the next few chapters how you can define routes in order to build pages.

    If you have any other doubts or questions, let us know!


  • 2018-03-14 Kavitha

    I am getting No route found GET / for my Symfony 4 Welcome page. Updated UrlMatcher.php, PhpMatcherDumperTest.php.
    Based on Gitlab Issue
    Still I am having same error. Could anyone throw some light.

  • 2018-03-12 weaverryan

    Hi Amy!

    That *is* disheartening! You should be having success early on in the tutorial :).

    So let me explain, and help debug! First, I *did* just try the steps in the tutorial and I DO still get the welcome page. So, there's a bit of a mystery there. Make sure you're running this command exactly:

    composer create-project symfony/skeleton the_spacebar

    If you follow the "Getting Started" docs, it's actually a *slightly* different command - it uses symfony/website-skeleton. The difference is that symfony/website-skeleton comes with more features. And *indeed*, if you use it, you will see the "No route found" error instead of the pretty welcome page? Why? Well, the pretty welcome page is shown when your have a new site with *zero* routes. When you use symfony/skeleton, this gives us a "tiny" Symfony project with zero routes (hence why you should see the welcome page). When you use the symfony/website-skeleton, it's basically the "symfony/skeleton" + more features... including some debugging routes (you can see them by running php bin/console debug:router at the command line). Thanks to these routes, Symfony does *not* show the welcome page anymore. It's a bit of an unfortunate, confusing thing. That welcome page is meant to be friendly and helpful, but it disappears as *soon* as the first route is added to the system (whether you added that route or whether it was added by some vendor package).

    I hope this helps explain! I'm still not sure why you don't see the welcome page by following this tutorial, but it's actually not a problem and you can continue on :).


  • 2018-03-12 Victor Bocharsky

    Hey Tess,

    Well, I'm sure it's not related to the git operations you did. Are you in the prod or dev environment? Because, in dev environment you should see a big Symfony error if something went wrong. If you don't see this Symfony error - you probably can't reach the website at all. Can you try to restart your built-in PHP web server? To stop it, press "Ctrl + C" and then run it again with "bin/console server:run". Does it fix the problem? If you still have this error, try to watch logs when hitting website: execute "tail -f var/log/dev.log" (or prod.log if you're in prod env) and reload the page. Do you see any new logs in the output?


  • 2018-03-12 Tess Hsu

    HI victor,
    this is amazing, somehow in the final I had problem too, as type $ git add .
    $ git commit
    in terminal, i try to add the first commit message
    then nothing happend instead the url:
    show the site is not reachable, before git commit it was worked

    could you help me in this point?

  • 2018-03-10 Amy

    I'm hitting what seems to be a known issue - out of the box, I'm getting No route found for "GET /" rather than the welcome page. It's disheartening that following both your tutorial and the basic instructions on the getting started page hit this issue.