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 dexp_menu module if it has it.
- cd into sites/all/modules or sites/all/modules/contrib
- rm -rf drupalexp
- 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 ..
- mv dexp-menu dexp_menu
- cd back to root
- Send the changes up
- git add .
- git commit -m"Update the drupalexp module"
- git push
E. Update the db_megamenu module if it has it.
- cd into sites/all/modules or sites/all/modules/contrib
- rm -rf db_megamena
- git clone git@gitlab.com:watech-web/db-mega-d7.git
- cd db-mega-d7
- ls -la
- rm -rf file or folder that starts with .git
- cd ..
- mv db-mega-d7 db_megamenu
- cd back to root
- Send the changes up
- git add .
- git commit -m"Update the db_megamenu module"
- git push
F. 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
G. Patch wysiwyg module
- cd to the sites/all/modules/wysiwyg folder
- wget https://git.drupalcode.org/project/wysiwyg/-/merge_requests/7.patch
- patch < 7.patch
- rm -rf 7.patch
- cd back to root
- send the changes up
- git add .
- git commit -m"Patched wysiwyg module"
- git push
H. Replace current 7.3x Date module with 7.2x Date module
- Delete Date module in code
- Download 7.2.x Date module zip https://ftp.drupal.org/files/projects/date-7.x-2.14.zip
- Extract Date module
- Place Date module folder in the code where the previous Date module was. Make sure it is all lower case.
- Send the changes up
- git add .
- git commit -m"Downgrading Date module to 7.2.x"
- git push
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. updb and cache clear (using terminus or on site)
J. Test
- Status report
- Recent log
- Visually look around the site
- Edit and save a page and review recent log messages
K. 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
L. 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
M. 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
N. Send it up
- git add .
- git commit -m"patching ____ module"
- git push
- updb and clear cache
O. Test again
- Status report
- Recent log
- Visually look around the site
- Edit and save a page and review recent log messages
P. Update spreadsheet with "php82 ready 'date' 'initials'"