PHP7 now suports Xdebug

freebsd
Emilien Mantel 2016-02-27 12:38:34 +01:00
parent 089fd3bbb4
commit dfa55e3cb6
3 changed files with 16 additions and 5 deletions

View File

@ -33,10 +33,9 @@
- php_ini
- php_ini_cli
# Note: Xdebug is not packaged on PHP7.0
- name: INCLUDE | Xdebug
include: xdebug.yml
when: php_install_xdebug and php_version == 5
when: php_install_xdebug
- name: APT | Install and configure opcache
include: opcache.yml

View File

@ -1,13 +1,21 @@
---
- name: APT | Install php-xdebug
apt: pkg=php5-xdebug state=latest update_cache=yes cache_valid_time=3600
apt: >
pkg="{{ php_apt_prefix }}xdebug"
state=latest
update_cache=yes
cache_valid_time=3600
- name: SHELL | Get Xdebug version
shell: dpkg -l | awk '$2 ~ /^php5-xdebug$/ { print $3 }'
shell: dpkg -l | awk '$2 ~ /xdebug$/ { print $3 }'
changed_when: false
register: xdebug_version
- name: TEMPLATE | Deploy module configurations
template: src=etc/php5/mods-available/xdebug.ini.j2 dest=/etc/php5/mods-available/xdebug.ini owner=root mode=0644
template: >
src=etc/__php__/mods-available/xdebug.ini.j2
dest={{ php_mods_dir }}/xdebug.ini
owner=root
mode=0644
notify: restart php-fpm

View File

@ -4,7 +4,11 @@
; configuration for php xdebug module
; priority=20
{% if php_version | version_compare('7.0', 'ge') %}
zend_extension=xdebug.so
{% else %}
zend_extension={{ php_extension_dir.stdout }}/xdebug.so
{% endif %}
{% if xdebug_version.stdout|version_compare('2.3', 'gt') %}
{% endif %}