How can I tell which CakePHP version is a project made with?

Is it possible to know the version of CakePHP used to generate a project with only the app code available?


My problem:

I downloaded a project made with CakePHP, and I really can't tell which Cake version to use. The files say, e.g. @version $Revision: 8004 $, but this is different in some files. Should I assume that the highest revision (8004) is the correct one to use?

It seems to be from around 2008, so I guess it's a 1.x version.

PD: Here is the code to the project.


Solution 1:

I have found that the version, as of CakePHP 2.3.0, is held within a static file under the root Cake lib.

bash #: cat $CAKE_ROOT/lib/Cake/VERSION.txt

////////////////////////////////////////////////////////////////////////////////////////////////////
// +--------------------------------------------------------------------------------------------+ //
// CakePHP Version
//
// Holds a static string representing the current version of CakePHP
//
// CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
// Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
//
// Licensed under The MIT License
// Redistributions of files must retain the above copyright notice.
//
// @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
// @link          http://cakephp.org
// @package       cake.libs
// @since         CakePHP(tm) v 0.2.9
// @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
// +--------------------------------------------------------------------------------------------+ //
////////////////////////////////////////////////////////////////////////////////////////////////////
2.3.0

Solution 2:

Edit core.php, add to top:

echo Configure::version();