Code Monkey home page Code Monkey logo

composer's Introduction

Build Status

Description

This cookbook provides an easy way to install Composer, a dependency manager for PHP.

More information? http://getcomposer.org/

Requirements

Cookbooks:

  • php

This cookbook recommends the following cookbooks:

  • windows

Depending on your environment, these recommended cookbooks are actual dependencies (depends):

  • Using the community PHP cookbook to get PHP installed? You'll need the php cookbook to be available.
  • Running on Windows? You'll need the windows cookbook to be available.

Platforms:

  • Ubuntu
  • Debian
  • RHEL
  • CentOS
  • Fedora
  • Windows

Attributes

  • node['composer']['url'] - Location of the source
  • node['composer']['install_dir'] - Installation target directory (absolute or relative path) if installing locally
  • node['composer']['bin'] - bin directory
  • node['composer']['install_globally'] - Installation method, ':source' or ':package' - default true
  • node['composer']['mask'] - Mask for composer.phar - 0755
  • node['composer']['link_type'] - link type for composer.phar link - default :symbolic
  • node['composer']['global_configs'] - Hash with global config options for users, eg. { "userX" => { "github-oauth" => { "github.com" => "userX_oauth_token" }, "vendor-dir" => "myvendordir" } } - default {}
  • node['composer']['php_recipe'] - The php recipe to include, defaults to "php::default"

Resources / Providers

This cookbook includes an LWRP for managing a Composer project

composer_project

Actions

  • :install: Reads the composer.json file from the current directory, resolves the dependencies, and installs them into vendor - this is the default action
  • :update: Gets the latest versions of the dependencies and updates the composer.lock file
  • :dump_autoload: Updates the autoloader without having to go through an install or update (eg. because of new classes in a classmap package)

Attribute parameters

  • project_dir: The directory where your project's composer.json can be found
  • dev: Install packages listed in require-dev, default false
  • quiet: Do not output any message, default true
  • optimize_autoloader: Optimize PSR0 packages to use classmaps, default false

Examples

#install project vendors
composer_project "/path/to/project" do
    dev false
    quiet true
    prefer_dist false
    action :install
end

#update project vendors
composer_project "/path/to/project" do
    dev false
    quiet true
    action :update
end

#dump-autoload for project
composer_project "/path/to/project" do
    dev false
    quiet true
    action :dump_autoload
end

Usage

  1. include recipe[composer] in a run list
  2. tweak the attributes via attributes/default.rb --- OR --- override the attribute on a higher level (http://wiki.opscode.com/display/chef/Attributes#Attributes-AttributesPrecedence)

References

License and Authors

Author: David Joos [email protected] Author: Escape Studios Development [email protected] Copyright: 2012-2014, Escape Studios

Unless otherwise noted, all files are released under the MIT license, possible exceptions will contain licensing information in them.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

composer's People

Contributors

andygrunwald avatar bezhermoso avatar blufe avatar dazwin avatar djoos avatar maks3w avatar mcfedr avatar nubs avatar odolbeau avatar rjocoleman avatar trinitronx avatar winmillwill avatar yuya-takeyama avatar zuazo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.