Browse Source

Adjusted vendor dirs of example applications

- update composer json to chosse right path
- set vendorPath in application config if not default
tags/2.0.0-beta
Carsten Brandt 12 years ago
parent
commit
a6c251d2ab
  1. 1
      apps/advanced/backstage/config/main.php
  2. 1
      apps/advanced/console/config/main.php
  3. 1
      apps/advanced/frontend/config/main.php
  4. 1
      apps/benchmark/.gitignore
  5. 3
      apps/benchmark/composer.json
  6. 3
      framework/yii/base/Application.php

1
apps/advanced/backstage/config/main.php

@ -11,6 +11,7 @@ $params = array_merge(
return array( return array(
'id' => 'change-me', 'id' => 'change-me',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'preload' => array('log'), 'preload' => array('log'),
'controllerNamespace' => 'backstage\controllers', 'controllerNamespace' => 'backstage\controllers',
'modules' => array( 'modules' => array(

1
apps/advanced/console/config/main.php

@ -11,6 +11,7 @@ $params = array_merge(
return array( return array(
'id' => 'change-me', 'id' => 'change-me',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'preload' => array('log'), 'preload' => array('log'),
'controllerNamespace' => 'console\controllers', 'controllerNamespace' => 'console\controllers',
'modules' => array( 'modules' => array(

1
apps/advanced/frontend/config/main.php

@ -11,6 +11,7 @@ $params = array_merge(
return array( return array(
'id' => 'change-me', 'id' => 'change-me',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'preload' => array('log'), 'preload' => array('log'),
'controllerNamespace' => 'frontend\controllers', 'controllerNamespace' => 'frontend\controllers',
'modules' => array( 'modules' => array(

1
apps/benchmark/.gitignore vendored

@ -0,0 +1 @@
composer.lock

3
apps/benchmark/composer.json

@ -12,6 +12,9 @@
"irc": "irc://irc.freenode.net/yii", "irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2" "source": "https://github.com/yiisoft/yii2"
}, },
"config": {
"vendor-dir": "protected/vendor"
},
"minimum-stability": "dev", "minimum-stability": "dev",
"require": { "require": {
"php": ">=5.3.0", "php": ">=5.3.0",

3
framework/yii/base/Application.php

@ -207,7 +207,8 @@ class Application extends Module
/** /**
* Returns the directory that stores vendor files. * Returns the directory that stores vendor files.
* @return string the directory that stores vendor files. Defaults to 'protected/vendor'. * @return string the directory that stores vendor files.
* Defaults to 'vendor' directory under applications [[basePath]].
*/ */
public function getVendorPath() public function getVendorPath()
{ {

Loading…
Cancel
Save