Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 99 lines (51 sloc) 3.143 kb
56cef03 William Durand Introducing Propel2
willdurand authored
1 # Propel2 #
2030848 Added exported CVS repository.
hans authored
2
7482ca3 Hari K T 5.4 and up :)
harikt authored
3 Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.4.
f6e8ebe William Durand Added README
willdurand authored
4
80f03ab William Durand Fixed README
willdurand authored
5 [![Build Status](https://secure.travis-ci.org/propelorm/Propel2.png?branch=master)](http://travis-ci.org/propelorm/Propel2)
33f097d William Durand Added travis-ci image
willdurand authored
6
f6e8ebe William Durand Added README
willdurand authored
7
8 ## Requirements ##
9
10 Propel2 uses the following Symfony2 Components:
11
1acccd7 William Durand Start to use **Composer**
willdurand authored
12 * [Console](https://github.com/symfony/Console)
f6e8ebe William Durand Added README
willdurand authored
13 * [Yaml](https://github.com/symfony/Yaml)
811b0f5 Robin Dupret Change php version (5.3.3 instead of 5.3.2) and add 2 Symfony2 component...
robin850 authored
14 * [Finder](https://github.com/symfony/Finder)
15 * [Validator](https://github.com/symfony/Validator)
3ecdcd8 Hugo Hamon Updated README to mention Propel2 now relies on the Symfony2 Filesystem ...
hhamon authored
16 * [Filesystem](https://github.com/symfony/Filesystem)
f6e8ebe William Durand Added README
willdurand authored
17
8136411 William Durand Use Composer autoloader
willdurand authored
18 Propel2 also relies on [**Composer**](https://github.com/composer/composer) to manage dependencies but you
19 also can use [ClassLoader](https://github.com/symfony/ClassLoader) (see the `autoload.php.dist` file for instance).
20
7482ca3 Hari K T 5.4 and up :)
harikt authored
21 Propel2 is only supported on PHP 5.4 and up.
f6e8ebe William Durand Added README
willdurand authored
22
23
56cef03 William Durand Introducing Propel2
willdurand authored
24 ## Installation ##
25
fffbb4a William Durand Updated README
willdurand authored
26 Read the [Propel documentation](http://www.propelorm.org/).
56cef03 William Durand Introducing Propel2
willdurand authored
27
28
fffbb4a William Durand Updated README
willdurand authored
29 ## Contribute ##
30
31 Everybody can contribute to Propel2. Just fork it, and send Pull Requests.
1acccd7 William Durand Start to use **Composer**
willdurand authored
32 You have to follow [Propel2 Coding Standards](https://github.com/propelorm/Propel2/wiki/Coding-Standards) and provides unit tests as much as possible.
fffbb4a William Durand Updated README
willdurand authored
33
34 **Note:** you can fix checkstyle before to submit a Pull Request by using the Symfony2 `check_cs` script.
35 You just need to install [Finder](http://github.com/symfony/Finder) and the script:
36
37 git clone git://github.com/symfony/Finder.git vendor/Symfony/Component/Finder
38
e6b3b6c Robin Dupret Fix typo and add informations in the README file
robin850 authored
39 wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
fffbb4a William Durand Updated README
willdurand authored
40
41 Then use it:
42
e6b3b6c Robin Dupret Fix typo and add informations in the README file
robin850 authored
43 php php-cs-fixer.phar fix .
fffbb4a William Durand Updated README
willdurand authored
44
45
46 ## Unit Tests ##
56cef03 William Durand Introducing Propel2
willdurand authored
47
1acccd7 William Durand Start to use **Composer**
willdurand authored
48 To run unit tests, you'll have to install vendors by using [**Composer**](https://github.com/composer/composer).
49 If you don't have an available `composer.phar` command, just download it:
56cef03 William Durand Introducing Propel2
willdurand authored
50
1acccd7 William Durand Start to use **Composer**
willdurand authored
51 wget http://getcomposer.org/composer.phar
52
6800522 Robin Dupret Fix typo and remove useless insertions
robin850 authored
53 If you haven't wget on your computer, use `curl` instead:
4b61ab9 Robin Dupret Fix a typo for highlight some code in README
robin850 authored
54
d7e81f8 Robin Dupret Fix a breaked link into the README file
robin850 authored
55 curl -s http://getcomposer.org/installer | php
e6b3b6c Robin Dupret Fix typo and add informations in the README file
robin850 authored
56
1acccd7 William Durand Start to use **Composer**
willdurand authored
57 Then, install dependencies:
58
59 php composer.phar install
56cef03 William Durand Introducing Propel2
willdurand authored
60
db01747 William Durand [Tests] The test suite is runnable with SQLite
willdurand authored
61
62 #### MySQL ####
63
19de9ee William Durand Updated README
willdurand authored
64 The Propel test suite requires a database (`test` for instance, but feel free to choose the name you want), and
65 three database schemas: `bookstore_schemas`, `contest`, and `second_hand_books`.
318d4b1 cedric lombardot Update readme to help running tests
cedriclombardot authored
66
6800522 Robin Dupret Fix typo and remove useless insertions
robin850 authored
67 Here is the set of commands to run in order to setup MySQL:
318d4b1 cedric lombardot Update readme to help running tests
cedriclombardot authored
68
def306c Jérémy Romey Fix travis setup
jeremyFreeAgent authored
69 mysql -uroot -e 'SET FOREIGN_KEY_CHECKS = 0; DROP DATABASE IF EXISTS test; DROP SCHEMA IF EXISTS second_hand_books; DROP SCHEMA IF EXISTS contest; DROP SCHEMA IF EXISTS bookstore_schemas; SET FOREIGN_KEY_CHECKS = 1;'
70 mysql -uroot -e 'CREATE DATABASE test; CREATE SCHEMA bookstore_schemas; CREATE SCHEMA contest; CREATE SCHEMA second_hand_books;'
318d4b1 cedric lombardot Update readme to help running tests
cedriclombardot authored
71
dbfcc7c William Durand Updated README
willdurand authored
72 Once done, build fixtures (default vendor is `mysql`):
56cef03 William Durand Introducing Propel2
willdurand authored
73
db01747 William Durand [Tests] The test suite is runnable with SQLite
willdurand authored
74 bin/propel test:prepare
75
def306c Jérémy Romey Fix travis setup
jeremyFreeAgent authored
76 To match Travis CI MySQL configuration, you must set `@@sql_mode` to `STRICT_ALL_TABLES` in yours.
77
dbfcc7c William Durand Updated README
willdurand authored
78 #### PostgreSQL ####
79
80 Create mandatory databases, then run:
81
82 bin/propel test:prepare --vendor=postgres --dsn="dbname=test" --user="postgres"
83
db01747 William Durand [Tests] The test suite is runnable with SQLite
willdurand authored
84 #### SQLite ####
85
dbfcc7c William Durand Updated README
willdurand authored
86 There is nothing to setup, just run:
87
db01747 William Durand [Tests] The test suite is runnable with SQLite
willdurand authored
88 bin/propel test:prepare --vendor=sqlite --dsn="sqlite:/tmp/database.sqlite" --user="" --password=""
89
56cef03 William Durand Introducing Propel2
willdurand authored
90
7b7ddf6 William Durand Update README.md
willdurand authored
91 Now you can run the test suite by running:
56cef03 William Durand Introducing Propel2
willdurand authored
92
fffbb4a William Durand Updated README
willdurand authored
93 phpunit
f6e8ebe William Durand Added README
willdurand authored
94
e6b3b6c Robin Dupret Fix typo and add informations in the README file
robin850 authored
95
f6e8ebe William Durand Added README
willdurand authored
96 ## License ##
97
318d4b1 cedric lombardot Update readme to help running tests
cedriclombardot authored
98 See the `LICENSE` file.
Something went wrong with that request. Please try again.