Skip to content

Commit

Permalink
Start to use **Composer**
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Dec 19, 2011
1 parent 35f9ab1 commit 1acccd7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
composer.lock
composer.phar
tests/Fixtures/bookstore-packaged/build/
tests/Fixtures/bookstore/build/
tests/Fixtures/namespaced/build/
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.3.
Propel2 uses the following Symfony2 Components:

* [ClassLoader](https://github.com/symfony/ClassLoader)
* [Console](https://github.com/symfony/Console)
* [Yaml](https://github.com/symfony/Yaml)

Propel2 is only supported on PHP 5.3.3 and up.
Expand All @@ -21,7 +22,7 @@ Read the [Propel documentation](http://www.propelorm.org/).
## Contribute ##

Everybody can contribute to Propel2. Just fork it, and send Pull Requests.
You have to follow [Propel2 Coding Standards](http://github.com/propelorm/Propel2/issues/2) and provides unit tests as much as possible.
You have to follow [Propel2 Coding Standards](https://github.com/propelorm/Propel2/wiki/Coding-Standards) and provides unit tests as much as possible.

**Note:** you can fix checkstyle before to submit a Pull Request by using the Symfony2 `check_cs` script.
You just need to install [Finder](http://github.com/symfony/Finder) and the script:
Expand All @@ -37,9 +38,14 @@ Then use it:

## Unit Tests ##

To run unit tests, you'll have to install vendors:
To run unit tests, you'll have to install vendors by using [**Composer**](https://github.com/composer/composer).
If you don't have an available `composer.phar` command, just download it:

./bin/install_vendors.sh
wget http://getcomposer.org/composer.phar

Then, install dependencies:

php composer.phar install

Once done, build fixtures:

Expand Down
6 changes: 3 additions & 3 deletions autoload.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $loader->registerNamespaces(array(
__DIR__ . '/tests/Fixtures/bookstore/build/classes',
__DIR__ . '/tests/Fixtures/schemas/build/classes',
),
'Propel\Runtime' => __DIR__ . '/src',
'Propel\Generator' => __DIR__ . '/src',
'Symfony\Component' => __DIR__ . '/vendor',
'Propel\Runtime' => __DIR__ . '/src',
'Propel\Generator' => __DIR__ . '/src',
'Symfony\Component' => __DIR__ . '/vendor',
));
$loader->register();
19 changes: 0 additions & 19 deletions bin/install_vendors.sh

This file was deleted.

3 changes: 3 additions & 0 deletions bin/propel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<?php

if (!class_exists('\Symfony\Component\Console\Application')) {
if (file_exists($file = __DIR__.'/../vendor/.composer/autoload.php')) {
require_once $file;
}
if (file_exists($file = __DIR__.'/../autoload.php')) {
require_once $file;
} elseif (file_exists($file = __DIR__.'/../autoload.php.dist')) {
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "propel/propel",
"type": "library",
"description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.3",
"keywords": ["ORM", "persistence"],
"keywords": ["ORM", "persistence", "Active Record"],
"homepage": "http://www.propelorm.org/",
"version": "2.0.0",
"license": "MIT",
Expand All @@ -14,7 +14,8 @@
],
"require": {
"php": ">=5.3.2",
"symfony/class-loader": ">=2.1",
"symfony/yaml": ">=2.1"
"symfony/class-loader": ">=2.0",
"symfony/yaml": ">=2.0",
"symfony/console": ">=2.0"
}
}

0 comments on commit 1acccd7

Please sign in to comment.