Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uzyn/cakephp-composer
CakePHP Composer plugin
https://github.com/uzyn/cakephp-composer
Last synced: 11 days ago
JSON representation
CakePHP Composer plugin
- Host: GitHub
- URL: https://github.com/uzyn/cakephp-composer
- Owner: uzyn
- License: other
- Created: 2012-06-19T07:32:05.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-16T15:26:13.000Z (over 10 years ago)
- Last Synced: 2024-04-29T23:55:29.031Z (7 months ago)
- Language: PHP
- Homepage: http://bakery.cakephp.org/articles/uzyn/2012/06/20/composer_plugin_for_cakephp
- Size: 207 KB
- Stars: 62
- Watchers: 5
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CakePHP Composer Plugin
=======================[Composer](http://getcomposer.org/) is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
This is a CakePHP plugin to use Composer conveniently with your CakePHP project.
There is no need to pre-install Composer.
This plugin will automatically download the latest version if Composer is not installed at your system.Requirements
---------
CakePHP v2.xHow to use
----------
1. Download the plugin and place it at `APP/Plugin/Composer`.```bash
cd APP/Plugin
git clone git://github.com/uzyn/cakephp-composer.git Composer
```2. Load the plugin by adding this line to the bottom of your app's `Config/bootstrap.php`:
```php
true));
```3. That's all! Composer is ready for use.
`composer.json` is located at `APP/composer.json`. It is automatically created if it is not found.
Packages are installed to `APP/Vendor` as per CakePHP convention.
Invoke Composer from command line with `Console/cake composer.c`.For example, to install [opauth/opauth](http://packagist.org/packages/opauth/opauth) using Composer's `require` command.
```bash
cd APP
Console/cake composer.c require opauth/opauth:0.*
```To install packages defined at `composer.json`
```bash
Console/cake composer.c install
```4. This plugin also makes use of Composer's autoloader.
Start using a Composer-loaded classes right away without needing `require()`, `include()` or `App::import()`.For example, to instantiate a new Opauth object, simply instantiate Opauth from anywhere in your CakePHP application:
```php
Drop me a mail. I do freelance consulting & development.License
---------
The MIT License
Copyright © 2012-2013 U-Zyn Chua (http://uzyn.com)