PHP CI template commands need an update for PHP 8
Summary
The current PHP template does not work out of the box. Due to inclusion of the latest PHP after the change via gitlab-foss!30319 (merged), it now pulls in PHP 8 and the commands fail with:
error: /usr/src/php/ext/mcrypt does not exist
Steps to reproduce
- Visit Pipeline Editor in any test project
- Copy over contents of the PHP template: https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/lib/gitlab/ci/templates/PHP.gitlab-ci.yml
- Commit changes to execute and receive the pipeline failure
Example Project
This CI issue can be reproduced on any project.
What is the current bug behavior?
Running the PHP template fails at installing certain dependencies
What is the expected correct behavior?
Running the PHP template should run the project's tests
Relevant logs and/or screenshots
error: /usr/src/php/ext/mcrypt does not exist
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)