From 6cf6109632946bbc8807df54229c3675b335cfba Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 7 Jul 2014 04:26:40 -0400 Subject: [PATCH] Use Composer. Install propel and phing locally using Composer. --- .gitignore | 3 +++ Makefile | 9 +++++++-- composer.json | 7 +++++++ www/index.php | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 composer.json diff --git a/.gitignore b/.gitignore index d20bcbf..b778276 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ propel/build/ propel/schema-transformed.xml propel/runtime-conf.xml +vendor/ +composer.lock +composer.phar diff --git a/Makefile b/Makefile index cfa96a4..f9340e4 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,7 @@ -all: - cd propel && propel-gen +all: composer.phar + php composer.phar install + chmod 755 vendor/propel/propel1/generator/bin/phing.php + cd propel && ../vendor/propel/propel1/generator/bin/propel-gen + +composer.phar: + curl -sS https://getcomposer.org/installer | php diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..8a13e95 --- /dev/null +++ b/composer.json @@ -0,0 +1,7 @@ +{ + "name": "readifood/readifood", + "description": "Readifood", + "require": { + "propel/propel1": "1.6.9" + } +} diff --git a/www/index.php b/www/index.php index 64b403d..340401d 100644 --- a/www/index.php +++ b/www/index.php @@ -8,7 +8,7 @@ $root = join(DIRECTORY_SEPARATOR, array($_SERVER['DOCUMENT_ROOT'], "..")); $propel_root = join(DIRECTORY_SEPARATOR, array($root, "propel")); $lib_root = join(DIRECTORY_SEPARATOR, array($root, "lib")); - require_once(join(DIRECTORY_SEPARATOR, array("propel", "Propel.php"))); + require_once(join(DIRECTORY_SEPARATOR, array($root, "vendor", "autoload.php"))); Propel::init("$propel_root/build/conf/$propel_project-conf.php"); set_include_path(join(PATH_SEPARATOR, array(join(DIRECTORY_SEPARATOR, array($propel_root, "build", "classes")), get_include_path()))); -- 2.20.1