Skip to content
This repository was archived by the owner on Oct 11, 2018. It is now read-only.

Commit 970f2a8

Browse files
committed
more php7 fixes
1 parent f8bd80f commit 970f2a8

File tree

10 files changed

+41
-41
lines changed

10 files changed

+41
-41
lines changed

docs/examples.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ FPM
8484
create_resources('php::fpm::pool', hiera_hash('php_fpm_pool', {}))
8585
create_resources('php::fpm::config', hiera_hash('php_fpm_config', {}))
8686
87-
Php::Extension <| |> ~> Service['php5-fpm']
87+
Php::Extension <| |> ~> Service['php7.0-fpm']
8888
89-
exec { "restart-php5-fpm":
90-
command => "service php5-fpm restart",
89+
exec { "restart-php7.0-fpm":
90+
command => "service php7.0-fpm restart",
9191
schedule => hourly
9292
}
9393

docs/sapi.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Installs the ``mod_php`` PHP SAPI for apache.
2626

2727
* ``$package`` defaults to ``libapache2-mod-php5``.
2828

29-
* ``$inifile`` defaults to ``/etc/php5/apache2/php.ini``.
29+
* ``$inifile`` defaults to ``/etc/php/7.0/apache2/php.ini``.
3030

3131
* ``$service_name`` defaults to ``apache2``.
3232

@@ -40,11 +40,11 @@ php::fpm
4040

4141
Installs the ``FPM`` PHP SAPI.
4242

43-
* ``$package`` defaults to ``php5-fpm``.
43+
* ``$package`` defaults to ``php7.0-fpm``.
4444

45-
* ``$inifile`` defaults to ``/etc/php5/fpm/php.ini``.
45+
* ``$inifile`` defaults to ``/etc/php/7.0/fpm/php.ini``.
4646

47-
* ``$service_name`` defaults to ``php5-fpm``.
47+
* ``$service_name`` defaults to ``php7.0-fpm``.
4848

4949
* ``$service_ensure`` defaults to ``running``.
5050

@@ -60,5 +60,5 @@ Installs the ``CLI`` PHP SAPI.
6060

6161
* ``$package`` defaults to ``php5-cli``.
6262

63-
* ``$inifile`` defaults to ``/etc/php5/cli/php.ini``.
63+
* ``$inifile`` defaults to ``/etc/php/7.0/cli/php.ini``.
6464

manifests/apache/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
$ensure = $php::params::ensure
4444
$package = 'libapache2-mod-php5'
4545
$provider = undef
46-
$inifile = '/etc/php5/apache2/php.ini'
46+
$inifile = '/etc/php/7.0/apache2/php.ini'
4747
$settings = [ ]
4848

4949
$service_name = 'apache2'

manifests/extension/ldap/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
$ensure = $php::params::ensure
4444
$package = 'php5-ldap'
4545
$provider = undef
46-
$inifile = '/etc/php5/conf.d/20-ldap.ini'
46+
$inifile = '/etc/php/7.0/conf.d/20-ldap.ini'
4747
$settings = []
4848
}

manifests/fpm.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
#
1111
# [*package*]
1212
# The package name for fpm package
13-
# For debian it's php5-fpm
13+
# For debian it's php7.0-fpm
1414
#
1515
# [*provider*]
16-
# The provider used to install php5-fpm
16+
# The provider used to install php7.0-fpm
1717
# Could be "pecl", "apt" or any other OS package provider
1818
#
1919
# [*inifile*]
20-
# The path to the ini php5-fpm ini file
20+
# The path to the ini php7.0-fpm ini file
2121
#
2222
# [*settings*]
2323
# Hash with 'set' nested hash of key => value
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require 'spec_helper'
22

