From fab3a9d8a724635b71dd493795c628d2b25f1046 Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Thu, 10 Jul 2014 14:40:36 +0100 Subject: [PATCH 1/7] Add new attributes 'remote_port' and 'max_nesting_level' on xdebug node --- attributes/default.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/attributes/default.rb b/attributes/default.rb index 79ed5d5..1b3b454 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -4,11 +4,13 @@ default['xdebug']['remote_autostart'] = 0 default['xdebug']['remote_mode'] = "req" default['xdebug']['remote_connect_back'] = 1 +default['xdebug']['remote_port'] = 9000 default['xdebug']['idekey'] = "macgdbp" default['xdebug']['file_link_format'] = "txmt://open?url=file://%f&line=%1" default['xdebug']['profiler_enable_trigger'] = 0 default['xdebug']['profiler_enable'] = 0 default['xdebug']['profiler_output_dir'] = "/tmp/cachegrind" +default['xdebug']['max_nesting_level'] = 100 default['php']['ius'] = "5.3" From 4cd8c9814bf25b481389f11dd424160420f2cd82 Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Thu, 10 Jul 2014 14:47:07 +0100 Subject: [PATCH 2/7] Add xdebug settings: max_nesting_level and remote_port --- templates/default/xdebug.ini.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/default/xdebug.ini.erb b/templates/default/xdebug.ini.erb index 334841c..5731dd1 100755 --- a/templates/default/xdebug.ini.erb +++ b/templates/default/xdebug.ini.erb @@ -2,12 +2,14 @@ zend_extension=<%= `find /usr -name "xdebug.so" | tr -d "\n"` %> xdebug.cli_color = <%= @params['cli_color'] %> xdebug.scream = <%= @params['scream'] %> +xdebug.max_nesting_level = <%= @params['max_nesting_level'] %> [xdebug-remote-debug] xdebug.remote_enable = <%= @params['remote_enable'] %> xdebug.remote_autostart = <%= @params['remote_autostart'] %> xdebug.remote_mode = <%= @params['remote_mode'] %> xdebug.remote_connect_back = <%= @params['remote_connect_back'] %> +xdebug.remote_port = <%= @params['remote_port'] %> xdebug.idekey = <%= @params['idekey'] %> xdebug.file_link_format="<%= @params['file_link_format'] %>" From c674a3a64799ac75f335422a90bbd088a3180ab6 Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Thu, 10 Jul 2014 14:58:09 +0100 Subject: [PATCH 3/7] Possible fix for #42 Accept versions of php cookbook 1.1.8+ --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 3fd7587..cfc0fd9 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,7 +9,7 @@ depends "git", ">= 1.0.0" depends "yum", ">= 0.8.0" depends "apt", ">= 1.8.4" -depends "php", "= 1.1.8" +depends "php", ">= 1.1.8" %w{ ubuntu debian centos redhat fedora }.each do |os| supports os From b538b66430ab064634638359b51bb58ed983f7ea Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Thu, 10 Jul 2014 15:01:15 +0100 Subject: [PATCH 4/7] Update README.md to mention new xdebug attributes. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b79639a..73fb8bc 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,12 @@ The following Opscode cookbooks are dependencies: * `['xdebug']['cli_color']` = Enable cli colour output, defaults to `1`. * `['xdebug']['scream']` = Enable removal for of `@` error suppression functionality, defaults to `0`. +* `['xdebug']['max_nesting_level']` = Defaults to `100`. * `['xdebug']['remote_enable']` = Defaults to `On`. * `['xdebug']['remote_autostart']` = Defaults to `0`. * `['xdebug']['remote_mode']` = Defaults to `req`. * `['xdebug']['remote_connect_back']` = Defaults to `1`. +* `['xdebug']['remote_port']` = Defaults to `9000`. * `['xdebug']['idekey']` = Defaults to `macgdbp`. * `['xdebug']['file_link_format']` = Defaults to `txmt://open?url=file://%f&line=%1`. * `['xdebug']['profiler_enable_trigger']` = Defaults to `0`. From a7abe225909f46964aa1890ade37fbfec7d7ed16 Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Mon, 28 Jul 2014 14:43:41 +0100 Subject: [PATCH 5/7] Add a new module for apcu installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "PHP APCu is now included in the repository for both PHP 5.4 and 5.5. APCu is a cut down version of APC, which just deals with user cache, removing it’s opcode cache that doesn’t support PHP 5.5." --- recipes/module_apcu.rb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 recipes/module_apcu.rb diff --git a/recipes/module_apcu.rb b/recipes/module_apcu.rb new file mode 100644 index 0000000..e21444d --- /dev/null +++ b/recipes/module_apcu.rb @@ -0,0 +1,32 @@ +# +# Cookbook Name:: chef-php-extra +# Recipe:: module_apcu +# +# Copyright 2014, Restless-ET +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +include_recipe "chef-php-extra" + +pkgs = value_for_platform( + [ "debian", "ubuntu" ] => { + "default" => %w{ php5-apcu } + } +) + +pkgs.each do |pkg| + package pkg do + action :install + end +end From 8fb465803394d41eb87c6f471e9973821b114837 Mon Sep 17 00:00:00 2001 From: Restless-ET Date: Mon, 28 Jul 2014 14:52:09 +0100 Subject: [PATCH 6/7] Update metadata.rb to refer new module_apcu recipe --- metadata.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/metadata.rb b/metadata.rb index cfc0fd9..3b0e184 100644 --- a/metadata.rb +++ b/metadata.rb @@ -17,6 +17,7 @@ recipe "chef-php-extra", "No default install" recipe "chef-php-extra::development", "Install development tools" +recipe "chef-php-extra::module_apcu", "Install additional module APCu" recipe "chef-php-extra::module_dev", "Install additional module" recipe "chef-php-extra::module_gd", "Install additional module" recipe "chef-php-extra::module_imagick", "Install additional module" From 16ed03a40efba5da41c50b3b109ec96fa292e9b4 Mon Sep 17 00:00:00 2001 From: Tiago Brito Date: Thu, 11 Dec 2014 11:32:16 +0000 Subject: [PATCH 7/7] Change the default value of xdebug to 500 --- attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 1b3b454..42263cb 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -10,7 +10,7 @@ default['xdebug']['profiler_enable_trigger'] = 0 default['xdebug']['profiler_enable'] = 0 default['xdebug']['profiler_output_dir'] = "/tmp/cachegrind" -default['xdebug']['max_nesting_level'] = 100 +default['xdebug']['max_nesting_level'] = 500 default['php']['ius'] = "5.3"