Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 693
slugmandrew Avatar asked Sep 22 '10 16:09

slugmandrew


People also ask

What is Doctrine database?

The Doctrine Project is the home to several PHP libraries primarily focused on database storage and object mapping. The core projects are the Object Relational Mapper (ORM) and the Database Abstraction Layer (DBAL) it is built upon.

What is Doctrine Symfony?

Symfony provides all the tools you need to use databases in your applications thanks to Doctrine, the best set of PHP libraries to work with databases. These tools support relational databases like MySQL and PostgreSQL and also NoSQL databases like MongoDB.


3 Answers

Check out the file vendor/doctrine/orm/lib/Doctrine/ORM/Version.php, there is a constant in there that shows the version. It's also accessible from a running app but this is easier.

like image 62
Chuck Vose Avatar answered Sep 21 '22 17:09

Chuck Vose


If you are using the composer to handle dependencies on your project, then you should try with:

php composer.phar show --installed 

OR

php composer.phar show -i | grep doctrine 

And the output will be something like:

doctrine/annotations                     v1.1.2             Docblock Annotations Parser doctrine/cache                           v1.3.0             Caching library offering an object-oriented API for many cache backends doctrine/collections                     v1.2               Collections Abstraction library doctrine/common                          v2.4.1             Common Library for Doctrine projects doctrine/data-fixtures                   v1.0.0             Data Fixtures for all Doctrine Object Managers doctrine/dbal                            2.3.4              Database Abstraction Layer doctrine/doctrine-bundle                 v1.2.0             Symfony DoctrineBundle doctrine/doctrine-fixtures-bundle        v2.2.0             Symfony DoctrineFixturesBundle doctrine/inflector                       v1.0               Common String Manipulations with regard to casing and singular/plural rules. doctrine/lexer                           v1.0               Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. doctrine/orm                             2.3.5              Object-Relational-Mapper for PHP 
like image 28
Francesco Casula Avatar answered Sep 24 '22 17:09

Francesco Casula


Within my symfony2 and symfony3 project, the path to find the correct Version.php file, line 39, was:

Vendor/doctrine/orm/lib/Doctrine/ORM/Version.php

like image 40
Jlappano Avatar answered Sep 22 '22 17:09

Jlappano