ChurchCRM / CRM

ChurchCRM is an OpenSource Church CRM & Management Software.
https://ChurchCRM.io
MIT License
626 stars 444 forks source link

Use bower or Composer to Manage Project Dependencies #8

Closed DawoudIO closed 8 years ago

DawoudIO commented 9 years ago

We need a good dependencies manager... we can use Composer or Bower... not sure which is the better one.

dferrans commented 9 years ago

I have used composer for a long time, and it seems to handle package dependency very easy. most PACKAGES are PSR compliant http://www.php-fig.org/ (https://packagist.org/ php packages). Also, it handle cutting edge PHP features (to handle dependencies, closures, namespacing ). avoiding class conflicts.

to INSTALL packages, you DO NOT need NODEJS (Bower does).

Benefits: using composer help us to make sure that dependencies of the proyect are meet very easy. Upgrades made easy with composer commands Ability to vesion composer with different dependencies across branches.

Downsize: you need to know how composer works. Sometimes you need to be able to run CLI commands

Conclusion:

I would prefer COMPOSER instead of BOWER.

DawoudIO commented 9 years ago

I would agree with you that composer is a better for php projects... Let me create a list of libs that we use and go from there

dferrans commented 9 years ago

Eloquent (LARAVEL ORM). For ORM I would recomend the following package Is realy easy to use: (see docs) http://laravel.com/docs/5.0/eloquent composer file:

{
    "require": {
        "illuminate/database": "*"
    }
}

GUZZLE HTTP: PHP HTTP client and framework for consuming RESTful web services urL: http://guzzle.readthedocs.org/en/latest/

Composer file:

{
   "require": {
      "guzzlehttp/guzzle": "~5.0"
   }
}

SLIM PHP framework Url: http://www.slimframework.com/ LIGHT WEIGHT MICRO PHP FRAMEWORK can help us to migrate to MVC . Composer file:

{
   "require": {
     "slim/slim": "dev-master"
   }
}

Phinx This is a DATABASE migration tool writen in php Is framework agnostic. Is is realy easy to manage migrations: URL: http://docs.phinx.org/en/latest/

Composer File:

{
    "require": {
       "robmorgan/phinx": "dev-master"
    }
}

Faker Faker is a PHP library that generates fake data for you.

https://packagist.org/packages/fzaninotto/faker

{
    "require": {
      "fzaninotto/faker": "1.5.*@dev"
    }
}
DawoudIO commented 8 years ago

While we are not yet using composer, we are moving all the external lib into a vendor dir.