{"action":"created","issue":{"url":"https://api.github.com/repos/Payum/Payum/issues/313","labels_url":"https://api.github.com/repos/Payum/Payum/issues/313/labels{/name}","comments_url":"https://api.github.com/repos/Payum/Payum/issues/313/comments","events_url":"https://api.github.com/repos/Payum/Payum/issues/313/events","html_url":"https://github.com/Payum/Payum/pull/313","id":57303660,"number":313,"title":"Add Propel2 bridge","user":{"login":"lovenunu","id":6106094,"avatar_url":"https://avatars.githubusercontent.com/u/6106094?v=3","gravatar_id":"","url":"https://api.github.com/users/lovenunu","html_url":"https://github.com/lovenunu","followers_url":"https://api.github.com/users/lovenunu/followers","following_url":"https://api.github.com/users/lovenunu/following{/other_user}","gists_url":"https://api.github.com/users/lovenunu/gists{/gist_id}","starred_url":"https://api.github.com/users/lovenunu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovenunu/subscriptions","organizations_url":"https://api.github.com/users/lovenunu/orgs","repos_url":"https://api.github.com/users/lovenunu/repos","events_url":"https://api.github.com/users/lovenunu/events{/privacy}","received_events_url":"https://api.github.com/users/lovenunu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T11:21:46Z","updated_at":"2015-02-11T13:17:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Payum/Payum/pulls/313","html_url":"https://github.com/Payum/Payum/pull/313","diff_url":"https://github.com/Payum/Payum/pull/313.diff","patch_url":"https://github.com/Payum/Payum/pull/313.patch"},"body":"This PR adds the support of Propel 2 as a storage.\r\nThe steps to follow to setup the Propel 2 storage are in the ```storage.md``` file.\r\nThe tests are based with Propel master, but as the user has to generate the base classes, the bridge will work with previous version of Propel2.\r\n\r\nIf you want to try it live, you can use this snippet: \r\n```php\r\n<?php\r\n\r\ninclude \"vendor/autoload.php\";\r\n\r\nuse Propel\\Runtime\\Propel;\r\nuse Propel\\Runtime\\Connection\\ConnectionManagerSingle;\r\nuse Payum\\Core\\Bridge\\Propel2\\Storage\\Propel2Storage;\r\n\r\n$serviceContainer = Propel::getServiceContainer();\r\n$serviceContainer->setAdapterClass('default', 'mysql');\r\n$manager = new ConnectionManagerSingle();\r\n$manager->setConfiguration(array (\r\n    'dsn'      => 'mysql:host=localhost;dbname=payum',\r\n    'user'     => 'root',\r\n    'password' => 'root',\r\n));\r\n$serviceContainer->setConnectionManager('default', $manager);\r\n\r\n\r\n$orderStorage = new Propel2Storage(\r\n    \"Payum\\\\Core\\\\Bridge\\\\Propel2\\\\Model\\\\PayumOrder\"\r\n);\r\n\r\n$tokenStorage = new Propel2Storage(\r\n    \"Payum\\\\Core\\\\Bridge\\\\Propel2\\\\Model\\\\PayumToken\"\r\n);\r\n\r\n$order = $orderStorage->create();\r\n\r\nif (!$order instanceof \\Payum\\Core\\Bridge\\Propel2\\Model\\PayumOrder) {\r\n    throw new Exception;\r\n}\r\n\r\n$orderStorage->update($order);\r\n\r\nif (1 <= \\Payum\\Core\\Bridge\\Propel2\\Model\\PayumOrderQuery::create()->count()) {\r\n    echo '\\o/';\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Payum/Payum/issues/comments/73879141","html_url":"https://github.com/Payum/Payum/pull/313#issuecomment-73879141","issue_url":"https://api.github.com/repos/Payum/Payum/issues/313","id":73879141,"user":{"login":"lovenunu","id":6106094,"avatar_url":"https://avatars.githubusercontent.com/u/6106094?v=3","gravatar_id":"","url":"https://api.github.com/users/lovenunu","html_url":"https://github.com/lovenunu","followers_url":"https://api.github.com/users/lovenunu/followers","following_url":"https://api.github.com/users/lovenunu/following{/other_user}","gists_url":"https://api.github.com/users/lovenunu/gists{/gist_id}","starred_url":"https://api.github.com/users/lovenunu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovenunu/subscriptions","organizations_url":"https://api.github.com/users/lovenunu/orgs","repos_url":"https://api.github.com/users/lovenunu/repos","events_url":"https://api.github.com/users/lovenunu/events{/privacy}","received_events_url":"https://api.github.com/users/lovenunu/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T13:17:52Z","updated_at":"2015-02-11T13:17:52Z","body":"Oh. Propel 2 needs php 5.4 to run, so I think it's better to remove it from composer dependencies."}}