Procedure: Laravel / Update theme package in legacy applications

Objective

  • Many of our applications have a problem where composer is instructed to use the latest Miami theme, but due to misconfiguration or Laravel's own internal preferences, the latest theme will download and while the app may even perform a composer post-install/upgrade, it will continue to use a 3+ year old version of the theme

User

  • Solution Delivery Developers

Environment

  • 1102203: Miami Theme Laravel Package

Pre-Update Check

  • Install your app, run your composer install and composer upgrade and start it up in Docker to see what you are working with.
    • If the UI is wholly unique and nothing at all like Miami's, your team should plan a strategy for updating before you proceed with the procedure below.
    • If the UI is mainly Miami's, then updating will be less problematic, but will likely still require a fair amount of work to get the views in line with Bootstrap.

Procedure

  1. Edit your .gitignore and add the following two paths to it
    • public/vendor
    • resources/views/vendor
  2. Using git, remove any previously committed vendor variants
    • git rm -rf public/vendor/MiamiTheme;
    • git rm -rf resources/views/vendor/MiamiTheme;
  3. Update your composer.json to force publish assets when installing or upgrading
  4. Commit your changes, so that the appropriate files are removed / ignored before proceeding
  5. Run a composer upgrade or install, and upon completion, check that the app is now using the latest theme package
    • An easy check is that the footer should now have:
      • A centered copyright
      • Only the Report a Problem With This Website link