Composer powered Koala Framework Dependencies

"Composer is a application-level dependency manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries. It was developed by Nils Adermann and Jordi Boggiano, who continue to manage the project. They began development in April 2011 and first released it on March 1, 2012. Composer is strongly inspired by Node.js's "npm" and Ruby's "bundler""
(Source: Wikipedia)

Koala Framework will use composer starting with version 3.8. This is a huge step that completely changes how deployment is done.

So why are we switching to composer?

  • it's the de-facto standard for modern php development
  • it allows easy usage of any required external package that can be found on packagist.org
  • it allows updating libraries without huge effort
  • it replaces the huge, monolitic library repository

Using Composer

First, you need to install composer, follow the official instructions - on Linux I would run:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Now that composer is installed (and in your $PATH) you can start using it in any composer enabled project by changing working directory into the project and executing:

composer install

This will download and install all requirements to run the project into the vendor folder. This includes koala-framework itself which can now be found on the official composer package repository packagist.org

As Koala Framework does nothing unusual or special with composer refer to the composer documentation for further usage.

Deployment

One question remains though: how to deploy the vendor folder?

1. You can run composer install on the production server which automatically downloads all dependencies.

2. You can copy the locally generated vendor folder to the production server.

I would recommend (2) as that has less dependencies on the production server, you can even use it without shell access at all.

Koala Framework contains a simple script that creates an archive containing all required files to run a project (that is project code + vendor + build), start the following script to generate deploy.tar.gz:

./vendor/koala-framework/scripts/build-deploy-package
This entry was posted in Koala Framework by Niko Sams. Bookmark the permalink.

449 Thoughts on "Composer powered Koala Framework Dependencies"

PHP Vendor Management+ is a Vendor Relationship Management framework for Retail & Manufacturing focused ISVs (Independent Software Vendors) to effectively.
expedux.com/php-vendor-management/
wh0cd720121 [url=buybentyl.us.org/]more help[/url] [url=diclofenac50mg.us.com/]buying diclofenac[/url]
wh0cd725119 [url=buy-trazodone.reisen/]trazodone[/url] [url=propeciageneric.pro/]propecia[/url] [url=doxycycline100mg.work/]example here[/url] [url=prednisoloneacetate.pro/]buy prednisolone 5mg without prescription uk[/url]
wh0cd725119 [url=toradoliv.pro/]toradol iv[/url] [url=buypropranolol.shop/]price of propranolol[/url] [url=metformin.live/]metformin hcl 500 mg[/url] [url=retin-a.shop/]tretinoin price[/url] [url=buycolchicine.work/]colchicine[/url] [url=methotrexate.reisen/]methotrexate[/url] [url=buy-diclofenac.shop/]buy diclofenac[/url]
Your post is very useful for us as usual. We are PHP app development Company, we always read your post, thanks and keep sharing! www.sagipl.com/php-application-development/

[url=methotrexate.schule/]methotrexate[/url] [url=cipro500mg.pro/]cipro[/url]
[url=atarax.directory/]atarax[/url]
[url=buydiclofenac.shop/]diclofenac 75mg[/url] [url=buyprednisolone.store/]prednisolone[/url]
[url=buyinderal.shop/]where to buy inderal[/url] [url=cephalexin.reisen/]cephalexin[/url] [url=buyanafranil.shop/]anafranil[/url] [url=buy-lipitor.store/]lipitor[/url]
[url=costofviagra.news/]viagra fast shipping[/url] [url=buy-lipitor.reisen/]buy lipitor[/url] [url=buyanafranil.shop/]buy anafranil[/url] [url=buytrazodone.shop/]trazodone[/url]

Leave a Reply

Your email address will not be published.