33
describe 'php::fpm::package', :type => :class do
4-
context 'with package_name => php5-fpm' do
5-
let(:params) { {:package_name => 'php5-fpm', :package_ensure => 'installed'} }
6-
it { should contain_package('php5-fpm') }
4+
context 'with package_name => php7.0-fpm' do
5+
let(:params) { {:package_name => 'php7.0-fpm', :package_ensure => 'installed'} }
6+
it { should contain_package('php7.0-fpm') }
77
end
88
end

spec/classes/fpm_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe 'php::fpm', :type => :class do
44
it { should contain_class('php::fpm::package') }
5-
it { should contain_class('php::fpm::service').that_requires('Package[php5-fpm]') }
6-
it { should contain_php__fpm__config('php-fpm').that_requires('Package[php5-fpm]') }
7-
it { should contain_file('/etc/php5/fpm/php-fpm.conf').that_requires('Package[php5-fpm]') }
5+
it { should contain_class('php::fpm::service').that_requires('Package[php7.0-fpm]') }
6+
it { should contain_php__fpm__config('php-fpm').that_requires('Package[php7.0-fpm]') }
7+
it { should contain_file('/etc/php/7.0/fpm/php-fpm.conf').that_requires('Package[php7.0-fpm]') }
88
end

spec/classes/xdebug_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
it { should contain_augeas("php-php-extension-xdebug-config")
1212
.with({
13-
:incl => '/etc/php5/mods-available/xdebug.ini',
13+
:incl => '/etc/php/7.0/mods-available/xdebug.ini',
1414
})
1515
}
1616
end
@@ -20,7 +20,7 @@
2020

2121
it { should contain_augeas("php-php-extension-xdebug-config")
2222
.with({
23-
:incl => '/etc/php5/conf.d/xdebug.ini',
23+
:incl => '/etc/php/7.0/conf.d/xdebug.ini',
2424
})
2525
}
2626
end
@@ -30,7 +30,7 @@
3030

3131
it { should contain_augeas("php-php-extension-xdebug-config")
3232
.with({
33-
:incl => '/etc/php5/mods-available/xdebug.ini',
33+
:incl => '/etc/php/7.0/mods-available/xdebug.ini',
3434
})
3535
}
3636
end
@@ -40,7 +40,7 @@
4040

4141
it { should contain_augeas("php-php-extension-xdebug-config")
4242
.with({
43-
:incl => '/etc/php5/mods-available/xdebug.ini',
43+
:incl => '/etc/php/7.0/mods-available/xdebug.ini',
4444
})
4545
}
4646
end
@@ -50,19 +50,19 @@
5050

5151
it { should contain_augeas("php-php-extension-xdebug-config")
5252
.with({
53-
:incl => '/etc/php5/mods-available/xdebug.ini',
53+
:incl => '/etc/php/7.0/mods-available/xdebug.ini',
5454
})
5555
}
5656
end
57-
57+
5858
context 'with php 5.5.11-1~dotdeb.1' do
5959
let(:facts) { { :php_version => '5.5'} }
6060

6161
it { should contain_augeas("php-php-extension-xdebug-config")
6262
.with({
63-
:incl => '/etc/php5/mods-available/xdebug.ini',
63+
:incl => '/etc/php/7.0/mods-available/xdebug.ini',
6464
})
6565
}
6666
end
67-
67+
6868
end

spec/defines/config_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
context 'default config' do
66
let(:title) { 'unique-name' }
77
let(:params) {{
8-
:file => '/etc/php5/conf.d/unique-name.ini',
8+
:file => '/etc/php/7.0/conf.d/unique-name.ini',
99
:config => []
1010
}}
1111

