Browse Source

Download Cake 2.4.5 using Composer

NOTE: This is an upgrade from 2.3.0

Also removed bash_profile
Hamilton Turner 10 years ago
parent
commit
0410d947e8

+ 2 - 0
frameworks/PHP/cakephp/.gitignore

@@ -6,3 +6,5 @@
 /dist
 .DS_Store
 /tags
+app/Vendor
+deploy/php-fpm.pid

+ 1 - 1
frameworks/PHP/cakephp/app/webroot/index.php

@@ -77,7 +77,7 @@ if (php_sapi_name() == 'cli-server') {
 
 if (!defined('CAKE_CORE_INCLUDE_PATH')) {
 	if (function_exists('ini_set')) {
-		ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
+		ini_set('include_path', ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
 	}
 	if (!include ('Cake' . DS . 'bootstrap.php')) {
 		$failed = true;

+ 0 - 7
frameworks/PHP/cakephp/bash_profile.sh

@@ -1,7 +0,0 @@
-#!/bin/bash
-
-export PHP_HOME=${IROOT}/php-5.5.17
-
-export PHP_FPM=$PHP_HOME/sbin/php-fpm
-
-export NGINX_HOME=${IROOT}/nginx

+ 10 - 0
frameworks/PHP/cakephp/composer.json

@@ -0,0 +1,10 @@
+{
+    "require": {
+        "cakephp/cakephp": "2.4.5"
+    },
+    "config": {
+        "vendor-dir": "app/Vendor"
+    }
+
+}
+

+ 61 - 0
frameworks/PHP/cakephp/composer.lock

@@ -0,0 +1,61 @@
+{
+    "_readme": [
+        "This file locks the dependencies of your project to a known state",
+        "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "This file is @generated automatically"
+    ],
+    "hash": "d8d915f76f4a162b8de44aa9ba14c0dc",
+    "packages": [
+        {
+            "name": "cakephp/cakephp",
+            "version": "2.4.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/cakephp/cakephp.git",
+                "reference": "9b4c2f3c86db84e55e8a5f7a8f1325ed7c4715ad"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/cakephp/cakephp/zipball/9b4c2f3c86db84e55e8a5f7a8f1325ed7c4715ad",
+                "reference": "9b4c2f3c86db84e55e8a5f7a8f1325ed7c4715ad",
+                "shasum": ""
+            },
+            "require": {
+                "ext-mcrypt": "*",
+                "php": ">=5.2.8"
+            },
+            "require-dev": {
+                "cakephp/debug_kit": "2.2.*",
+                "phpunit/phpunit": "3.7.*"
+            },
+            "bin": [
+                "lib/Cake/Console/cake"
+            ],
+            "type": "library",
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "CakePHP Community",
+                    "homepage": "https://github.com/cakephp/cakephp/graphs/contributors"
+                }
+            ],
+            "description": "The CakePHP framework",
+            "homepage": "http://cakephp.org",
+            "keywords": [
+                "framework"
+            ],
+            "time": "2014-01-26 20:06:00"
+        }
+    ],
+    "packages-dev": [],
+    "aliases": [],
+    "minimum-stability": "stable",
+    "stability-flags": [],
+    "prefer-stable": false,
+    "prefer-lowest": false,
+    "platform": [],
+    "platform-dev": []
+}

+ 9 - 1
frameworks/PHP/cakephp/install.sh

@@ -1,3 +1,11 @@
 #!/bin/bash
 
-fw_depends php nginx
+export PHP_HOME=${IROOT}/php-5.5.17
+export PHP_FPM=$PHP_HOME/sbin/php-fpm
+export NGINX_HOME=${IROOT}/nginx
+
+fw_depends php nginx composer
+
+${PHP_HOME}/bin/php $IROOT/composer.phar install \
+  --no-interaction --working-dir $TROOT \
+  --no-progress --optimize-autoloader 

+ 3 - 0
frameworks/PHP/cakephp/setup.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
 
+export PHP_HOME=${IROOT}/php-5.5.17
+export PHP_FPM=$PHP_HOME/sbin/php-fpm
+export NGINX_HOME=${IROOT}/nginx
 
 $PHP_FPM --fpm-config $FWROOT/config/php-fpm.conf -g $TROOT/deploy/php-fpm.pid
 sed -i "s|'host' => '.*'|'host' => '${DBHOST}'|g" app/Config/database.php