diff --git a/.gitignore b/.gitignore
index a1f90b8..4eda716 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,7 @@ config/database.yml
config/config.yml
tmp/logs.txt
*~
+
+/vendor/
+app/models/Base
+app/models/Map
diff --git a/app/controllers/IssueController.php b/app/controllers/IssueController.php
index 0a11043..c8b78a6 100644
--- a/app/controllers/IssueController.php
+++ b/app/controllers/IssueController.php
@@ -1,6 +1,8 @@
request->getParam("id");
- $ent = load_issue($id);
- $this->render(array("entity" => $ent));
+ $issue = IssueQuery::create()->findOneById($this->request->getParam("id"));
+ $this->render(array("entity" => $issue));
}
public function createAction() {
@@ -30,8 +31,13 @@ public function indexAction() {
$project_id = $this->request->getParam("pid");
$per_page = 5;
$init = $page * $per_page;
- $items = list_issue("num desc", $init . "," . $per_page, "project_id = " . $project_id);
- $total_results = count_issue("project_id = " . $project_id);
+ $items = IssueQuery::create()
+ ->orderByNum(IssueQuery::DESC)
+ ->offset($init)
+ ->limit($per_page)
+ ->filterByProjectId($project_id)
+ ->find();
+ $total_results = IssueQuery::create()->filterByProjectId($project_id)->count();
$total_pages = ceil($total_results / $per_page);
$this->render(array("issues" => $items,
"pid" => $project_id,
@@ -41,4 +47,4 @@ public function indexAction() {
}
}
-?>
\ No newline at end of file
+?>
diff --git a/app/controllers/ProjectController.php b/app/controllers/ProjectController.php
index 3c0983b..2bf2615 100755
--- a/app/controllers/ProjectController.php
+++ b/app/controllers/ProjectController.php
@@ -1,6 +1,9 @@
request->getParam("project");
- $dev = load_developer_where('name = "' . $this->request->getParam("owner_name").'"');
+ $dev = DeveloperQuery::create()->findOneByName($this->request->getParam("owner_name"));
if($dev == null) { //Create the developer if it's not on our database already
$dev = new Developer();
- $dev->name = $this->request->getParam("owner_name");
- $dev->avatar_url = $this->request->getParam("owner_avatar");
- save_developer($dev);
+ $dev->setName($this->request->getParam("owner_name"));
+ $dev->setAvatarUrl($this->request->getParam("owner_avatar"));
+ $dev->save();
} else { //Update the avatar if it changed
- if ( $dev->avatar_url != $this->request->getParam("owner_avatar")) {
- $dev->avatar_url = $this->request->getParam("owner_avatar");
- save_developer($dev);
+ if ( $dev->getAvatarUrl() != $this->request->getParam("owner_avatar")) {
+ $dev->setAvatarUrl($this->request->getParam("owner_avatar"));
+ $dev->save();
}
}
- if(!load_project_where("name = '".$proj['name']."' and owner_id = ".$dev->id)) {
-
- $proj['url'] = str_replace("https", "", $proj['url']);
- $proj['url'] = str_replace("http", "", $proj['url']);
- $proj['url'] = str_replace("://", "", $proj['url']);
- $proj['url'] = "http://" . $proj['url'];
+ if(!ProjectQuery::create()->filterByName($proj['name'])->findOneByOwnerId($dev->getId())) {
+ $projectUrl = $proj['url'];
+ $projectUrl = str_replace("https", "", $projectUrl);
+ $projectUrl = str_replace("http", "", $projectUrl);
+ $projectUrl = str_replace("://", "", $projectUrl);
+ $projectUrl = "http://" . $projectUrl;
- $proj['owner_id'] = $dev->id;
- $proj['published'] = 1;
- $entity->load_from_array($proj);
- if(save_project($entity)) {
+ $project->setUrl($projectUrl)->setDeveloper($dev)->setPublished(true);
+ if($project->save()) {
//Create the first set of stats
- $entity->saveInitStats();
- $entity->grabHistoricData();
+ $project->saveInitStats();
+ $project->grabHistoricData();
$this->flash->setSuccess("The project was added correctly, thanks!");
- $this->redirect_to(project_show_path($entity));
+ $this->redirect_to(project_show_path($project));
} else {
- $this->render(array("entity" => $entity), "new");
+ $this->render(array("entity" => $project), "new");
}
} else {
$this->flash->setError("This project has already been submited");
- $this->render(array("entity" => $entity), "new");
+ $this->render(array("entity" => $project), "new");
}
}
diff --git a/app/controllers/WebSiteMessageController.php b/app/controllers/WebSiteMessageController.php
index e9a340c..970ad3c 100644
--- a/app/controllers/WebSiteMessageController.php
+++ b/app/controllers/WebSiteMessageController.php
@@ -1,6 +1,8 @@
request->getParam("id"));
+ WebSiteMessageQuery::create()->findOneById($this->request->getParam("id"))->delete();
$this->flash->success("Delete successfull!");
$this->redirect_to(web_site_message_list_path());
}
public function editAction() {
- $tb = load_web_site_message($this->request->getParam("id"));
+ $webSiteMessage = WebSiteMessageQuery::create()->findOneById($this->request->getParam("id"));
- $this->render(array("entity" => $tb));
+ $this->render(array("entity" => $webSiteMessage));
}
public function showAction() {
- $id = $this->request->getParam("id");
- $ent = load_web_site_message($id);
- $this->render(array("entity" => $ent));
+ $webSiteMessage = WebSiteMessageQuery::create()->findOneById($this->request->getParam("id"))
+ $this->render(array("entity" => $webSiteMessage));
}
public function createAction() {
$entity = new WebSiteMessage();
- $entity->load_from_array($this->request->getParam("web_site_message"));
- if(save_web_site_message($entity)) {
- $this->flash->setSuccess("Message sent! Thanks for getting in touch!");
- $this->redirect_to(home_root_path_path());
- } else {
+ $entity->fromArray($this->request->getParam("web_site_message"));
+ try {
+ $entity->save();
+ $this->flash->setSuccess("Message sent! Thanks for getting in touch!");
+ $this->redirect_to(home_root_path_path());
+ } catch (PropelException $e) {
$this->flash->setError("Both fields are required, make sure you fill them! And the email must be valid one.");
$this->redirect_to(home_root_path_path());
}
diff --git a/app/models/Developer.php b/app/models/Developer.php
new file mode 100644
index 0000000..804812e
--- /dev/null
+++ b/app/models/Developer.php
@@ -0,0 +1,51 @@
+getAvatarUrl() == "") {
+ return "/img/no-avatar.png";
+ } else {
+ return $this->getAvatarUrl();
+ }
+ }
+
+ public function gatherStats()
+ {
+ $db_projects = $this->getProjects(true);
+ $langs = array();
+ $projects = array();
+ foreach ($db_projects as $project) {
+ $projects[] = array(
+ "language" => $project->language,
+ "name" => $project->name,
+ "commits" => $project->countCommits(),
+ "pr_acceptance_rate" => intval($project->pr_acceptance_rate),
+ "stars" => intval($project->stars),
+ "forks" => intval($project->forks),
+ "faq_count" => count($project->getQuestions()),
+ "total_pull_requests" => $project->getTotalPullRequests()
+ );
+ }
+ $stats = array(
+ "owned_projects" => $projects,
+ "contributed_projects" => $this->getMyContributions()
+ );
+
+ return $stats;
+ }
+}
diff --git a/app/models/DeveloperQuery.php b/app/models/DeveloperQuery.php
new file mode 100644
index 0000000..4779b41
--- /dev/null
+++ b/app/models/DeveloperQuery.php
@@ -0,0 +1,19 @@
+url;
+ $url = str_replace("https://", "", $url);
+ $url = str_replace("http://", "", $url);
+ $url = str_replace("github.com/", "", $url);
+ $url = str_replace("github.com", "", $url);
+ return "https://github.com/" . $url;
+ }
+
+ public function language() {
+ return ($this->getLanguage() != "") ? $this->language : "N/A";
+ }
+
+ public function saveInitStats() {
+ Makiavelo::info("===== Saving initial deltas");
+ $pd = new ProjectDelta();
+ $pd->forks = $this->forks;
+ $pd->delta_forks = 0;
+
+ $pd->open_issues = $this->open_issues;
+ $pd->closed_issues = $this->closed_issues;
+
+ $pd->stars = $this->stars;
+ $pd->delta_stars = 0;
+
+ $pd->project_id = $this->id;
+ $pd->sample_date = date("Y-m-d H:i:s");
+
+ if(save_project_delta($pd)) {
+ Makiavelo::info("===== Delta saved! ");
+ } else {
+ Makiavelo::info("===== ERROR saving delta");
+ }
+ }
+
+ public function getAcceptanceString() {
+ if($this->pr_acceptance_rate < 30) {
+ return "terrible";
+ }
+
+ if($this->pr_acceptance_rate >= 30 && $this->pr_acceptance_rate < 70) {
+ return "acceptable";
+ }
+
+ if($this->pr_acceptance_rate >= 70) {
+ return "good";
+ }
+ }
+
+ public function getStats($init = null, $end = null) {
+ $deltas = list_project_delta("sample_date",null, "project_id = " .$this->id);
+ return $deltas;
+ }
+
+ public function grabHistoricData() {
+ $proj_name = $this->name;
+ $usr_name = $this->owner()->name;
+
+ Makiavelo::info("==== Querying for $usr_name/$proj_name");
+ $g_data = GithubAPI::queryProjectData($usr_name, $proj_name);
+
+ $this->readme = $g_data->readme;
+ //Makiavelo::puts("Updating project...");
+ save_project($this);
+
+ $data = array();
+ foreach($g_data->commits as $commit) {
+ $commit_date = $commit->commit->committer->date;
+ $commit_date = explode("T", $commit_date);
+ $commit_date = $commit_date[0];
+ $date_idx = intval(str_replace("-", "", $commit_date));
+ if(!isset($data[$date_idx]) || !isset($data[$date_idx]['commits'])) {
+ $data[$date_idx] = array("commits" => 1);
+ } else {
+ $data[$date_idx]['commits']++;
+ }
+
+ $pc = load_project_commit_where("sha = '".$commit->sha."'");
+ if($pc == null) { //We make sure we haven't yet saved this commit
+ $project_commit = new ProjectCommit();
+ $project_commit->project_id = $this->id;
+ $project_commit->committer = $commit->committer->login;
+ $project_commit->commit_message = $commit->commit->message;
+ $project_commit->sha = $commit->sha;
+ $project_commit->commit_date = $commit_date;
+
+ save_project_commit($project_commit);
+ }
+ }
+
+ foreach($g_data->pulls as $pull) {
+ $created_data = explode("T", $pull->created_at);
+ $closed_data = explode("T", $pull->closed_at);
+ $merged_data = explode("T", $pull->merged_at);
+
+ $created_idx = intval(str_replace("-", "", $created_data[0]));
+ $merged_idx = intval(str_replace("-", "", $merged_data[0]));
+ $closed_idx = intval(str_replace("-", "", $closed_data[0]));
+
+ if(!isset($data[$created_idx]) || !isset($data[$created_idx]['new_pulls'])) {
+ $data[$created_idx]['new_pulls'] = 1;
+ } else {
+ $data[$created_idx]['new_pulls']++;
+ }
+
+ if($merged_idx != 0) {
+ if(!isset($data[$merged_idx]) || !isset($data[$merged_idx]['merged_pulls'])) {
+ $data[$merged_idx]['merged_pulls'] = 1;
+ } else {
+ $data[$merged_idx]['merged_pulls']++;
+ }
+ }
+
+ if($closed_idx != 0) {
+ if(!isset($data[$closed_idx]) || !isset($data[$closed_idx]['closed_pulls'])) {
+ $data[$closed_idx]['closed_pulls'] = 1;
+ } else {
+ $data[$closed_idx]['closed_pulls']++;
+ }
+ }
+ }
+
+ foreach($data as $date => $stats) {
+ $year = substr($date, 0, 4);
+ $month = substr($date, 4,2);
+ $day = substr($date, 6,2);
+ $str_date = $year . "-" . $month . "-" . $day;
+ $pd = new ProjectDelta();
+ $pd->forks = -99;
+ $pd->delta_forks = -99;
+ $pd->stars = -99;
+ $pd->delta_stars = -99;
+
+ $pd->project_id = $this->id;
+ $pd->commits_count = isset($stats['commits']) ? $stats['commits'] : 0;
+ $pd->new_pulls = isset($stats['new_pulls']) ? $stats['new_pulls'] : 0;
+ $pd->closed_pulls = isset($stats['closed_pulls']) ? $stats['closed_pulls'] : 0;
+ $pd->merged_pulls = isset($stats['merged_pulls']) ? $stats['merged_pulls'] : 0;
+ $pd->sample_date = $str_date;
+
+ if(save_project_delta($pd)) {
+ Makiavelo::info("===== Delta saved! ");
+ } else {
+ Makiavelo::info("===== ERROR saving delta::" . mysql_error());
+ }
+ }
+
+ foreach($g_data->open_issues_list as $issue) {
+
+ $iss = new Issue();
+ $iss->title = $issue->title;
+ $iss->body = MarkdownExtra::defaultTransform($issue->body);
+ $iss->created_at = $issue->created_at;
+ $iss->updated_at = $issue->updated_at;
+ $iss->url = $issue->html_url;
+ $iss->number = $issue->number;
+ $iss->project_id = $this->id;
+
+ if(save_issue($iss)) {
+ Makiavelo::info("===== Issue saved! ");
+ } else {
+ Makiavelo::info("===== ERROR saving issue::" . mysql_error());
+ }
+
+ }
+ }
+
+ public function getQuestions() {
+ return list_faq("`order`", null, " project_id = " . $this->id);
+ }
+
+ //Returns the historic number of pull requests ever made to this project
+ public function getTotalPullRequests() {
+ $pds = list_project_delta(null, null, " project_id = " . $this->id);
+ $total_pr = 0;
+ foreach($pds as $pd) {
+ $total_pr += $pd->new_pulls;
+ }
+ return $total_pr;
+ }
+}
diff --git a/app/models/ProjectCommit.php b/app/models/ProjectCommit.php
new file mode 100644
index 0000000..40921e7
--- /dev/null
+++ b/app/models/ProjectCommit.php
@@ -0,0 +1,19 @@
+=5.4",
+ "psr/log": "~1.0",
+ "symfony/config": "~2.2",
+ "symfony/console": "~2.2",
+ "symfony/filesystem": "~2.2",
+ "symfony/finder": "~2.2",
+ "symfony/validator": "~2.2",
+ "symfony/yaml": "~2.2"
+ },
+ "require-dev": {
+ "behat/behat": "~2.4",
+ "monolog/monolog": "~1.3",
+ "phpunit/phpunit": "~4.0"
+ },
+ "suggest": {
+ "monolog/monolog": "The recommended logging library to use with Propel."
+ },
+ "bin": [
+ "bin/propel"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Propel": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "William Durand",
+ "email": "william.durand1@gmail.com"
+ }
+ ],
+ "description": "Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.4",
+ "homepage": "http://www.propelorm.org/",
+ "keywords": [
+ "Active Record",
+ "orm",
+ "persistence"
+ ],
+ "time": "2014-07-26 14:53:12"
+ },
+ {
+ "name": "psr/log",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/log.git",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Psr\\Log\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for logging libraries",
+ "keywords": [
+ "log",
+ "psr",
+ "psr-3"
+ ],
+ "time": "2012-12-21 11:40:51"
+ },
+ {
+ "name": "symfony/config",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Config",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Config.git",
+ "reference": "a31aa8029bcc0b5b85578328050aa70d052e177b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Config/zipball/a31aa8029bcc0b5b85578328050aa70d052e177b",
+ "reference": "a31aa8029bcc0b5b85578328050aa70d052e177b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/filesystem": "~2.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Config\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Config Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-09 09:05:48"
+ },
+ {
+ "name": "symfony/console",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Console",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Console.git",
+ "reference": "386fa63407805959bd2c5fe540294721ad4224c8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Console/zipball/386fa63407805959bd2c5fe540294721ad4224c8",
+ "reference": "386fa63407805959bd2c5fe540294721ad4224c8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "psr/log": "~1.0",
+ "symfony/event-dispatcher": "~2.1"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Console\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Console Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-15 14:15:12"
+ },
+ {
+ "name": "symfony/filesystem",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Filesystem",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Filesystem.git",
+ "reference": "c1309b0ee195ad264a4314435bdaecdfacb8ae9c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Filesystem/zipball/c1309b0ee195ad264a4314435bdaecdfacb8ae9c",
+ "reference": "c1309b0ee195ad264a4314435bdaecdfacb8ae9c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Filesystem\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Filesystem Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-09 09:05:48"
+ },
+ {
+ "name": "symfony/finder",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Finder",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Finder.git",
+ "reference": "576d8f69feec477067e91b6bd0367c113e76a1a0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Finder/zipball/576d8f69feec477067e91b6bd0367c113e76a1a0",
+ "reference": "576d8f69feec477067e91b6bd0367c113e76a1a0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Finder\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Finder Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-15 14:15:12"
+ },
+ {
+ "name": "symfony/translation",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Translation",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Translation.git",
+ "reference": "059d57c361043f5a06eb348b9b7554213f9ab8d1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Translation/zipball/059d57c361043f5a06eb348b9b7554213f9ab8d1",
+ "reference": "059d57c361043f5a06eb348b9b7554213f9ab8d1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "symfony/config": "~2.0",
+ "symfony/yaml": "~2.2"
+ },
+ "suggest": {
+ "symfony/config": "",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Translation\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Translation Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-15 14:22:44"
+ },
+ {
+ "name": "symfony/validator",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Validator",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Validator.git",
+ "reference": "8205456fe5cae985094a2e2a7b4352d1cef06a25"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Validator/zipball/8205456fe5cae985094a2e2a7b4352d1cef06a25",
+ "reference": "8205456fe5cae985094a2e2a7b4352d1cef06a25",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "symfony/translation": "~2.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "~1.0",
+ "doctrine/cache": "~1.0",
+ "egulias/email-validator": "~1.0",
+ "symfony/config": "~2.2",
+ "symfony/expression-language": "~2.4",
+ "symfony/http-foundation": "~2.1",
+ "symfony/intl": "~2.3",
+ "symfony/property-access": "~2.2",
+ "symfony/yaml": "~2.0"
+ },
+ "suggest": {
+ "doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
+ "doctrine/cache": "For using the default cached annotation reader and metadata cache.",
+ "egulias/email-validator": "Strict (RFC compliant) email validation",
+ "symfony/config": "",
+ "symfony/expression-language": "For using the 2.4 Expression validator",
+ "symfony/http-foundation": "",
+ "symfony/intl": "",
+ "symfony/property-access": "For using the 2.4 Validator API",
+ "symfony/yaml": ""
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Validator\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Validator Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-15 14:15:12"
+ },
+ {
+ "name": "symfony/yaml",
+ "version": "v2.5.2",
+ "target-dir": "Symfony/Component/Yaml",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/Yaml.git",
+ "reference": "f868ecdbcc0276b6158dfbf08b9e98ce07f014e1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/Yaml/zipball/f868ecdbcc0276b6158dfbf08b9e98ce07f014e1",
+ "reference": "f868ecdbcc0276b6158dfbf08b9e98ce07f014e1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Component\\Yaml\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": "http://fabien.potencier.org",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Yaml Component",
+ "homepage": "http://symfony.com",
+ "time": "2014-07-09 09:05:48"
+ }
+ ],
+ "packages-dev": [
+
+ ],
+ "aliases": [
+
+ ],
+ "minimum-stability": "stable",
+ "stability-flags": {
+ "propel/propel": 20
+ },
+ "platform": [
+
+ ],
+ "platform-dev": [
+
+ ]
+}
diff --git a/config/propel.yml b/config/propel.yml
new file mode 100644
index 0000000..2533005
--- /dev/null
+++ b/config/propel.yml
@@ -0,0 +1,23 @@
+propel:
+ paths:
+ projectDir: ./config/
+ schemaDir: ./config/
+ phpDir: ./app/models/
+
+ database:
+ connections:
+ default:
+ adapter: mysql
+ classname: Propel\Runtime\Connection\DebugPDO
+ dsn: mysql:host=%env.LFPR_DB_HOST%;dbname=%env.LFPR_DB_NAME%
+ user: %env.LFPR_DB_USER%
+ password: %env.LFPR_DB_PASSWORD%
+
+ runtime:
+ defaultConnection: default
+
+ generator:
+ defaultConnection: default
+ connections:
+ - default
+
diff --git a/config/schema.xml b/config/schema.xml
new file mode 100644
index 0000000..f2a4683
--- /dev/null
+++ b/config/schema.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/public/bootstrap.php b/public/bootstrap.php
index b08ad57..f717a26 100644
--- a/public/bootstrap.php
+++ b/public/bootstrap.php
@@ -1,6 +1,8 @@
\ No newline at end of file
+?>
diff --git a/readme.md b/readme.md
index e51acad..b62b36e 100644
--- a/readme.md
+++ b/readme.md
@@ -34,10 +34,9 @@ If you're planning on cloning the site and running it locally, follow these simp
1. Clone the repo
2. Create a `tmp` directory on the project directory (and make sure it's writable by apache)
3. `$ cp config/config{.base,}.yml && cp config/database{.base,}.yml`
-4. Run ./makiavelo.php db:create
-5. Run ./makiavelo.php db:load
-6. Run ./makiavelo.php db:migrate
-7. Configure a virtual host, with the following information
+4. Run `vendor/bin/propel build --input-dir=config -vvv`
+5. Run `vendor/bin/propel insert-sql --input-dir=config -vvv`
+6. Configure a virtual host, with the following information
```
ServerAdmin webmaster@dummy-host2.example.com