1212
it { should contain_augeas("php-unique-name-config")
1313
.with({
14-
:incl => '/etc/php5/conf.d/unique-name.ini',
14+
:incl => '/etc/php/7.0/conf.d/unique-name.ini',
1515
:changes => [],
1616
:load_path => '/usr/share/augeas/lenses/contrib',
1717
:lens => 'PHP.lns'
@@ -22,20 +22,20 @@
2222
context 'simple example' do
2323
let(:title) { 'unique-name' }
2424
let(:params) {{
25-
:file => '/etc/php5/conf.d/unique-name.ini',
25+
:file => '/etc/php/7.0/conf.d/unique-name.ini',
2626
:config => [
2727
'set .anon/apc.enabled 1'
2828
]
2929
}}
3030

31-
it { should contain_php__config('unique-name').with({'file' => '/etc/php5/conf.d/unique-name.ini'})}
31+
it { should contain_php__config('unique-name').with({'file' => '/etc/php/7.0/conf.d/unique-name.ini'})}
3232
it { should contain_augeas("php-unique-name-config").with({'changes' => "set .anon/apc.enabled 1"})}
3333
end
3434

3535
context 'invalid config (string)' do
3636
let(:title) { 'unique-name' }
3737
let(:params) {{
38-
:file => '/etc/php5/conf.d/unique-name.ini',
38+
:file => '/etc/php/7.0/conf.d/unique-name.ini',
3939
:config => 'hello world'
4040
}}
4141

spec/defines/fpm_config_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@
88
context 'valid config' do
99
let(:title) { 'unique-name' }
1010
let(:params) {{
11-
:file => '/etc/php5/fpm/conf.d/unique-name.ini',
11+
:file => '/etc/php/7.0/fpm/conf.d/unique-name.ini',
1212
:config => ['set .anon/apc.enabled 1'],
1313
}}
1414

1515
it { should contain_php__fpm__config('unique-name')
1616
.with({
17-
'file' => '/etc/php5/fpm/conf.d/unique-name.ini',
17+
'file' => '/etc/php/7.0/fpm/conf.d/unique-name.ini',
1818
'config' => ['set .anon/apc.enabled 1']
1919
})
2020
}
2121

2222
it { should contain_php__config('unique-name')
2323
.with({
24-
'file' => '/etc/php5/fpm/conf.d/unique-name.ini',
24+
'file' => '/etc/php/7.0/fpm/conf.d/unique-name.ini',
2525
'config' => ['set .anon/apc.enabled 1'],
26-
'notify' => 'Service[php5-fpm]',
26+
'notify' => 'Service[php7.0-fpm]',
2727
})
2828
}
2929

3030
it { should contain_augeas("php-fpm-unique-name-config")
3131
.with({
32-
'incl' => '/etc/php5/fpm/conf.d/unique-name.ini',
32+
'incl' => '/etc/php/7.0/fpm/conf.d/unique-name.ini',
3333
'changes' => "set .anon/apc.enabled 1"
3434
})
3535
}
@@ -39,7 +39,7 @@
3939
context 'invalid config (string)' do
4040
let(:title) { 'unique-name' }
4141
let(:params) {{
42-
:file => '/etc/php5/fpm/conf.d/unique-name.ini',
42+
:file => '/etc/php/7.0/fpm/conf.d/unique-name.ini',
4343
:config => 'hello world'
4444
}}
4545

@@ -51,13 +51,13 @@
5151

5252
it { should contain_php__config('upload_max_filesize=20M').with({
5353
'ensure' => 'present',
54-
'file' => '/etc/php5/fpm/php.ini',
54+
'file' => '/etc/php/7.0/fpm/php.ini',
5555
'section' => 'PHP',
5656
} )}
5757

58-
it { should contain_ini_setting('upload_max_filesize=20M in /etc/php5/fpm/php.ini').with({
58+
it { should contain_ini_setting('upload_max_filesize=20M in /etc/php/7.0/fpm/php.ini').with({
5959
'ensure' => 'present',
60-
'path' => '/etc/php5/fpm/php.ini',
60+
'path' => '/etc/php/7.0/fpm/php.ini',
6161
'section' => 'PHP',
6262
'setting' => 'upload_max_filesize',
6363
'value' => '20M',

0 commit comments

Comments
 (0)