codeigniter-composer-installer
codeigniter-composer-installer copied to clipboard
Installation for Kenji's Twig Library
This additional code is for install CI libraries that depend on other package. For example: https://github.com/kenjis/codeigniter-ss-twig
The steps are:
- Add new package definition to array
$this->packages
, with a new key'require'
. - Method install will doing additional task: Update
composer.json
with new requirement and then runcomposer update
.
Test result:
$ ./bin/install.php twig master
Downloaded: https://github.com/kenjis/codeigniter-ss-twig/archive/master.zip
copied: /media/windows/Web/codeigniter-composer-installer-demo/application/libraries/Twig.php
Installing package: CodeIgniter3 Simple and Secure Twig Integration
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
Installed: twig
See https://github.com/kenjis/codeigniter-ss-twig
Thank you.
#21
@komputronika
Why do you want to use bin/install.php
to install Composer pacakges?
You can just run composer
command to install Composer pacakges.
Hello Kenji,
As I said before. this additional code is for install CI libraries that depend on other package. For example: https://github.com/kenjis/codeigniter-ss-twig
Yes we can install for example, Twig with composer directly.
But your codeigniter-ss-twig library has wrapped Twig class so easy to use with Codeigniter.
(there is folder libraries
inside).
Another example library that depend on other composer package is your codeigniter doctrine library.
Thanks.