Browse files

Start to use **Composer**

  • Loading branch information...
1 parent 35f9ab1 commit 1acccd727c007703e7fee3e58a6ab557fddae550 @willdurand willdurand committed Dec 19, 2011
Showing with 21 additions and 28 deletions.
  1. +2 −0 .gitignore
  2. +9 −3 README.md
  3. +3 −3 autoload.php.dist
  4. +0 −19 bin/install_vendors.sh
  5. +3 −0 bin/propel.php
  6. +4 −3 composer.json
View
2 .gitignore
@@ -1,3 +1,5 @@
+composer.lock
+composer.phar
tests/Fixtures/bookstore-packaged/build/
tests/Fixtures/bookstore/build/
tests/Fixtures/namespaced/build/
View
12 README.md
@@ -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.
@@ -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:
@@ -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:
View
6 autoload.php.dist
@@ -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();
View
19 bin/install_vendors.sh
@@ -1,19 +0,0 @@
-#!/bin/bash
-
-function installOrUpdate
-{
- echo "Installing/Updating $1"
-
- if [ ! -d "$1" ] ; then
- git clone $2 $1
- fi
-
- cd $1
- git fetch -q origin
- git reset --hard $3
- cd -
-}
-
-installOrUpdate "vendor/Symfony/Component/ClassLoader" "http://github.com/symfony/ClassLoader.git" "origin/master"
-installOrUpdate "vendor/Symfony/Component/Yaml" "http://github.com/symfony/Yaml.git" "origin/master"
-installOrUpdate "vendor/Symfony/Component/Console" "http://github.com/symfony/Console.git" "origin/master"
View
3 bin/propel.php
@@ -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')) {
View
7 composer.json
@@ -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",
@@ -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.