Skip to content

Commit

Permalink
master php: add version 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
daniwe4 committed Sep 26, 2024
1 parent c326071 commit e611c40
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class App extends Application
{
const NAME = "Doil Version 20240902 - build 2024-09-02";
const NAME = "Doil Version 20240926 - build 2024-09-26";

public function __construct(Command ...$commands)
{
Expand Down
2 changes: 2 additions & 0 deletions setup/stack/config/master.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,8 @@ file_roots:
- /srv/salt/states/php8.1
php8.2:
- /srv/salt/states/php8.2
php8.3:
- /srv/salt/states/php8.3
ilias:
- /srv/salt/states/ilias
compile-skins:
Expand Down
1 change: 1 addition & 0 deletions setup/stack/states/php8.3/description.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
description = Enables php version 8.3. Disables other php versions.
100 changes: 100 additions & 0 deletions setup/stack/states/php8.3/php/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
apt_https:
pkg.installed:
- name: software-properties-common

php_repo_list:
cmd.run:
- name: echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
- unless: test -f /etc/apt/sources.list.d/php.list

php_repo_key:
cmd.run:
- name: wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
- unless: test -f /etc/apt/trusted.gpg.d/php.gpg

php8.3:
pkg.installed:
- refresh: True
- skip_verify: True
- pkgs:
- libapache2-mod-php8.3
- php-json
- php8.3-apcu
- php8.3-bcmath
- php8.3-cli
- php8.3-curl
- php8.3-gd
- php8.3-imap
- php8.3-mbstring
- php8.3-mysql
- php8.3-opcache
- php8.3-readline
- php8.3-soap
- php8.3-xml
- php8.3-xmlrpc
- php8.3-xsl
- php8.3-zip
- php8.3-imagick

{% for version in ['7.0','7.1','7.2','7.3','7.4','8.0','8.1','8.2'] %}
php{{ version }}:
pkg.purged:
- refresh: True
- pkgs:
- libapache2-mod-php{{ version }}
- php{{ version }}-apcu
- php{{ version }}-bcmath
- php{{ version }}-cli
- php{{ version }}-common
- php{{ version }}-curl
- php{{ version }}-gd
- php{{ version }}-imap
- php{{ version }}-json
- php{{ version }}-mbstring
- php{{ version }}-mysql
- php{{ version }}-opcache
- php{{ version }}-readline
- php{{ version }}-soap
- php{{ version }}-xml
- php{{ version }}-xmlrpc
- php{{ version }}-xsl
- php{{ version }}-zip
- php{{ version }}-imagick
{% endfor %}

ini_filesize_apache2:
cmd.run:
- name: sed -i "/upload_max_filesize*/c upload_max_filesize = 4096M" /etc/php/8.3/apache2/php.ini

ini_filesize_cli:
cmd.run:
- name: sed -i "/upload_max_filesize*/c upload_max_filesize = 4096M" /etc/php/8.3/cli/php.ini

ini_postmax_apache2:
cmd.run:
- name: sed -i "/post_max_size*/c post_max_size = 4096M" /etc/php/8.3/apache2/php.ini

ini_postmax_cli:
cmd.run:
- name: sed -i "/post_max_size*/c post_max_size = 4096M" /etc/php/8.3/cli/php.ini

ini_max_execution_time_apache2:
cmd.run:
- name: sed -i "/max_execution_time*/c max_execution_time = 3600" /etc/php/8.3/apache2/php.ini

ini_max_execution_time_cli:
cmd.run:
- name: sed -i "/max_execution_time*/c max_execution_time = 3600" /etc/php/8.3/cli/php.ini

a2_enable_php:
module.run:
- name: apache.a2enmod
- mod: php8.3

update_alternatives_php:
cmd.run:
- name: update-alternatives --set php /usr/bin/php8.3 &>/dev/null

apache2_supervisor_signal:
cmd.run:
- name: supervisorctl restart apache2
3 changes: 3 additions & 0 deletions setup/stack/states/php8.3/top.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
php8.3:
'*':
- php
7 changes: 7 additions & 0 deletions setup/updates/update-20240926.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

doil_update_20240926() {
cp -r ${SCRIPT_DIR}/../app/src/* /usr/local/lib/doil/app/src/
cp -r ${SCRIPT_DIR}/../setup/stack/* /usr/local/share/doil/stack/
return $?
}

0 comments on commit e611c40

Please sign in to comment.