Use Composer. 2014-07-07
authorIain Patterson <me@iain.cx>
Mon, 7 Jul 2014 08:26:40 +0000 (04:26 -0400)
committerIain Patterson <me@iain.cx>
Mon, 7 Jul 2014 08:26:40 +0000 (04:26 -0400)
Install propel and phing locally using Composer.

.gitignore
Makefile
composer.json [new file with mode: 0644]
www/index.php

index d20bcbf..b778276 100644 (file)
@@ -1,3 +1,6 @@
 propel/build/
 propel/schema-transformed.xml
 propel/runtime-conf.xml
+vendor/
+composer.lock
+composer.phar
index cfa96a4..f9340e4 100644 (file)
--- 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 (file)
index 0000000..8a13e95
--- /dev/null
@@ -0,0 +1,7 @@
+{
+  "name": "readifood/readifood",
+  "description": "Readifood",
+  "require": {
+    "propel/propel1": "1.6.9"
+  }
+}
index 64b403d..340401d 100644 (file)
@@ -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())));