Skip to content

Commit

Permalink
@craftcms alias
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Nov 28, 2022
1 parent 89361c0 commit d259860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bootstrap/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,14 @@
defined('CURLOPT_CONNECTTIMEOUT_MS') || define('CURLOPT_CONNECTTIMEOUT_MS', 156);

// Load the files
$cmsPath = $vendorPath . DIRECTORY_SEPARATOR . 'craftcms' . DIRECTORY_SEPARATOR . 'cms';
$cmsPath = dirname(__DIR__);
$libPath = $cmsPath . DIRECTORY_SEPARATOR . 'lib';
$srcPath = $cmsPath . DIRECTORY_SEPARATOR . 'src';
require $libPath . DIRECTORY_SEPARATOR . 'yii2' . DIRECTORY_SEPARATOR . 'Yii.php';
require $srcPath . DIRECTORY_SEPARATOR . 'Craft.php';

// Set aliases
Craft::setAlias('@craftcms', $cmsPath);
Craft::setAlias('@root', $rootPath);
Craft::setAlias('@lib', $libPath);
Craft::setAlias('@craft', $srcPath);
Expand Down
2 changes: 1 addition & 1 deletion src/console/controllers/ServeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ServeController extends BaseServeController
/**
* @inheritdoc
*/
public $router = '@app/../bootstrap/router.php';
public $router = '@craftcms/bootstrap/router.php';

/**
* @inheritdoc
Expand Down

0 comments on commit d259860

Please sign in to comment.