Skip to content

HTTPS clone URL

Subversion checkout URL

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