Skip to content

Commit

Permalink
Merge pull request #9 from hfm/php72
Browse files Browse the repository at this point in the history
Support PHP 7.2
  • Loading branch information
hfm authored Nov 30, 2017
2 parents 6019e7d + fa1d28f commit 319ba2b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 4 deletions.
56 changes: 56 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,30 @@
$remi_php71_test_debuginfo_enabled = 0,
$remi_php71_test_debuginfo_includepkgs = undef,
$remi_php71_test_debuginfo_exclude = undef,

$remi_php72_baseurl = absent,
$remi_php72_mirrorlist = "http://rpms.remirepo.net/enterprise/${::operatingsystemmajrelease}/php72/mirror",
$remi_php72_enabled = 0,
$remi_php72_includepkgs = undef,
$remi_php72_exclude = undef,

$remi_php72_debuginfo_baseurl = "http://rpms.remirepo.net/enterprise/${::operatingsystemmajrelease}/debug-php72/\$basearch/",
$remi_php72_debuginfo_mirrorlist = absent,
$remi_php72_debuginfo_enabled = 0,
$remi_php72_debuginfo_includepkgs = undef,
$remi_php72_debuginfo_exclude = undef,

$remi_php72_test_baseurl = absent,
$remi_php72_test_mirrorlist = "http://rpms.remirepo.net/enterprise/${::operatingsystemmajrelease}/test72/mirror",
$remi_php72_test_enabled = 0,
$remi_php72_test_includepkgs = undef,
$remi_php72_test_exclude = undef,

$remi_php72_test_debuginfo_baseurl = "http://rpms.remirepo.net/enterprise/${::operatingsystemmajrelease}/debug-test72/\$basearch/",
$remi_php72_test_debuginfo_mirrorlist = absent,
$remi_php72_test_debuginfo_enabled = 0,
$remi_php72_test_debuginfo_includepkgs = undef,
$remi_php72_test_debuginfo_exclude = undef,
){

if $use_epel {
Expand Down Expand Up @@ -298,6 +322,38 @@
enabled => $remi_php71_test_debuginfo_enabled,
includepkgs => $remi_php71_test_debuginfo_includepkgs,
exclude => $remi_php71_test_debuginfo_exclude;

'remi-php72':
descr => "Remi's PHP 7.2 RPM repository for Enterprise Linux ${::operatingsystemmajrelease} - \$basearch",
baseurl => $remi_php72_baseurl,
mirrorlist => $remi_php72_mirrorlist,
enabled => $remi_php72_enabled,
includepkgs => $remi_php72_includepkgs,
exclude => $remi_php72_exclude;

'remi-php72-debuginfo':
descr => "Remi's PHP 7.2 RPM repository for Enterprise Linux ${::operatingsystemmajrelease} - \$basearch - debuginfo",
baseurl => $remi_php72_debuginfo_baseurl,
mirrorlist => $remi_php72_debuginfo_mirrorlist,
enabled => $remi_php72_debuginfo_enabled,
includepkgs => $remi_php72_debuginfo_includepkgs,
exclude => $remi_php72_debuginfo_exclude;

'remi-php72-test':
descr => "Remi's PHP 7.2 test RPM repository for Enterprise Linux ${::operatingsystemmajrelease} - \$basearch",
baseurl => $remi_php72_test_baseurl,
mirrorlist => $remi_php72_test_mirrorlist,
enabled => $remi_php72_test_enabled,
includepkgs => $remi_php72_test_includepkgs,
exclude => $remi_php72_test_exclude;

'remi-php72-test-debuginfo':
descr => "Remi's PHP 7.2 test RPM repository for Enterprise Linux ${::operatingsystemmajrelease} - \$basearch - debuginfo",
baseurl => $remi_php72_test_debuginfo_baseurl,
mirrorlist => $remi_php72_test_debuginfo_mirrorlist,
enabled => $remi_php72_test_debuginfo_enabled,
includepkgs => $remi_php72_test_debuginfo_includepkgs,
exclude => $remi_php72_test_debuginfo_exclude;
}
}
} else {
Expand Down
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
"tags": [
"remi",
"rpm",
"repository"
"repository",
"php"
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">=3.0.0 < 5.0.0"
"version_requirement": ">=3.0.0 < 6.0.0"
}
],
"dependencies": [
Expand Down
8 changes: 6 additions & 2 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
package { 'php':
ensure => installed,
install_options => ['--enablerepo=remi-php71'],
install_options => ['--enablerepo=remi-php72,remi-safe'],
}
EOS
end
Expand Down Expand Up @@ -50,6 +50,10 @@
remi-php71-debuginfo
remi-php71-test
remi-php71-test-debuginfo
remi-php72
remi-php72-debuginfo
remi-php72-test
remi-php72-test-debuginfo
).each do |repo|
describe yumrepo(repo) do
it { should exist }
Expand All @@ -62,6 +66,6 @@
end

describe command('php -v') do
its(:stdout) { should match /^PHP 7.1.\d+/ }
its(:stdout) { should match /^PHP 7.2.\d+/ }
end
end

0 comments on commit 319ba2b

Please sign in to comment.