yevgenko / cookbook-php-fpm

Installs/Configures php-fpm
http://community.opscode.com/cookbooks/php-fpm
Apache License 2.0
68 stars 117 forks source link

Support Chef 13 #99

Closed Rarian closed 7 years ago

Rarian commented 7 years ago

Currently this cookbook uses the old method access for node attributes in five locations, this syntax has been removed in favour of the new bracket syntax in Chef 13.

dbudwin commented 7 years ago

I'm experiencing this issue as well, below is the output from running kitchen verify:

      ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb
       ================================================================================

       NoMethodError
       -------------
       undefined method `platform_version' for #<Chef::Node::Attribute:0x00000004c830d0>

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb:13:in `from_file'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/php-fpm/attributes/default.rb:

         6:    pool_conf_dir = "/etc/php-fpm.d"
         7:    conf_file = "/etc/php-fpm.conf"
         8:    error_log = "/var/log/php-fpm/error.log"
         9:    pid = "/var/run/php-fpm/php-fpm.pid"
        10:  else
        11:    user = "www-data"
        12:    group = "www-data"
        13>>   if platform?('ubuntu') and node.platform_version.to_f >= 16.04
        14:      php_conf_dir = "/etc/php/7.0"
        15:      php_fpm_name = "php7.0-fpm"
        16:    else
        17:      php_conf_dir = "/etc/php5"
        18:      php_fpm_name = "php5-fpm"
        19:    end
        20:    conf_dir = "#{php_conf_dir}/fpm/conf.d"
        21:    pool_conf_dir = "#{php_conf_dir}/fpm/pool.d"
        22:    if node.platform == "ubuntu" and node.platform_version.to_f <= 10.04
e100 commented 7 years ago

Yes, please merge the pull request that fixes this: https://github.com/yevgenko/cookbook-php-fpm/pull/98

yevgenko commented 7 years ago

resolved with #98 in v0.7.9 release