October CMS Is Updating To Laravel 6, Here’s What You Should Know

October CMS Is Updating To Laravel 6, Here’s What You Should Know

Currently, October CMS runs on Laravel 5.5, which was the previous LTS (Long-term support) release that had bug fixes up until the end of August 2019, and will stop receiving updates completely by the end of August 2020 of this year, according to Laravel's support policy. However, the October core team were able to successfully gather the funding needed to perform the massive undertaking of upgrading the underlying framework that powers October CMS. With the overwhelming support from the community, the core team has been able to collect $1,230 USD from 14 backers, according to the BountySource: "Move to Laravel 6".

If you've been following the updates over at the GitHub issue page, you'll learn that Luke Towers and Ben Thomson (two of the October CMS core team members) have already started making progress on the upgrade to Laravel 6. The version jump from Laravel 5.5 to Laravel 6 will be no easy task and will require lots of testing to ensure a smooth upgrade for those who meet the minimum requirements. The proposed release date has been set for March 1st, but no official release date has been confirmed yet. They have provided the community with upgrade notes for your convenience, which we'll briefly go over some of the key ones here.

New Requirements

The new minimum requirements for running October CMS have been updated and include:

  • PHP 7.2.9 or greater (recommended PHP 7.4)
  • SQLite 3.7.11 or greater (recommended SQLite 3.8.8+)

If you use Laravel packages, you should consider looking into both your package's support for Laravel 6 and the actual Laravel 6 upgrade guide to ensure that your custom plugins are compatible.

Please keep in mind that these requirements are still subject to change as the core team continues to improve the underlying framework.

Major Changes

⚙️ Configuration files

Laravel 6 now requires the addition of two new configuration files as seen here.

🗂 Environment variables

Any .env variables that contain the # symbol as part of the value should now have them be wrapped in quotes (preferably double quotes). The phpdotenv library that handles the parsing of environment variables now considers the # as a comment.

Before: DB_PASS=23das#sdfas

After: DB_PASS="23das#sdfas"

🗄 Git repositories

Projects using Git should include a new .gitignore under storage/framework/cache/data/.gitignore.

*
!.gitignore

Then update your current storage/framework/cache/.gitignore file to also include the !data/ rule.

Contributing

A major upgrade like this requires lots of testing and you can help speed up development and ensure a smoother upgrade when you report any issues that you may encounter. This is not production-ready and you should not upgrade your production sites yet.

Modify your composer.json file to include the changes below and then run composer update.

"require": {
    "php": "^7.2",
    "ext-mbstring": "*",
    "ext-openssl": "*",
    "october/rain": "dev-wip/laravel-6 as 1.0",
    "october/system": "dev-wip/laravel-6",
    "october/backend": "dev-wip/laravel-6",
    "october/cms": "dev-wip/laravel-6",
    "laravel/framework": "~6.0",
    "wikimedia/composer-merge-plugin": "dev-master"
},
"config": {
    "preferred-install": "dist"
},

Further Reading

This article is a brief overview of the changes coming to October CMS. Please continue reading the full Release Notes over on GitHub that covers October CMS Unit Testing, Plugin Unit Tests, Known issues, and helpful links to various upgrade guides.

Refer to this GitHub issue to stay up-to-date on the most recent changes and improvements being made on the Laravel 6 upgrade.