Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix php::fpm eternal reload for mysqli a simplexml extension #503

Merged
merged 12 commits into from
Feb 12, 2019
6 changes: 6 additions & 0 deletions manifests/extension.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# [*package_prefix*]
# Prefix to prepend to the package name for the package provider
#
# [*package_name*]
# Full package name for the package provider (e.g. php7.2-xml for
# simlexml extension)
#
# [*provider*]
# The provider used to install the package
# Could be "pecl", "apt", "dpkg" or any other OS package provider
Expand Down Expand Up @@ -74,6 +78,7 @@
Optional[String] $ini_prefix = undef,
Optional[String] $php_api_version = undef,
String $package_prefix = $php::package_prefix,
Optional[String[1]] $package_name = undef,
Boolean $zend = false,
Variant[Hash, Hash[String, Hash]] $settings = {},
Boolean $multifile_settings = false,
Expand All @@ -95,6 +100,7 @@
source => $source,
responsefile => $responsefile,
package_prefix => $package_prefix,
package_name => $package_name,
header_packages => $header_packages,
compiler_packages => $compiler_packages,
install_options => $install_options,
Expand Down
10 changes: 9 additions & 1 deletion manifests/extension/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# [*package_prefix*]
# Prefix to prepend to the package name for the package provider
#
# [*package_name*]
# Full package name for the package provider (e.g. php7.2-xml for
# simlexml extension)
#
# [*provider*]
# The provider used to install the package
# Could be "pecl", "apt", "dpkg" or any other OS package provider
Expand Down Expand Up @@ -38,6 +42,7 @@
Optional[Php::Provider] $provider = undef,
Optional[String] $source = undef,
String $package_prefix = $php::package_prefix,
Optional[String[1]] $package_name = undef,
Optional[Stdlib::AbsolutePath] $responsefile = undef,
Variant[String, Array[String]] $header_packages = [],
Variant[String, Array[String]] $compiler_packages = $php::params::compiler_packages,
Expand Down Expand Up @@ -72,7 +77,10 @@
}

default: {
$real_package = "${package_prefix}${title}"
$real_package = $package_name ? {
undef => "${package_prefix}${title}",
default => $package_name,
}
$package_require = undef
}
}
Expand Down
13 changes: 12 additions & 1 deletion spec/acceptance/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@
case default[:platform]
when %r{ubuntu-18.04}, %r{ubuntu-16.04}, %r{ubuntu-14.04}
it 'works with defaults' do
case default[:platform]
when %r{ubuntu-18.04}
simplexmlpackagename = 'php7.2-xml'
when %r{ubuntu-16.04}
simplexmlpackagename = 'php7.0-xml'
when %r{ubuntu-14.04}
simplexmlpackagename = 'php-xml'
end
pp = <<-EOS
class{'php':
extensions => {
Expand All @@ -45,7 +53,10 @@
package_prefix => 'php-',
settings => {
extension => undef
}
},
}
bastelfreak marked this conversation as resolved.
Show resolved Hide resolved
'simplexml' => {
package_name => simplexmlpackagename,
bastelfreak marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
Expand Down