jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393499 )

Change subject: php7.0: Convert php5 to php
......................................................................


php7.0: Convert php5 to php

Most of the changes are straight forward replacements of "php5" with
"php" in package names. The php5-xhprof extension is replaced with
php-tideways (<https://github.com/tideways/php-profiler-extension>). The
php5 session cleanup script patches that we had added are also removed.

Bug: T181354
Change-Id: I33e74217203c037c29d6389c29f367e639131ba3
---
M puppet/hieradata/common.yaml
M puppet/modules/apache/files/envvars
M puppet/modules/apache/manifests/init.pp
A puppet/modules/apache/manifests/mod/php.pp
D puppet/modules/apache/manifests/mod/php5.pp
M puppet/modules/crm/manifests/civicrm.pp
M puppet/modules/mediawiki/manifests/apache.pp
R puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
M puppet/modules/mediawiki/templates/multiwiki/alldbs.erb
M puppet/modules/mediawiki/templates/multiwiki/multiversion-install.erb
M puppet/modules/mediawiki/templates/multiwiki/mwscript.erb
M puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
M puppet/modules/mediawiki/templates/systemd/jobchron.erb
M puppet/modules/mediawiki/templates/systemd/jobrunner.erb
M puppet/modules/memcached/manifests/php.pp
M puppet/modules/phabricator/manifests/init.pp
D puppet/modules/php/files/php5.cron.d
D puppet/modules/php/files/sessionclean
M puppet/modules/php/manifests/composer.pp
M puppet/modules/php/manifests/ini.pp
M puppet/modules/php/manifests/init.pp
M puppet/modules/php/manifests/remote_debug.pp
D puppet/modules/php/manifests/sessionclean.pp
M puppet/modules/php/manifests/xhprof.pp
M puppet/modules/php/templates/prune_php_ini_files.bash.erb
M puppet/modules/redis/manifests/php.pp
M puppet/modules/role/manifests/fss.pp
M puppet/modules/role/manifests/ldapauth.pp
M puppet/modules/role/manifests/mediawiki.pp
M puppet/modules/role/manifests/zend.pp
30 files changed, 70 insertions(+), 164 deletions(-)

Approvals:
  BryanDavis: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index fdf9553..3eb1b97 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -225,7 +225,7 @@
 mediawiki::branch: master
 
 mediawiki::apache::docroot: "%{hiera('apache::docroot')}"
-mediawiki::apache::php5_site_name: "php5%{hiera('mwv::tld')}"
+mediawiki::apache::php7_site_name: "php7%{hiera('mwv::tld')}"
 
 mediawiki::jobrunner::enable: true
 mediawiki::jobrunner::dir: "%{hiera('mwv::services_dir')}/jobrunner"
@@ -287,8 +287,6 @@
 phabricator::log_dir: "/vagrant/logs/phd"
 phabricator::vhost_name: "phabricator%{hiera('mwv::tld')}"
 phabricator::remote: https://secure.phabricator.com/diffusion/P/phabricator.git
-
-php::sessionclean::ensure: present
 
 php::xhprof::profile_storage_dir: /vagrant/profiles
 
diff --git a/puppet/modules/apache/files/envvars 
b/puppet/modules/apache/files/envvars
index 430884f..27823ea 100644
--- a/puppet/modules/apache/files/envvars
+++ b/puppet/modules/apache/files/envvars
@@ -15,9 +15,9 @@
   . "$envfile"
 done
 
-for ini in /etc/php5/conf.d/*.ini; do
+for ini in /etc/php/7.0/conf.d/*.ini; do
   [ -r "$ini" ] || break
-  mv "$ini" /etc/php5/mods-available
-  /usr/sbin/php5enmod -s ALL "$(basename $ini .ini)"
+  mv "$ini" /etc/php/7.0/mods-available
+  /usr/sbin/phpenmod -s ALL "$(basename $ini .ini)"
 done
-rm -rf /etc/php5/conf.d
+rm -rf /etc/php/7.0/conf.d
diff --git a/puppet/modules/apache/manifests/init.pp 
b/puppet/modules/apache/manifests/init.pp
index 6d6de02..bcbb314 100644
--- a/puppet/modules/apache/manifests/init.pp
+++ b/puppet/modules/apache/manifests/init.pp
@@ -14,7 +14,7 @@
         ensure  => present,
     }
 
-    include apache::mod::php5
+    include apache::mod::php
     include apache::mod::access_compat
 
     file { '/etc/apache2/ports.conf':
diff --git a/puppet/modules/apache/manifests/mod/php.pp 
b/puppet/modules/apache/manifests/mod/php.pp
new file mode 100644
index 0000000..2380e32
--- /dev/null
+++ b/puppet/modules/apache/manifests/mod/php.pp
@@ -0,0 +1,8 @@
+# == Class: apache::mod::php
+#
+class apache::mod::php {
+    package { 'libapache2-mod-php': }
+    apache::mod_conf { 'php7.0':
+        require => Package['libapache2-mod-php'],
+    }
+}
diff --git a/puppet/modules/apache/manifests/mod/php5.pp 
b/puppet/modules/apache/manifests/mod/php5.pp
deleted file mode 100644
index 3da7d3b..0000000
--- a/puppet/modules/apache/manifests/mod/php5.pp
+++ /dev/null
@@ -1,8 +0,0 @@
-# == Class: apache::mod::php5
-#
-class apache::mod::php5 {
-    package { 'libapache2-mod-php5': }
-    apache::mod_conf { 'php5':
-        require => Package['libapache2-mod-php5'],
-    }
-}
diff --git a/puppet/modules/crm/manifests/civicrm.pp 
b/puppet/modules/crm/manifests/civicrm.pp
index df56792..3b2ed8a 100644
--- a/puppet/modules/crm/manifests/civicrm.pp
+++ b/puppet/modules/crm/manifests/civicrm.pp
@@ -10,7 +10,7 @@
     }
 
     exec { 'civicrm_setup':
-        command => "/usr/bin/php5 ${install_script}",
+        command => "/usr/bin/php ${install_script}",
         unless  => "/usr/bin/mysql -u ${::crm::db_user} -p${::crm::db_pass} 
${::crm::civicrm_db} -B -N -e 'select 1 from civicrm_domain' | grep -q 1",
         require => [
             File[
diff --git a/puppet/modules/mediawiki/manifests/apache.pp 
b/puppet/modules/mediawiki/manifests/apache.pp
index 6db5a5c..ad698b0 100644
--- a/puppet/modules/mediawiki/manifests/apache.pp
+++ b/puppet/modules/mediawiki/manifests/apache.pp
@@ -7,12 +7,12 @@
 # [*docroot*]
 #   Document root for Apache vhost serving MediaWiki.
 #
-# [*php5_site_name*]
-#   Hostname for php5 runtime Apache vhost
+# [*php7_site_name*]
+#   Hostname for php7 runtime Apache vhost
 #
 class mediawiki::apache(
     $docroot,
-    $php5_site_name,
+    $php7_site_name,
 ) {
     include ::mediawiki
     include ::mediawiki::multiwiki
@@ -38,9 +38,9 @@
         ],
     }
 
-    apache::site { "php5-${mediawiki::wiki_name}":
+    apache::site { "php7-${mediawiki::wiki_name}":
         ensure  => present,
-        content => template('mediawiki/mediawiki-php5-site.erb'),
+        content => template('mediawiki/mediawiki-php7-site.erb'),
         require => [
             Class['::apache::mod::alias'],
             Class['::apache::mod::rewrite'],
diff --git a/puppet/modules/mediawiki/templates/mediawiki-php5-site.erb 
b/puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
similarity index 86%
rename from puppet/modules/mediawiki/templates/mediawiki-php5-site.erb
rename to puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
index e4237b5..6e7e72a 100644
--- a/puppet/modules/mediawiki/templates/mediawiki-php5-site.erb
+++ b/puppet/modules/mediawiki/templates/mediawiki-php7-site.erb
@@ -1,10 +1,10 @@
 # vim: filetype=apache sts=4 sw=4 autoindent
 #
-# PHP5 Apache site configuration for MediaWiki
+# PHP7 Apache site configuration for MediaWiki
 # This file is managed by Puppet.
 #
-ServerName php5
-ServerAlias <%= @php5_site_name %>
+ServerName php7
+ServerAlias <%= @php7_site_name %>
 
 ServerAdmin http://www.mediawiki.org/wiki/Vagrant
 DocumentRoot <%= @docroot %>
diff --git a/puppet/modules/mediawiki/templates/multiwiki/alldbs.erb 
b/puppet/modules/mediawiki/templates/multiwiki/alldbs.erb
index b9ccdd6..87fc1f4 100755
--- a/puppet/modules/mediawiki/templates/multiwiki/alldbs.erb
+++ b/puppet/modules/mediawiki/templates/multiwiki/alldbs.erb
@@ -1,4 +1,4 @@
-#!/usr/bin/env php5
+#!/usr/bin/env php
 <?php
 require_once '<%= @script_dir %>/dblist.php';
 foreach ( $wgLocalDatabases as $db ) {
diff --git 
a/puppet/modules/mediawiki/templates/multiwiki/multiversion-install.erb 
b/puppet/modules/mediawiki/templates/multiwiki/multiversion-install.erb
index 6022c34..d4500d8 100644
--- a/puppet/modules/mediawiki/templates/multiwiki/multiversion-install.erb
+++ b/puppet/modules/mediawiki/templates/multiwiki/multiversion-install.erb
@@ -17,4 +17,4 @@
   trap "mv $IP/LocalSettings.tmp $IP/LocalSettings.php" EXIT INT TERM
 fi
 
-php5 $IP/maintenance/install.php "$@"
+php $IP/maintenance/install.php "$@"
diff --git a/puppet/modules/mediawiki/templates/multiwiki/mwscript.erb 
b/puppet/modules/mediawiki/templates/multiwiki/mwscript.erb
index af5173d..02d03e3 100755
--- a/puppet/modules/mediawiki/templates/multiwiki/mwscript.erb
+++ b/puppet/modules/mediawiki/templates/multiwiki/mwscript.erb
@@ -4,6 +4,6 @@
 # Ensure that the script is run as the www-data user
 [[ $(whoami) = www-data ]] || exec sudo --preserve-env -u www-data -n -- "$0" 
"$@"
 
-[ "$PHP" = "" ] && PHP=php5
+[ "$PHP" = "" ] && PHP=php
 
 exec $PHP <%= @script_dir %>/MWScript.php "$@"
diff --git a/puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb 
b/puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
index 3ec98b1..3b6f7e4 100755
--- a/puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
+++ b/puppet/modules/mediawiki/templates/mwrepl/mwrepl.erb
@@ -41,7 +41,7 @@
             case "$2" in
                 zend|php)
                     # "php" is not documented but let's be liberal with what 
we accept
-                    ENGINE=php5
+                    ENGINE=php7.0
                     ;;
                 hhvm)
                     ENGINE=hhvm
diff --git a/puppet/modules/mediawiki/templates/systemd/jobchron.erb 
b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
index 1dc14e5..ba1f0df 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobchron.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobchron.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobchron
-ExecStart=/usr/bin/php5 <%= @dir %>/redisJobChronService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobChronService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]
diff --git a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb 
b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
index b0f2561..2e2c4b2 100644
--- a/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
+++ b/puppet/modules/mediawiki/templates/systemd/jobrunner.erb
@@ -8,7 +8,7 @@
 User=www-data
 Group=www-data
 SyslogIdentifier=jobrunner
-ExecStart=/usr/bin/php5 <%= @dir %>/redisJobRunnerService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
+ExecStart=/usr/bin/php7.0 <%= @dir %>/redisJobRunnerService 
--config-file=/etc/jobrunner.json ${DAEMON_OPTS}
 Restart=always
 
 [Install]
diff --git a/puppet/modules/memcached/manifests/php.pp 
b/puppet/modules/memcached/manifests/php.pp
index 3270f0a..1f0b78b 100644
--- a/puppet/modules/memcached/manifests/php.pp
+++ b/puppet/modules/memcached/manifests/php.pp
@@ -6,7 +6,7 @@
 class memcached::php {
     include ::apache
 
-    package { 'php5-memcached':
+    package { 'php-memcached':
         ensure => present,
         notify => Service['apache2'],
     }
diff --git a/puppet/modules/phabricator/manifests/init.pp 
b/puppet/modules/phabricator/manifests/init.pp
index b582050..152d584 100644
--- a/puppet/modules/phabricator/manifests/init.pp
+++ b/puppet/modules/phabricator/manifests/init.pp
@@ -40,8 +40,8 @@
     require_package(
         'python-pygments',
         'python-phabricator',
-        'php5-mailparse',
-        'php5-ldap'
+        'php-mailparse',
+        'php-ldap'
     )
 
     php::ini { 'phab_post_max_size':
diff --git a/puppet/modules/php/files/php5.cron.d 
b/puppet/modules/php/files/php5.cron.d
deleted file mode 100644
index 73cc5ea..0000000
--- a/puppet/modules/php/files/php5.cron.d
+++ /dev/null
@@ -1,15 +0,0 @@
-# /etc/cron.d/php5: crontab fragment for php5
-#  This purges session files in session.save_path older than X,
-#  where X is defined in seconds as the largest value of
-#  session.gc_maxlifetime from all your SAPI php.ini files
-#  or 24 minutes if not defined.  The script triggers only
-#  when session.save_handler=files.
-#
-#  WARNING: The scripts tries hard to honour all relevant
-#  session PHP options, but if you do something unusual
-#  you have to disable this script and take care of your
-#  sessions yourself.
-# Source: 
http://anonscm.debian.org/cgit/pkg-php/php.git/commit/debian/php5-common.php5.cron.d?id=4eb6c8234dd6085e3c96a5ebca86b1d70ac481e3
-
-# Look for and purge old sessions every 30 minutes
-09,39 *     * * *     root   [ -x /usr/lib/php5/sessionclean ] && 
/usr/lib/php5/sessionclean
diff --git a/puppet/modules/php/files/sessionclean 
b/puppet/modules/php/files/sessionclean
deleted file mode 100755
index 06b94d3..0000000
--- a/puppet/modules/php/files/sessionclean
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh -e
-# PHP session cleanup script
-# Source: 
http://anonscm.debian.org/cgit/pkg-php/php.git/commit/debian/sessionclean?id=4eb6c8234dd6085e3c96a5ebca86b1d70ac481e3
-# See: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1356113
-
-SAPIS="apache2:apache2\napache2filter:apache2\ncgi:php5\nfpm:php5-fpm\n"
-
-# Iterate through all web SAPIs
-(
-proc_names=""
-printf "$SAPIS" | \
-while IFS=: read -r conf_dir proc_name; do
-    if [ -e /etc/php5/${conf_dir}/php.ini ]; then
-        # Get all session variables once so we don't need to start PHP to get 
each config option
-        session_config=$(php5 -c /etc/php5/${conf_dir}/php.ini -d 
"error_reporting='~E_ALL'" -r 'foreach(ini_get_all("session") as $k => $v) echo 
"$k=".$v["local_value"]."\n";')
-        save_handler=$(echo "$session_config" | sed -ne 
's/^session\.save_handler=\(.*\)$/\1/p')
-        save_path=$(echo "$session_config" | sed -ne 
's/^session\.save_path=\(.*\)$/\1/p')
-        gc_maxlifetime=$(($(echo "$session_config" | sed -ne 
's/^session\.gc_maxlifetime=\(.*\)$/\1/p')/60))
-
-        if [ "$save_handler" = "files" -a -d "$save_path" ]; then
-            proc_names="$proc_names $proc_name";
-            printf "%s:%s\n" "$save_path" "$gc_maxlifetime"
-        fi
-    fi
-done
-# first find all open session files and touch them (hope it's not massive 
amount of files)
-for pid in $(pidof $proc_names); do
-    find "/proc/$pid/fd" -ignore_readdir_race -lname "$save_path/sess_\*" 
-exec touch -c {} \;
-done
-) | sort -rn -t: -k2,2 | sort -u -t: -k 1,1 | while IFS=: read -r save_path 
gc_maxlifetime; do
-    # find all files older then maxlifetime and delete them
-    find -O3 "$save_path" -depth -mindepth 1 -name 'sess_*' 
-ignore_readdir_race -type f -cmin "+$gc_maxlifetime" -delete
-done
-
-exit 0
diff --git a/puppet/modules/php/manifests/composer.pp 
b/puppet/modules/php/manifests/composer.pp
index 1f48ed5..5f80241 100644
--- a/puppet/modules/php/manifests/composer.pp
+++ b/puppet/modules/php/manifests/composer.pp
@@ -19,8 +19,8 @@
 
     exec { 'download_composer':
         command => "curl https://getcomposer.org/composer.phar -o ${bin}",
-        unless  => "php5 -r 'try { Phar::loadPhar(\"${bin}\"); exit(0); } 
catch(Exception \$e) { exit(1); }'",
-        require => Package['curl', 'php5-cli'],
+        unless  => "php7.0 -r 'try { Phar::loadPhar(\"${bin}\"); exit(0); } 
catch(Exception \$e) { exit(1); }'",
+        require => Package['curl', 'php-cli'],
     }
 
     file { '/usr/local/bin/composer':
@@ -40,7 +40,7 @@
         ],
         require     => [
             File['/usr/local/bin/composer'],
-            Package['php5'],
+            Package['php'],
         ],
         schedule    => 'weekly',
     }
diff --git a/puppet/modules/php/manifests/ini.pp 
b/puppet/modules/php/manifests/ini.pp
index 8665464..a65e065 100644
--- a/puppet/modules/php/manifests/ini.pp
+++ b/puppet/modules/php/manifests/ini.pp
@@ -1,7 +1,7 @@
 # == Define: php::ini
 #
 # This resource type represents a set of PHP configuration directives
-# that are managed via an ini file in /etc/php5/conf.d. PHP interprets
+# that are managed via an ini file in /etc/php/7.0/conf.d. PHP interprets
 # these files as extensions of the main php.ini configuration file. For
 # more information, see <http://wiki.debian.org/PHP#Configuration_layout>
 # and <http://php.net/manual/en/configuration.file.php>.
@@ -39,15 +39,15 @@
     # Puppet-managed .ini file names start with an underscore
     # so they can be distinguished from package-provided files.
     $basename = inline_template('_<%= @title.gsub(/\W/, "-").downcase %>')
-    $conffile = "/etc/php5/mods-available/${basename}.ini"
+    $conffile = "/etc/php/7.0/mods-available/${basename}.ini"
 
     file { $conffile:
         content => template('php/conffile.ini.erb'),
-        require => Package['php5'],
+        require => Package['php'],
         notify  => Service['apache2'],
     }
 
-    exec { "/usr/sbin/php5enmod -s ALL ${basename}":
+    exec { "/usr/sbin/phpenmod -s ALL ${basename}":
         refreshonly => true,
         subscribe   => File[$conffile],
     }
diff --git a/puppet/modules/php/manifests/init.pp 
b/puppet/modules/php/manifests/init.pp
index 34cbdde..b45b0aa 100644
--- a/puppet/modules/php/manifests/init.pp
+++ b/puppet/modules/php/manifests/init.pp
@@ -6,35 +6,35 @@
 #
 class php {
     include ::apache
-    include ::apache::mod::php5
+    include ::apache::mod::php
 
     include ::php::remote_debug
     include ::php::composer
     include ::php::xhprof
 
     package { [
+        'php',
+        'php-apcu',
         'php-auth-sasl',
+        'php-cli',
+        'php-curl',
+        'php-dev',
+        'php-gd',
+        'php-intl',
+        'php-json',
         'php-mail',
         'php-mail-mime',
+        'php-mcrypt',
+        'php-mysql',
         'php-net-smtp',
-        'php5',
-        'php5-apcu',
-        'php5-cli',
-        'php5-curl',
-        'php5-dev',
-        'php5-gd',
-        'php5-intl',
-        'php5-json',
-        'php5-mcrypt',
-        'php5-mysql',
-        'php5-readline',
-        'php5-sqlite',
+        'php-readline',
+        'php-sqlite3',
     ]:
         ensure  => present,
-        require => Class['::apache::mod::php5'],
+        require => Class['::apache::mod::php'],
     }
 
-    file { '/etc/php5/mods-available':
+    file { '/etc/php/7.0/mods-available':
         ensure  => directory,
         owner   => 'root',
         group   => 'root',
@@ -43,7 +43,7 @@
         purge   => true,
         ignore  => '[^_]*',  # puppet-managed files start w/an underscore
         notify  => Exec['prune_php_ini_files'],
-        require => Package['php5'],
+        require => Package['php'],
     }
 
     exec { 'prune_php_ini_files':
@@ -71,17 +71,13 @@
         settings => {
             'opcache.validate_timestamps' => 'on',
         },
-        require  => Package['php5-apcu']
+        require  => Package['php-apcu']
     }
 
     php::ini { 'opcache_revalidate_freq':
         settings => {
             'opcache.revalidate_freq' => 0,
         },
-        require  => Package['php5-apcu'],
-    }
-
-    class { '::php::sessionclean':
-        require => Package['php5'],
+        require  => Package['php-apcu'],
     }
 }
diff --git a/puppet/modules/php/manifests/remote_debug.pp 
b/puppet/modules/php/manifests/remote_debug.pp
index 6fd0a23..ae787c5 100644
--- a/puppet/modules/php/manifests/remote_debug.pp
+++ b/puppet/modules/php/manifests/remote_debug.pp
@@ -21,7 +21,7 @@
 # See 
https://www.mediawiki.org/wiki/MediaWiki-Vagrant/Advanced_usage#MediaWiki_debugging_using_Xdebug_and_an_IDE_in_your_host
 # for more information.
 class php::remote_debug {
-    package { 'php5-xdebug': }
+    package { 'php-xdebug': }
 
     php::ini { 'remote_debug':
         settings => {
@@ -29,6 +29,6 @@
             'xdebug.remote_enable'       => 1,
             'xdebug.max_nesting_level'   => 200,
         },
-        require  => Package['php5-xdebug'],
+        require  => Package['php-xdebug'],
     }
 }
diff --git a/puppet/modules/php/manifests/sessionclean.pp 
b/puppet/modules/php/manifests/sessionclean.pp
deleted file mode 100644
index f91f604..0000000
--- a/puppet/modules/php/manifests/sessionclean.pp
+++ /dev/null
@@ -1,35 +0,0 @@
-# == Class: php::sessionclean
-#
-# Ubuntu 14.04 ships with a script to clean up stale PHP session files that
-# can under certain circumstances hang indefinitely or consume
-# a dispropotionate amount of system resources. This class backports a newer
-# version of the cleanup script from the Debian upstream which has not yet
-# been backported to Ubunutu 14.04.
-#
-# === Parameters:
-# [*ensure*]
-#   Whether the files should exist. Possible values 'present', 'absent'.
-#
-class php::sessionclean(
-    $ensure,
-) {
-    if !($ensure in ['present', 'absent']) {
-        fail('ensure parameter must be present or absent.')
-    }
-
-  file { '/usr/lib/php5/sessionclean':
-      ensure => $ensure,
-      owner  => 'root',
-      group  => 'root',
-      mode   => '0755',
-      source => 'puppet:///modules/php/sessionclean',
-  }
-
-  file { '/etc/cron.d/php5':
-      ensure => $ensure,
-      owner  => 'root',
-      group  => 'root',
-      mode   => '0644',
-      source => 'puppet:///modules/php/php5.cron.d',
-  }
-}
diff --git a/puppet/modules/php/manifests/xhprof.pp 
b/puppet/modules/php/manifests/xhprof.pp
index fa2f0ae..325f4df 100644
--- a/puppet/modules/php/manifests/xhprof.pp
+++ b/puppet/modules/php/manifests/xhprof.pp
@@ -10,20 +10,17 @@
     $profile_storage_dir,
 ) {
 
-    package { 'php5-xhprof':
+    package { 'php-tideways':
         ensure  => present,
     }
 
     php::ini { 'xhprof_enable':
         settings => {
-            # We don't use php5enmod on the packaged ini because the
-            # default config triggers a deprecation warning due to a #
-            # comment.
-            'extension'         => 'xhprof.so',
             # Not used by the extension directly, used by the
             # XHProf_Runs utility class
             'xhprof.output_dir' => $profile_storage_dir,
-        }
+        },
+        require  => Package['php-tideways'],
     }
 
     # Directory used, by default, to store profile runs
diff --git a/puppet/modules/php/templates/prune_php_ini_files.bash.erb 
b/puppet/modules/php/templates/prune_php_ini_files.bash.erb
index 58dd585..0c9a481 100644
--- a/puppet/modules/php/templates/prune_php_ini_files.bash.erb
+++ b/puppet/modules/php/templates/prune_php_ini_files.bash.erb
@@ -1 +1 @@
-/bin/bash -O globstar -c 'for f in /etc/php5/**/conf.d/*.ini; do (test -r $f 
|| unlink $f;); done' || /bin/true
+/bin/bash -O globstar -c 'for f in /etc/php/7.0/**/conf.d/*.ini; do (test -r 
$f || unlink $f;); done' || /bin/true
diff --git a/puppet/modules/redis/manifests/php.pp 
b/puppet/modules/redis/manifests/php.pp
index 53fb46f..121dbfc 100644
--- a/puppet/modules/redis/manifests/php.pp
+++ b/puppet/modules/redis/manifests/php.pp
@@ -7,7 +7,7 @@
     include redis
     include apache
 
-    package { 'php5-redis':
+    package { 'php-redis':
         ensure  => present,
         require => Service['redis-server'],
         notify  => Service['apache2'],
diff --git a/puppet/modules/role/manifests/fss.pp 
b/puppet/modules/role/manifests/fss.pp
index 58f0579..6b28a6e 100644
--- a/puppet/modules/role/manifests/fss.pp
+++ b/puppet/modules/role/manifests/fss.pp
@@ -7,7 +7,7 @@
 # Commentz-Walter style algorithm for multiple search terms, or a Boyer-Moore
 # algorithm for single search terms.
 #
-# Only needed for php5-based wikis
+# Only needed for php-based wikis
 class role::fss {
-    require_package('php5-fss')
+    require_package('php-fss')
 }
diff --git a/puppet/modules/role/manifests/ldapauth.pp 
b/puppet/modules/role/manifests/ldapauth.pp
index 12d5768..7d04350 100644
--- a/puppet/modules/role/manifests/ldapauth.pp
+++ b/puppet/modules/role/manifests/ldapauth.pp
@@ -17,8 +17,8 @@
     $writer_password,
     $admin_password,
 ) {
-    # Needed for php5 maintenance scripts and if the VM is using role::zend
-    require_package('php5-ldap')
+    # Needed for php maintenance scripts and if the VM is using role::zend
+    require_package('php-ldap')
 
     # This is a lazy short cut so we don't have to pass a bazillion options to
     # create the initial LDIF data.
diff --git a/puppet/modules/role/manifests/mediawiki.pp 
b/puppet/modules/role/manifests/mediawiki.pp
index 27be333..cf506dd 100644
--- a/puppet/modules/role/manifests/mediawiki.pp
+++ b/puppet/modules/role/manifests/mediawiki.pp
@@ -16,7 +16,7 @@
     require ::mysql
     require ::redis
 
-    require_package('php5-tidy')
+    require_package('php-tidy')
     require_package('tidy')
 
     # mailutils depends on default MTA or any MTA.  This way we
diff --git a/puppet/modules/role/manifests/zend.pp 
b/puppet/modules/role/manifests/zend.pp
index 553cfd2..532f1b4 100644
--- a/puppet/modules/role/manifests/zend.pp
+++ b/puppet/modules/role/manifests/zend.pp
@@ -7,7 +7,7 @@
 
     env::alternative { 'zend_as_default_php':
         alternative => 'php',
-        target      => '/usr/bin/php5',
+        target      => '/usr/bin/php7.0',
         priority    => 25,
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/393499
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I33e74217203c037c29d6389c29f367e639131ba3
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org>
Gerrit-Reviewer: Dduvall <dduv...@wikimedia.org>
Gerrit-Reviewer: Ejegg <ej...@ejegg.com>
Gerrit-Reviewer: Legoktm <lego...@member.fsf.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to