From ed88c623d6231230e513a087cada8eae569292a8 Mon Sep 17 00:00:00 2001
From: Dan Brown <ssddanbrown@googlemail.com>
Date: Sun, 19 Nov 2017 17:59:12 +0000
Subject: [PATCH] Made some further laravel 5.5 cleanup

Removed old bootstrap files that are not needed and
amended composer to laravel upgrade guide
---
 .travis.yml            |  1 -
 artisan                |  8 +++++---
 bootstrap/autoload.php | 35 -----------------------------------
 composer.json          |  5 +----
 public/index.php       | 10 ++++++----
 5 files changed, 12 insertions(+), 47 deletions(-)
 delete mode 100644 bootstrap/autoload.php

diff --git a/.travis.yml b/.travis.yml
index d51dd6d4f..12820cbe1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,7 +15,6 @@ before_script:
   - mysql -u root -e "GRANT ALL ON \`bookstack-test\`.* TO 'bookstack-test'@'localhost';"
   - mysql -u root -e "FLUSH PRIVILEGES;"
   - phpenv config-rm xdebug.ini
-  - composer dump-autoload --no-interaction
   - composer install --prefer-dist --no-interaction
   - php artisan clear-compiled -n
   - php artisan optimize -n
diff --git a/artisan b/artisan
index df630d0d6..d5c6aaf98 100755
--- a/artisan
+++ b/artisan
@@ -1,6 +1,8 @@
 #!/usr/bin/env php
 <?php
 
+define('LARAVEL_START', microtime(true));
+
 /*
 |--------------------------------------------------------------------------
 | Register The Auto Loader
@@ -13,7 +15,7 @@
 |
 */
 
-require __DIR__.'/bootstrap/autoload.php';
+require __DIR__.'/vendor/autoload.php';
 
 $app = require_once __DIR__.'/bootstrap/app.php';
 
@@ -40,7 +42,7 @@ $status = $kernel->handle(
 | Shutdown The Application
 |--------------------------------------------------------------------------
 |
-| Once Artisan has finished running. We will fire off the shutdown events
+| Once Artisan has finished running, we will fire off the shutdown events
 | so that any final work may be done by the application before we shut
 | down the process. This is the last thing to happen to the request.
 |
@@ -48,4 +50,4 @@ $status = $kernel->handle(
 
 $kernel->terminate($input, $status);
 
-exit($status);
+exit($status);
\ No newline at end of file
diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php
deleted file mode 100644
index 29f66ace4..000000000
--- a/bootstrap/autoload.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-define('LARAVEL_START', microtime(true));
-
-/*
-|--------------------------------------------------------------------------
-| 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__.'/../app/helpers.php';
-require __DIR__.'/../vendor/autoload.php';
-
-/*
-|--------------------------------------------------------------------------
-| Include The Compiled Class File
-|--------------------------------------------------------------------------
-|
-| To dramatically increase your application's performance, you may use a
-| compiled class file which contains all of the classes commonly used
-| by a request. The Artisan "optimize" is used to create this file.
-|
-*/
-
-$compiledPath = __DIR__.'/cache/compiled.php';
-
-if (file_exists($compiledPath)) {
-    require $compiledPath;
-}
diff --git a/composer.json b/composer.json
index 5db7033d6..99344b88b 100644
--- a/composer.json
+++ b/composer.json
@@ -59,13 +59,9 @@
             "php -r \"!file_exists('bootstrap/cache/compiled.php') || @unlink('bootstrap/cache/compiled.php');\""
         ],
         "post-install-cmd": [
-            "Illuminate\\Foundation\\ComposerScripts::postInstall",
             "php artisan cache:clear",
             "php artisan view:clear"
         ],
-        "post-update-cmd": [
-            "Illuminate\\Foundation\\ComposerScripts::postUpdate"
-        ],
         "post-autoload-dump": [
             "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
             "@php artisan package:discover"
@@ -76,6 +72,7 @@
         ]
     },
     "config": {
+        "optimize-autoloader": true,
         "preferred-install": "dist",
         "php": "7.0"
     }
diff --git a/public/index.php b/public/index.php
index c5820533b..904bd999b 100644
--- a/public/index.php
+++ b/public/index.php
@@ -4,9 +4,11 @@
  * Laravel - A PHP Framework For Web Artisans
  *
  * @package  Laravel
- * @author   Taylor Otwell <taylorotwell@gmail.com>
+ * @author   Taylor Otwell <taylor@laravel.com>
  */
 
+define('LARAVEL_START', microtime(true));
+
 /*
 |--------------------------------------------------------------------------
 | Register The Auto Loader
@@ -15,11 +17,11 @@
 | 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 nice to relax.
+| loading any of our classes later on. It feels great to relax.
 |
 */
 
-require __DIR__.'/../bootstrap/autoload.php';
+require __DIR__.'/../vendor/autoload.php';
 
 /*
 |--------------------------------------------------------------------------
@@ -55,4 +57,4 @@ $response = $kernel->handle(
 
 $response->send();
 
-$kernel->terminate($request, $response);
+$kernel->terminate($request, $response);
\ No newline at end of file