How do I find out which version of Doctrine I am running?

Viewed 27761

Have been using it for a while with CodeIgniter and I can't remember if I installed v2 or just copied the files from another project.

Any ideas?

7 Answers

If you have composer installed using your PATH for its executable, you may get an error that composer.phar doesn't exist.

This works for me:

% composer show --installed | grep "doctrine/orm"

You should get output showing the version number:

You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages.
doctrine/orm                             v2.5.14 Object-Relational-Mapper for PHP

Note that you don't need the | grep part; if you remove that, you'll see all installed things from composer in the project. You can instead use | grep doctrine to see all Doctrine-related installed package versions.

Related