From 7668a999a25d85684b41d6a9986ca37d48a86fe0 Mon Sep 17 00:00:00 2001 From: Dan Brown <ssddanbrown@googlemail.com> Date: Sun, 19 Nov 2017 18:31:24 +0000 Subject: [PATCH] Fixed heavy init breakages made in last commit --- .travis.yml | 2 +- artisan | 10 ++++------ bootstrap/init.php | 25 +++++++++++++++++++++++++ phpunit.xml | 2 +- public/index.php | 10 ++++------ 5 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 bootstrap/init.php diff --git a/.travis.yml b/.travis.yml index 12820cbe1..29727f488 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: trusty sudo: false language: php php: - - 7.0.7 + - 7.0.20 - 7.1.9 cache: diff --git a/artisan b/artisan index d5c6aaf98..dad16dcde 100755 --- a/artisan +++ b/artisan @@ -5,17 +5,15 @@ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- -| Register The Auto Loader +| Initialize The App |-------------------------------------------------------------------------- | -| 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. +| We need to get things going before we start up the app. +| The init file loads everything in, in the correct order. | */ -require __DIR__.'/vendor/autoload.php'; +require __DIR__.'/bootstrap/init.php'; $app = require_once __DIR__.'/bootstrap/app.php'; diff --git a/bootstrap/init.php b/bootstrap/init.php new file mode 100644 index 000000000..7d9e43f07 --- /dev/null +++ b/bootstrap/init.php @@ -0,0 +1,25 @@ +<?php + +/* +|-------------------------------------------------------------------------- +| Load Our Own Helpers +|-------------------------------------------------------------------------- +| +| This custom function loads any helpers, before the Laravel Framework +| is built so we can override any helpers as we please. +| +*/ +require __DIR__.'/../app/helpers.php'; + +/* +|-------------------------------------------------------------------------- +| 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'; \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 2e07cdbf8..dbea76aa6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" - bootstrap="bootstrap/autoload.php" + bootstrap="bootstrap/init.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" diff --git a/public/index.php b/public/index.php index 904bd999b..ad378d7e0 100644 --- a/public/index.php +++ b/public/index.php @@ -11,17 +11,15 @@ define('LARAVEL_START', microtime(true)); /* |-------------------------------------------------------------------------- -| Register The Auto Loader +| Initialize The App |-------------------------------------------------------------------------- | -| 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. +| We need to get things going before we start up the app. +| The init file loads everything in, in the correct order. | */ -require __DIR__.'/../vendor/autoload.php'; +require __DIR__.'/../bootstrap/init.php'; /* |--------------------------------------------------------------------------