backstage-technical-services / hub

The starting place for anything related to the website.
0 stars 1 forks source link

Upgrade to Laravel 8.x #127

Closed bnjns closed 3 years ago

bnjns commented 3 years ago

With the decision to return to the Laravel MPA for current development we need to update it - the site is currently using Laravel 6.x but the latest is Laravel 8.x. It is also running on PHP 7.2.

We should upgrade the site to use Laravel 8.x and PHP 8. This upgrade will need to be done in 2 distinct stages:

The upgrade guides for 7.x and 8.x should explain what functionality, if any, needs to be changed but the key takeaways are:

Laravel 6.x -> 7.x

Laravel 7.x -> 8.x

In addition to upgrading Laravel, we will also need to upgrade PHP. The docker image used for local development can be found here, although it appears we already have a PHP 7.4 available. PHP will need to be managed manually in the VPS, but the CI config will also need updating when we upgrade to PHP 8.

Note: Due to the complexity of the upgrade, it would be sensible to fully upgrade to Laravel 7.x first (including deploying to prd) before tackling the upgrade to Laravel 8.x in order to reduce the risk of deploying.

IMPORTANT

This site uses some packages that I wrote myself (laravel-notifications, laravel-searchtools and web-dev-tools) which I no longer maintain. I won't be able to publish versions which support the new versions of Laravel, and this isn't a sustainable model for future so we should look at instead copying this content directly into the repo, rather than using the dependencies (don't forget to add any additional dependencies).

bnjns commented 3 years ago

Upgrade to PHP 7.4: https://github.com/backstage-technical-services/laravel-site/commit/d169c4ab3822bceaf068b02aeef303514ccd80f8 Upgrade to Laravel 7.x: https://github.com/backstage-technical-services/laravel-site/commit/69e24cedeed7f7ada934a85dbb792efc1e39212e Upgrade to Laravel 8.x: https://github.com/backstage-technical-services/laravel-site/commit/a81f3fcbd7186fab15e76323bd9cd8fca05347b3 Upgrade to PHP 8.0: https://github.com/backstage-technical-services/laravel-site/commit/8f212ea9b4728c955a1fe2029bb0d05af123795f