Skip to content

Commit a1a68fa

Browse files
committed
Fix enabling of zend extensions
1 parent 691df11 commit a1a68fa

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

manifests/extension/config.pp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,21 @@
112112

113113
if $facts['os']['family'] == 'Debian' and $ext_tool_enabled {
114114
$cmd = "${ext_tool_enable} -s ${sapi} ${so_name}"
115+
$execname = "ext_tool_enable_${so_name}"
115116

116117
$_sapi = $sapi? {
117118
'ALL' => 'cli',
118119
default => $sapi,
119120
}
120-
if has_key($final_settings, 'extension') and $final_settings[extension] {
121-
exec { $cmd:
121+
if has_key($final_settings, $extension_key) and $final_settings[$extension_key] {
122+
exec { $execname:
123+
command => $cmd,
122124
onlyif => "${ext_tool_query} -s ${_sapi} -m ${so_name} | /bin/grep 'No module matches ${so_name}'",
123125
require => ::Php::Config[$title],
124126
}
125127

126128
if $php::fpm {
127-
Package[$php::fpm::package] ~> Exec[$cmd]
129+
Package[$php::fpm::package] ~> Exec[$execname]
128130
}
129131
}
130132
}

spec/defines/extension_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,20 @@
189189
it { is_expected.to contain_php__config('xdebug').with_config('zend_extension' => '/usr/lib/php5/20100525/xdebug.so') }
190190
end
191191

192+
if facts[:os]['family'] == 'Debian'
193+
context 'on Debian family' do
194+
context 'zend extensions call ext_tool_enable' do
195+
let(:title) { 'xdebug' }
196+
let(:params) do
197+
{
198+
zend: true
199+
}
200+
end
201+
it { is_expected.to contain_exec('ext_tool_enable_xdebug') }
202+
end
203+
end
204+
end
205+
192206
case facts[:os]['name']
193207
when 'Debian'
194208
context 'on Debian' do

0 commit comments

Comments
 (0)