codeigniter-composer-installer icon indicating copy to clipboard operation
codeigniter-composer-installer copied to clipboard

Installation for Kenji's Twig Library

Open komputronika opened this issue 7 years ago • 2 comments

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:

  1. Add new package definition to array $this->packages, with a new key 'require'.
  2. Method install will doing additional task: Update composer.json with new requirement and then run composer 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 avatar Sep 15 '17 20:09 komputronika

@komputronika Why do you want to use bin/install.php to install Composer pacakges? You can just run composer command to install Composer pacakges.

kenjis avatar Sep 17 '17 08:09 kenjis

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.

komputronika avatar Sep 18 '17 16:09 komputronika