Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

cakephp

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.

like image 599
Mauricio Pasquier Juan Avatar asked Jun 01 '13 17:06

Mauricio Pasquier Juan


People also ask

How to determine CakePHP version?

You can find this given file VERSION. txt into /vendor/cakephp/cakephp folder. If you open up this file then you should see the CakePHP version into it.

How can I call view from CakePHP?

cake php has default layout files in folder "app/view/Layout" .. file name default. ctp in this folder will be taken as default .. and other links defined ..you can comment the and check what changes you get in view.

What is CakePHP used for?

CakePHP is a PHP, object-oriented, Model-View-Controller framework, designed around providing the tooling to let you rapidly build web applications. CakePHP focuses on solving problems rapidly, by using conventions over configuration, to enable you to work sooner, without making a lot of decisions upfront.


1 Answers

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 
like image 196
Matt Avatar answered Sep 25 '22 09:09

Matt