浏览代码

Fix yii2 dependency installation

a prior commit removed the vendor directory that was erroneously added into this
repo, and this commit adds that vendor directory back using the composer
dependency management system
Hamilton Turner 10 年之前
父节点
当前提交
bfcf504b3f

+ 2 - 0
frameworks/PHP/php-yii2/.gitignore

@@ -0,0 +1,2 @@
+vendor
+deploy/php-fpm.pid

+ 1 - 1
frameworks/PHP/php-yii2/app/index.php

@@ -6,7 +6,7 @@
 //error_reporting(E_ALL);
 //error_reporting(E_ALL);
 //ini_set('display_errors','on');
 //ini_set('display_errors','on');
 
 
-require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php');
+require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
 
 
 $config = [
 $config = [
     'id' => 'basic',
     'id' => 'basic',

+ 10 - 13
frameworks/PHP/php-yii2/composer.json

@@ -1,18 +1,15 @@
 {
 {
-    "name": "yiisoft/yii2",
-    "type": "project",
-    "description": "Yii Framework 2",
-    "keywords": ["yii", "framework", "basic", "application template"],
-    "homepage": "http://www.yiiframework.com/",
-    "license": "BSD-3-Clause",
-    "authors": [
-        {
-            "name": "Natchanon Tatsaneepong",
-            "email": "[email protected]"
-        }
-    ],
+    "minimum-stability": "dev",
     "require": {
     "require": {
         "php": ">=5.4.0",
         "php": ">=5.4.0",
-        "yiisoft/yii2": "*"
+        "yiisoft/yii2": "*",
+        "bower-asset/jquery": "@stable"
+    },
+    "extra": {
+        "asset-installer-paths": {
+            "npm-asset-library": "vendor/npm",
+            "bower-asset-library": "vendor/bower"
+        }
     }
     }
 }
 }
+

+ 4 - 1
frameworks/PHP/php-yii2/install.sh

@@ -1,3 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 
 
-fw_depends php nginx
+fw_depends php nginx composer
+
+PHP_HOME=${IROOT}/php-5.5.17
+cd $TROOT && ${PHP_HOME}/bin/php $IROOT/composer.phar --no-interaction install