Page MenuHomeSoftware Heritage

composer.pp
No OneTemporary

composer.pp

# == 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 <jippignu@gmail.com>
# Robin Gloster <robin.gloster@mayflower.de>
#
# === 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
}
}
}

File Metadata

Mime Type
text/plain
Expires
Jul 4 2025, 10:14 AM (5 w, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3279203

Event Timeline