How to check Symfony version?

Member

by matilde , in category: Technology , 3 years ago

How to check Symfony version?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by leonor , 3 years ago

There are multiple options to do that:

Command Line:

1
php bin/console about

And as result you will see something like this:

1
2
3
4
5
6
7
 ---------------------- ------------------------------------------------- 
  Symfony                                                                 
 ---------------------- ------------------------------------------------- 
  Version                3.4.43                                           
  End of maintenance     11/2020 Expired                                  
  End of life            11/2021                                          
 ---------------------- ------------------------------------------------- 


Also you can use the command below

1
2
php bin/console --version // if Symfony >= 3
app/console --version // if Symfony version < 3


Code:

You can take a look into the file:

1
symfony/src/Symfony/Component/HttpKernel/Kernel.php

And you can see the constant like below:

1
const VERSION         = '3.4.43';