# == Class: php::composer # # Install composer package manager # # === Parameters # # [*source*] # Holds URL to the Composer source file # # [*path*] # Holds path to the Composer executable # # [*auto_update*] # defines if composer should be auto updated # # [*max_age*] # defines the time in days after which an auto-update gets executed # # === Variables # # No variables # # === Examples # # include php::composer # # === Authors # # Christian "Jippi" Winther # Robin Gloster # # === Copyright # # See LICENSE file # class php::composer ( $source = $php::params::composer_source, $path = $php::params::composer_path, $auto_update = true, $max_age = $php::params::composer_max_age, ) inherits php::params { if $caller_module_name != $module_name { warning("${name} is not part of the public API of the ${module_name} module and should not be directly included in the manifest.") } exec { 'download composer': command => "wget ${source} -O ${path}", creates => $path, path => ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/'], require => [ Package[$php::params::cli_package] ] } -> file { $path: mode => '0555', owner => root, group => root, } if $auto_update { class {'php::composer::auto_update': max_age => $max_age, source => $source, path => $path } } }