Merge pull request #402 from pfrenssen/json-extension-included-php80

Only install the JSON extension on Debian for PHP 7.4 and below
This commit is contained in:
Jeff Geerling 2023-06-12 23:26:36 -05:00 committed by GitHub
commit bd001863bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -15,6 +15,16 @@
php_default_version_debian: "{{ __php_default_version_debian }}"
when: php_default_version_debian is not defined and ansible_os_family == 'Debian'
- name: Define the name of the JSON extension package on Debian for PHP <8.
set_fact:
__php_json_package_debian: "{{ 'php' + php_default_version_debian + '-json' }}"
when: ansible_os_family == 'Debian' and php_default_version_debian is version('8.0', '<')
- name: Add the JSON extension on Debian for PHP <8.
set_fact:
__php_packages: "{{ __php_packages + [__php_json_package_debian] }}"
when: __php_json_package_debian is defined and __php_json_package_debian not in __php_packages
- name: Define php_packages.
set_fact:
php_packages: "{{ __php_packages | list }}"

View File

@ -9,7 +9,6 @@ __php_packages:
- php{{ php_default_version_debian }}-gd
- php{{ php_default_version_debian }}-curl
- php{{ php_default_version_debian }}-imap
- php{{ php_default_version_debian }}-json
- php{{ php_default_version_debian }}-opcache
- php{{ php_default_version_debian }}-xml
- php{{ php_default_version_debian }}-mbstring