Here are the steps for upgrading our D7 sites to PHP-8.2.
A. Create a multi-dev called php82. Clone from the live environment.
B. Git pull and git checkout php82
- If you get an "aborting" message when you do git pull run the command git stash and then try git pull again.
C. Ensure the php82 multi-dev core and modules are up to date by looking at admin>status report and admin>modules>update.
- If updates are needed, use D7 update instructions.
- git pull again after.
D. Update the drupalexp module
- cd into sites/all/modules or sites/all/modules/contrib
- rm -rf dexp_menu
- git clone git@gitlab.com:watech-web/dexp-menu.git
- cd dexp-menu
- ls -la
- rm -rf file or folder that starts with .git
- cd back to root
- Send the changes up
- git add .
- git commit -m"Update the drupalexp module"
- git push
E. Update drupalexp theme to drupalexp-php81
- cd to the sites/all/themes folder
- rm -rf drupalexp
- git clone git@gitlab.com:watech-web/drupalexp-php81.git
- mv drupalexp-php81 drupalexp
- cd drupalexp
- rm -rf .git to remove the git file
- cd back to root
- send the changes up
- git add .
- git commit -m"Update drupalexp theme to drupalexp-php81"
- git push
F. updb and cache clear (using terminus or on site)
G. Change the PHP version in the pantheon.yml file to 8.2 and save
H Send it up
- git add .
- git commit -m"php 8.2"
- git push
I. Test
- Status report
- Recent log
- Visually look around the site
- Edit and save a page and review recent log messages
J. IF you get a responsive_tables_filter error
- In site root:
- git clone git@gitlab.com:watech-web/d7-php8-patches.git
- ls
- You should see d7-php8-patches
- cd sites/all/modules/responsive_tables_filter
- or cd sites/all/modules/contrib/repsonsive_tables_filter
- patch < ../../../../d7-php8-patches/responsive_tables_filter/responsive_table_filter_php82.patch
- or patch < ../../../../../d7-php8-patches/responsive_tables_filter/responsive_table_filter_php82.patch
- In site root
- rm -rf d7-php8-patches
- Send it up
- git add .
- git commit -m"patching responsive tables filter module"
- git push
- Here is a list of other patches Dan has placed in the patches folder. You would follow the same process if you have an error regarding these modules.
- ckeditor
- drupalexp
- eck
- entity_reference_autocomplete
- features_extra
- feeds
- feeds_ex
- hierarchical_select
- job_scheduler
- multiupload_filefield_widget
- oauth
- path_breadcrumbs
- responsive_tables_filter
- security_review
- tb_megamenu
- workbench_moderation
- updb and clear cache
K. IF you get date errors
- Switch to SFTP on pantheon dashboard
- In site root:
- terminus drush 'sitename'.php82 -- dl date-7.x-2.14
- Respond y to the prompt
- Commit changes on dashboard
- Switch back to git mode
- updb and clear cache
L. Other errors: Patch as required
- Troubleshoot the issue and find a patch
- cd into the module folder causing the problem
- wget urltopatch
- patch < nameofpatchfile
- rm -rf nameofpatchfile
- cd to root
M. Send it up
- git add .
- git commit -m"patching ____ module"
- git push
- updb and clear cache
N. Test again
- Status report
- Recent log
- Visually look around the site
- Edit and save a page and review recent log messages
O. Update spreadsheet with "php82 ready 'date' 'initials'"