I spun up a Homestead VM and verified that a local Pivot installation using the master branch (PHP 7.2.34, Laravel 5), can be safely updated to Oliver's branch (PHP 8.1.3, Laravel 9) without data loss, or regressions, as long as we remember to update the name of the env var that configures the mail driver. Details in Upgrade Outline.
Limitations of verification:
A. I did NOT test with Apache httpd -- I used Laravel's built-in development-grade HTTP server
B. I did NOT attempt to use a MySQL version that matches what is currently on the production server -- my local tests used MySQL 8.0.28 for both the old version and the upgraded version of Pivot.
C. I only verified the migration of one test election. The election had 3 candidates, 1 regular voter (the election creator), and two proxy voters (both emails were the election creator).
All that said, I think it is reasonable to proceed -- risks arising from disparities between the dev and prod environment can be mitigated by snapshotting the VM, and/or backing up the database.
Upgrade Outline
Take snapshot of VM and/or make backup of MySQL database
Upgrade PHP to version 8.1
Rename mail env var from MAIL_DRIVER to MAIL_MAILER.
Local Verification
I spun up a Homestead VM and verified that a local Pivot installation using the master branch (PHP 7.2.34, Laravel 5), can be safely updated to Oliver's branch (PHP 8.1.3, Laravel 9) without data loss, or regressions, as long as we remember to update the name of the env var that configures the mail driver. Details in
Upgrade Outline
.Limitations of verification:
A. I did NOT test with Apache httpd -- I used Laravel's built-in development-grade HTTP server B. I did NOT attempt to use a MySQL version that matches what is currently on the production server -- my local tests used MySQL 8.0.28 for both the old version and the upgraded version of Pivot. C. I only verified the migration of one test election. The election had 3 candidates, 1 regular voter (the election creator), and two proxy voters (both emails were the election creator).
All that said, I think it is reasonable to proceed -- risks arising from disparities between the dev and prod environment can be mitigated by snapshotting the VM, and/or backing up the database.
Upgrade Outline
MAIL_DRIVER
toMAIL_MAILER
.Troubleshooting
Related to #292 Related to #293