Partially revert and restore bootstrap/autoload.php
As discussed with @daftspunk, we now have to hard-code some overrides to ensure our helpers are loaded first. To keep the code DRY and self-explanatory, we do need to keep the autoload.php file.
This commit is contained in:
parent
e099b7bdee
commit
60d6825c0d
28
artisan
28
artisan
|
|
@ -5,38 +5,28 @@ define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register Core Helpers
|
| Bootstrap dependencies
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| We cannot rely on Composer's load order when calculating the weight of
|
| We use a custom bootstrap autoloader to load some October dependencies
|
||||||
| each package. This line ensures that the core global helpers are
|
| first, before bringing in all dependencies from Composer.
|
||||||
| always given priority one status.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$helperPath = __DIR__.'/vendor/october/rain/src/Support/helpers.php';
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
if (!file_exists($helperPath)) {
|
|
||||||
echo 'Missing vendor files, try running "composer install" or use the Wizard installer.'.PHP_EOL;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
require $helperPath;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| Turn On The Lights
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader
|
| We need to illuminate PHP development, so let us turn on the lights.
|
||||||
| for our application. We just need to utilize it! We'll require it
|
| This bootstraps the framework and gets it ready for use, then it
|
||||||
| into the script here so that we do not have to worry about the
|
| will load up this application so that we can run it and send
|
||||||
| loading of any our classes "manually". Feels great to relax.
|
| the responses back to the browser and delight our users.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__.'/vendor/autoload.php';
|
|
||||||
|
|
||||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register Core Helpers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We cannot rely on Composer's load order when calculating the weight of
|
||||||
|
| each package. This line ensures that the core global helpers are
|
||||||
|
| always given priority one status.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$helperPath = __DIR__.'/../vendor/october/rain/src/Support/helpers.php';
|
||||||
|
|
||||||
|
if (!file_exists($helperPath)) {
|
||||||
|
echo 'Missing vendor files, try running "composer install" or use the Wizard installer.'.PHP_EOL;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
require $helperPath;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Composer Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
30
index.php
30
index.php
|
|
@ -10,37 +10,15 @@ define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register Core Helpers
|
| Bootstrap dependencies
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| We cannot rely on Composer's load order when calculating the weight of
|
| We use a custom bootstrap autoloader to load some October dependencies
|
||||||
| each package. This line ensures that the core global helpers are
|
| first, before bringing in all dependencies from Composer.
|
||||||
| always given priority one status.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$helperPath = __DIR__.'/vendor/october/rain/src/Support/helpers.php';
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
if (!file_exists($helperPath)) {
|
|
||||||
echo 'Missing vendor files, try running "composer install" or use the Wizard installer.'.PHP_EOL;
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
require $helperPath;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Register The Auto Loader
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader for
|
|
||||||
| our application. We just need to utilize it! We'll simply require it
|
|
||||||
| into the script here so that we don't have to worry about manual
|
|
||||||
| loading any of our classes later on. It feels great to relax.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
require __DIR__.'/vendor/autoload.php';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit backupGlobals="false"
|
<phpunit backupGlobals="false"
|
||||||
backupStaticAttributes="false"
|
backupStaticAttributes="false"
|
||||||
bootstrap="../../vendor/autoload.php"
|
bootstrap="../../bootstrap/autoload.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue