Created
December 3, 2013 06:16
-
-
Save kenjis/7764670 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/composer.json b/composer.json | |
index e1b21ea..006ac5b 100644 | |
--- a/composer.json | |
+++ b/composer.json | |
@@ -16,10 +16,14 @@ | |
"forum": "http://fuelphp.com/forums" | |
}, | |
"require": { | |
- "php": ">=5.3.3", | |
+ "php": ">=5.4", | |
"monolog/monolog": "1.5.*", | |
"fuelphp/upload": "2.0.1" | |
}, | |
+ "require-dev": { | |
+ "codeception/aspect-mock": "*", | |
+ "symfony/finder":"*" | |
+ }, | |
"suggest": { | |
"mustache/mustache": "Allow Mustache templating with the Parser package", | |
"smarty/smarty": "Allow Smarty templating with the Parser package", | |
diff --git a/fuel/app/bootstrap.php b/fuel/app/bootstrap.php | |
index a6213d5..b491688 100644 | |
--- a/fuel/app/bootstrap.php | |
+++ b/fuel/app/bootstrap.php | |
@@ -1,9 +1,5 @@ | |
<?php | |
-// Load in the Autoloader | |
-require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'; | |
-class_alias('Fuel\\Core\\Autoloader', 'Autoloader'); | |
- | |
// Bootstrap the framework DO NOT edit this | |
require COREPATH.'bootstrap.php'; | |
diff --git a/oil b/oil | |
index 62033d6..4a21f80 100644 | |
--- a/oil | |
+++ b/oil | |
@@ -48,6 +48,10 @@ define('COREPATH', realpath(__DIR__.'/fuel/core/').DIRECTORY_SEPARATOR); | |
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true)); | |
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage()); | |
+// Load in the Autoloader | |
+require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'; | |
+class_alias('Fuel\\Core\\Autoloader', 'Autoloader'); | |
+ | |
// Boot the app | |
require APPPATH.'bootstrap.php'; | |
diff --git a/public/index.php b/public/index.php | |
index e01d3a4..9cb90d3 100644 | |
--- a/public/index.php | |
+++ b/public/index.php | |
@@ -40,6 +40,10 @@ define('COREPATH', realpath(__DIR__.'/../fuel/core/').DIRECTORY_SEPARATOR); | |
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true)); | |
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage()); | |
+// Load in the Autoloader | |
+require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'; | |
+class_alias('Fuel\\Core\\Autoloader', 'Autoloader'); | |
+ | |
// Boot the app | |
require APPPATH.'bootstrap.php'; | |
diff --git a/bootstrap_phpunit.php b/bootstrap_phpunit.php | |
index 3b5b851..c6387a6 100644 | |
--- a/bootstrap_phpunit.php | |
+++ b/bootstrap_phpunit.php | |
@@ -32,6 +32,34 @@ unset($app_path, $core_path, $package_path, $_SERVER['app_path'], $_SERVER['core | |
defined('FUEL_START_TIME') or define('FUEL_START_TIME', microtime(true)); | |
defined('FUEL_START_MEM') or define('FUEL_START_MEM', memory_get_usage()); | |
+/** | |
+ * Load the Composer autoloader if present | |
+ */ | |
+defined('VENDORPATH') or define('VENDORPATH', realpath(COREPATH.'..'.DS.'vendor').DS); | |
+if ( ! is_file(VENDORPATH.'autoload.php')) | |
+{ | |
+ die('Composer is not installed. Please run "php composer.phar update" in the root to install Composer'); | |
+} | |
+require VENDORPATH.'autoload.php'; | |
+ | |
+// Add AspectMock | |
+$kernel = \AspectMock\Kernel::getInstance(); | |
+$kernel->init([ | |
+ 'debug' => true, | |
+ 'appDir' => __DIR__ . '/../', | |
+ 'includePaths' => [ | |
+ __DIR__.'/../app', __DIR__.'/../core', __DIR__.'/../packages', | |
+ ], | |
+ 'excludePaths' => [ | |
+ __DIR__.'/../app/tests', __DIR__.'/../core/tests', | |
+ ], | |
+]); | |
+ | |
+// Load in the Autoloader | |
+//require COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'; | |
+$kernel->loadFile(COREPATH.'classes'.DIRECTORY_SEPARATOR.'autoloader.php'); // path to your autoloader | |
+class_alias('Fuel\\Core\\Autoloader', 'Autoloader'); | |
+ | |
// Boot the app | |
require_once APPPATH.'bootstrap.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment