Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Classes

* [`php`](#php): Base class with global configuration parameters that pulls in all enabled components. === Parameters [*ensure*] Specify which version of
* [`php`](#php): Base class with global configuration parameters that pulls in all enabled components. === Parameters [*ensure*] Specify which version of
* [`php::apache_config`](#php--apache_config): Install and configure php apache settings === Parameters [*inifile*] The path to the ini php-apache ini file [*settings*] Hash with ne
* [`php::cli`](#php--cli): Install and configure php CLI === Parameters [*inifile*] The path to the ini php5-cli ini file [*settings*] Hash with nested hash of k
* [`php::composer`](#php--composer): Install composer package manager === Parameters [*source*] Holds URL to the Composer source file [*path*] Holds path to the Composer e
Expand All @@ -15,16 +15,16 @@
* [`php::embedded`](#php--embedded): Install and configure php embedded SAPI === Parameters [*inifile*] The path to the ini php5-embeded ini file [*settings*] Hash with ne
* [`php::fpm`](#php--fpm): Install and configure mod_php for fpm === Parameters [*user*] The user that php-fpm should run as [*group*] The group that php-fpm sho
* [`php::fpm::config`](#php--fpm--config): Configure php-fpm service === Parameters [*config_file*] The path to the fpm config file [*user*] The user that runs php-fpm [*group*
* [`php::fpm::service`](#php--fpm--service): Manage fpm service === Parameters [*service_name*] name of the php-fpm service [*ensure*] 'ensure' value for the service [*enable*]
* [`php::fpm::service`](#php--fpm--service): Manage fpm service === Parameters [*service_name*] name of the php-fpm service [*ensure*] 'ensure' value for the service [*enable*]
* [`php::global`](#php--global)
* [`php::globals`](#php--globals)
* [`php::packages`](#php--packages): Install common PHP packages === Parameters [*ensure*] Specify which version of PHP packages to install [*names*] List of the names of
* [`php::packages`](#php--packages): Install common PHP packages === Parameters [*ensure*] Specify which version of PHP packages to install [*names*] List of the names of
* [`php::params`](#php--params): PHP params class
* [`php::pear`](#php--pear): Install PEAR package manager === Parameters [*ensure*] The package ensure of PHP pear to install and run pear auto_discover [*package*]
* [`php::pear`](#php--pear): Install PEAR package manager === Parameters [*ensure*] The package ensure of PHP pear to install and run pear auto_discover [*package*]
* [`php::phpunit`](#php--phpunit): Install phpunit, PHP testing framework === Parameters [*source*] Holds URL to the phpunit source file [*path*] Holds path to the phpun
* [`php::phpunit::auto_update`](#php--phpunit--auto_update): Install phpunit package manager === Parameters [*max_age*] Defines number of days after which phpunit should be updated [*source*] Hol
* [`php::repo`](#php--repo): Configure package repository
* [`php::repo::debian`](#php--repo--debian): Configure debian apt repo === Parameters [*location*] Location of the apt repository [*repos*] Apt repository names [*include_src*]
* [`php::repo::debian`](#php--repo--debian): Configure debian apt repo === Parameters [*location*] Location of the apt repository [*repos*] Apt repository names [*include_src*]
* [`php::repo::redhat`](#php--repo--redhat)
* [`php::repo::suse`](#php--repo--suse): Configure suse repo === Parameters [*reponame*] Name of the Zypper repository [*baseurl*] Base URL of the Zypper repository
* [`php::repo::ubuntu`](#php--repo--ubuntu): Configure ubuntu ppa === Parameters [*version*] PHP version to manage (e.g. 5.6)
Expand All @@ -33,8 +33,8 @@

* [`php::apache_vhost`](#php--apache_vhost): Configures an apache vhost for php === Parameters [*vhost*] The vhost address [*docroot*] The vhost docroot [*port*] The vhost port
* [`php::config`](#php--config): Configure php.ini settings for a PHP SAPI === Parameters [*file*] The path to ini file [*config*] Nested hash of key => value to apply
* [`php::config::setting`](#php--config--setting): Configure php.ini settings === Parameters [*key*] The key of the value, like `ini_setting` [*file*] The path to ini file [*value*]
* [`php::extension`](#php--extension): Install a PHP extension package === Parameters [*ensure*] The ensure of the package to install Could be "present", "absent", "latest",
* [`php::config::setting`](#php--config--setting): Configure php.ini settings === Parameters [*key*] The key of the value, like `ini_setting` [*file*] The path to ini file [*value*]
* [`php::extension`](#php--extension): Install a PHP extension package === Parameters [*ensure*] The ensure of the package to install Could be "present", "absent", "latest",
* [`php::extension::config`](#php--extension--config): Configure a PHP extension package === Parameters [*ensure*] The ensure of the package to install Could be "latest", "installed" or a pi
* [`php::extension::install`](#php--extension--install): Install a PHP extension package === Parameters [*ensure*] The ensure of the package to install Could be "latest", "installed" or a pinn
* [`php::fpm::pool`](#php--fpm--pool): Configure fpm pools === Parameters See the official php-fpm documentation for parameters that are not documented here: http://php.net/manua
Expand Down Expand Up @@ -3320,4 +3320,3 @@ Alias of `Enum['none', 'pecl', 'pear', 'dpkg', 'apt', 'yum', 'rpm', 'dnf', 'up2d
The Php::Sapi data type.

Alias of `Enum['ALL', 'cli', 'fpm', 'apache2']`

1 change: 1 addition & 0 deletions manifests/globals.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'Ubuntu' => $facts['os']['release']['major'] ? {
'22.04' => '8.1',
'24.04' => '8.3',
'26.04' => '8.5',
default => fail("Unsupported Ubuntu release: ${fact('os.release.major')}"),
},
default => '5.x',
Expand Down
3 changes: 2 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"22.04",
"24.04"
"24.04",
"26.04"
]
},
{
Expand Down
10 changes: 8 additions & 2 deletions spec/acceptance/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
'php8.1-fpm'
when %r{ubuntu-24.04}
'php8.3-fpm'
when %r{ubuntu-26.04}
'php8.5-fpm'
when %r{ubuntu-18.04}
'php7.2-fpm'
when %r{debian-10}
Expand All @@ -41,9 +43,11 @@

context 'default parameters with extensions' do
case default[:platform]
when %r{ubuntu-24.04}, %r{ubuntu-22.04}, %r{ubuntu-20.04}, %r{ubuntu-18.04}
when %r{ubuntu-26.04}, %r{ubuntu-24.04}, %r{ubuntu-22.04}, %r{ubuntu-20.04}, %r{ubuntu-18.04}
it 'works with defaults' do
case default[:platform]
when %r{ubuntu-26.04}
simplexmlpackagename = 'php8.5-xml'
when %r{ubuntu-24.04}
simplexmlpackagename = 'php8.3-xml'
when %r{ubuntu-22.04}
Expand All @@ -58,7 +62,7 @@
extensions => {
'intl' => {},
'gd' => {},
'net-url' => {
'net-url2' => {
package_prefix => 'php-',
},
'simplexml' => {
Expand Down Expand Up @@ -94,6 +98,8 @@
'php8.1-fpm'
when %r{ubuntu-24.04}
'php8.3-fpm'
when %r{ubuntu-26.04}
'php8.5-fpm'
when %r{ubuntu-18.04}
'php7.2-fpm'
when %r{debian-10}
Expand Down
2 changes: 2 additions & 0 deletions spec/classes/php_fpm_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
it { is_expected.to contain_service('php8.1-fpm').with_ensure('running') }
when '24.04'
it { is_expected.to contain_service('php8.3-fpm').with_ensure('running') }
when '26.04'
it { is_expected.to contain_service('php8.5-fpm').with_ensure('running') }
when '10'
it { is_expected.to contain_service('php7.3-fpm').with_ensure('running') }
when '20.04', '11'
Expand Down
3 changes: 3 additions & 0 deletions spec/classes/php_fpm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
when '24.04'
it { is_expected.to contain_package('php8.3-fpm').with_ensure('present') }
it { is_expected.to contain_service('php8.3-fpm').with_ensure('running') }
when '26.04'
it { is_expected.to contain_package('php8.5-fpm').with_ensure('present') }
it { is_expected.to contain_service('php8.5-fpm').with_ensure('running') }
when '20.04', '11'
it { is_expected.to contain_package('php7.4-fpm').with_ensure('present') }
it { is_expected.to contain_service('php7.4-fpm').with_ensure('running') }
Expand Down
8 changes: 7 additions & 1 deletion spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => 'php8.5-cli',
'24.04' => 'php8.3-cli',
'22.04' => 'php8.1-cli',
}[facts[:os]['release']['major']]
Expand All @@ -31,6 +32,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => 'php8.5-fpm',
'24.04' => 'php8.3-fpm',
'22.04' => 'php8.1-fpm',
}[facts[:os]['release']['major']]
Expand All @@ -44,6 +46,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => 'php8.5-dev',
'24.04' => 'php8.3-dev',
'22.04' => 'php8.1-dev',
}[facts[:os]['release']['major']]
Expand Down Expand Up @@ -157,6 +160,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => '/etc/php/8.5/fpm/pool.d/www.conf',
'24.04' => '/etc/php/8.3/fpm/pool.d/www.conf',
'22.04' => '/etc/php/8.1/fpm/pool.d/www.conf',
}[facts[:os]['release']['major']]
Expand Down Expand Up @@ -191,6 +195,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => '/etc/php/8.5/fpm/pool.d/www.conf',
'24.04' => '/etc/php/8.3/fpm/pool.d/www.conf',
'22.04' => '/etc/php/8.1/fpm/pool.d/www.conf',
}[facts[:os]['release']['major']]
Expand Down Expand Up @@ -232,6 +237,7 @@
}[facts[:os]['release']['major']]
when 'Ubuntu'
{
'26.04' => '/etc/php/8.5/fpm/pool.d/www.conf',
'24.04' => '/etc/php/8.3/fpm/pool.d/www.conf',
'22.04' => '/etc/php/8.1/fpm/pool.d/www.conf',
}[facts[:os]['release']['major']]
Expand Down Expand Up @@ -262,7 +268,7 @@
end

# https://portal.perforce.com/s/article/Zend-Support-Lifecycle
if (facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'].to_i < 10) || facts[:os]['name'] == 'Ubuntu' || (facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i < 12)
if (facts[:os]['family'] == 'RedHat' && facts[:os]['release']['major'].to_i < 10) || (facts[:os]['name'] == 'Ubuntu' && facts[:os]['release']['major'].to_i < 26) || (facts[:os]['name'] == 'Debian' && facts[:os]['release']['major'].to_i < 12)
describe 'when called with flavor zend' do
zendphp_cli_package = case facts[:os]['name']
when 'Debian', 'Ubuntu'
Expand Down
2 changes: 2 additions & 0 deletions spec/defines/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
end
when 'Ubuntu'
case facts[:os]['release']['major']
when '26.04'
['/etc/php/8.5/mods-available', '/etc/php/8.5/apache2/conf.d']
when '24.04'
['/etc/php/8.3/mods-available', '/etc/php/8.3/apache2/conf.d']
when '22.04'
Expand Down
2 changes: 2 additions & 0 deletions spec/defines/fpm_pool_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
let(:params) { {} }

case facts[:os]['release']['major']
when '26.04'
it { is_expected.to contain_file('/etc/php/8.5/fpm/pool.d/unique-name.conf') }
when '24.04'
it { is_expected.to contain_file('/etc/php/8.3/fpm/pool.d/unique-name.conf') }
when '22.04'
Expand Down
Loading