Вопрос

I have a website built on the Kohana framework. I see now that there exists Composer packages on packagist for the various components like core and the standard modules like auth and database.

What steps should I take to make my existing website "Composerized"?

I have lightly used Composer in other projects, but unsure what I should do in this case.

Это было полезно?

Решение

Simply install composer

http://getcomposer.org/

curl -sS https://getcomposer.org/installer | php

Run a composer init to set up a new composer file. Then go and find your package you wish to install, so for example mine looks something like this

{
"require": {
    "phpunit/phpunit": "3.7.24",
    "phing/phing": "dev-master",
    "mailgun/mailgun-php": "dev-master",
    "modulargaming/kostache": "dev-master",
    "codeception/codeception": "dev-master",
    "erusev/parsedown": "dev-master",
    "aws/aws-sdk-php": "2.3.*"
    }
}

Then just run composer install or composer update

You can then just comment out the modules in bootstrap.php

That is a very simple composer.json file, but gives you a basic idea.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top