Jump to: navigation, search

Upgrade to 4.1

Contents

Introduction

Below are the main steps needed to convert your site to laravel 4.1 using our Base install.

Use the script

I have built a laravel command to handle the upgrade for you. To use if simply do the following.

  1. Pull from origin master in app/core
  2. In composer.json, add 'app/core/commands' to the autoload.
  3. Run composer dump-autoload
  4. Add the lines listed below to start/srtisan.php
  5. Run php artisan upgrade 4.1
  6. Run php artisan auth:reminders-controller


artisan.php
php
  1. Artisan::add(new UpgradeCommand);
  2. Artisan::resolve('UpgradeCommand');


Go through the steps manually

Composer.json

  1. Set require for laravel to "laravel/framework": "4.1.*",
  2. Remove aware from require
  3. Remove aware from psr-0
  4. Add license under keyWords ("license": "MIT",)


Completed composer.json
javascript
  1. {
  2.         "name": "laravel/laravel",
  3.         "description": "The Laravel Framework.",
  4.         "keywords": ["framework", "laravel"],
  5.         "license": "MIT",
  6.         "require": {
  7.                 "laravel/framework": "4.1.*",
  8.                 "way/generators": "dev-master",
  9.                 "wisembly/elephant.io": "dev-master",
  10.                 "juy/profiler" : "dev-master",
  11.                 "intervention/image": "dev-master",
  12.                 "leafo/lessphp": "0.4.0",
  13.                 "knplabs/github-api": "*"
  14.         },
  15.         "autoload": {
  16.                 "classmap": [
  17.                         "app/commands",
  18.                         "app/controllers",
  19.                         "app/library",
  20.                         "app/models",
  21.                         "app/core",
  22.                         "app/core/controllers",
  23.                         "app/core/library",
  24.                         "app/core/models",
  25.                         "app/database/migrations",
  26.                         "app/database/seeds",
  27.                         "app/tests/TestCase.php"
  28.                 ],
  29.                 "psr-0": {
  30.                         "Core": "app/"
  31.                 }
  32.         },
  33.         "scripts": {
  34.                 "post-install-cmd": [
  35.                         "php artisan optimize"
  36.                 ],
  37.                 "pre-update-cmd": [
  38.                         "php artisan clear-compiled",
  39.                         "php artisan optimize"
  40.                 ],
  41.                 "post-create-project-cmd": [
  42.                         "php artisan key:generate"
  43.                 ]
  44.         },
  45.         "config": {
  46.                 "preferred-install": "dist"
  47.         },
  48.         "minimum-stability": "dev"
  49. }


bootstrap/start.php

  1. Remove call to redirectIfTrailingSlash

Update

  1. Run composer update

Replace index.php and artisian

  1. Replace your version of public/index.php and artisian with the ones below.

Update app config

  1. In providers...
    1. Add 'Illuminate\Remote\RemoteServiceProvider',
  2. In aliases...
    1. Change Controller entry to Illuminate\Routing\Controller
    2. Add SSH entry ('SSH' => 'Illuminate\Support\Facades\SSH',)

Update database config

  1. Update redis.cluster option to false

Update queue config

  1. Add failed to the queue job option

Update session config

  1. Add the expire_on_close and _secure options to session.php

Add remote config

  1. Add the new app/config/remote.php

Get the reminders controller

  1. Run the following artisan command
    • auth:reminders-controller

Update reminders lang file

  1. Update the reminders.php language file

Update to the new core

  1. All that is left is to update to the new core code base.
  1. cd app/core
  2. git pull -f origin 4.1-Testing