Update PHP Version#
Instructions not updated for Drupal 10, so they may not work#
-
Create a new feature branch, you haven't already.
- Be sure to pull code before making the feature branch.
- Be sure to import config after making the feature branch.
-
Open the following files in your text editor:
- pantheon.yml
- .ddev/config.yaml
-
Change the php version in the files, then save.
- Update php in pantheon.yml
- Update php in .ddev/config.yaml
- Update php in pantheon.yml
-
Open the composer.json file. Update php under config>platform. Save.
"config": { "platform": { "php": "8.0" },
-
Because we updated the composer.json file we need to update the lock file:
composer update --lock
-
Check the status:
git status
-
Add the files and commit work.
-
Because we updated the config.yml in DDEV, we need to make DDEV recognize the update. Stop then start your local environment by running the set of commands for Lando or DDEV.
ddev stop
thenddev start
-
lando stop
thenlando start
-
Check to verify that PHP is updated locally. The config change to the DDev config.yml file should update local environment.
-
If PHP is updated locally, push changes to your feature branch.
-
Approve the pull request or have someone else approve it.
-
Now we have to do steps to force Pantheon to recognize the update we just made.
- Open the composer.json file and make a change to one of the comments.
- Commit changes.
- Push to feature branch.
-
Check to verify that PHP is updated on your feature branch. If it is, you can merge the pull request into develop.
-
After merging into develop, follow deploy steps as you do in other branches.