How to know which version of Symfony I have?

前端 未结 11 1718
执念已碎
执念已碎 2020-12-07 19:35

I know that I have downloaded a Symfony2 project and started with but I have updated my vendor several times and I want to know which version of symfony I have

11条回答
  •  臣服心动
    2020-12-07 20:03

    we can find the symfony version using Kernel.php file but problem is the Location of Kernal Will changes from version to version (Better Do File Search in you Project Directory)

    in symfony 3.0 : my_project\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php

    Check from Controller/ PHP File

    $symfony_version = \Symfony\Component\HttpKernel\Kernel::VERSION;
    echo $symfony_version; // this will return version; **o/p:3.0.4-DEV**
    

提交回复
热议问题