Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.4.
Propel2 uses the following Symfony2 Components:
Propel2 is only supported on PHP 5.4 and up.
Read the Propel documentation.
Everybody can contribute to Propel2. Just fork it, and send Pull Requests. You have to follow Propel2 Coding Standards and provides unit tests as much as possible.
Note: you can fix checkstyle before to submit a Pull Request by using the Symfony2
You just need to install Finder and the script:
git clone git://github.com/symfony/Finder.git vendor/Symfony/Component/Finder wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
Then use it:
php php-cs-fixer.phar fix .
To run unit tests, you'll have to install vendors by using Composer.
If you don't have an available
composer.phar command, just download it:
If you haven't wget on your computer, use
curl -s http://getcomposer.org/installer | php
Then, install dependencies:
php composer.phar install
The Propel test suite requires a database (
test for instance, but feel free to choose the name you want), and
three database schemas:
Here is the set of commands to run in order to setup MySQL:
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;' mysql -uroot -e 'CREATE DATABASE test; CREATE SCHEMA bookstore_schemas; CREATE SCHEMA contest; CREATE SCHEMA second_hand_books;'
Once done, build fixtures (default vendor is
To match Travis CI MySQL configuration, you must set
STRICT_ALL_TABLES in yours.
Create mandatory databases, then run:
bin/propel test:prepare --vendor=postgres --dsn="dbname=test" --user="postgres"
There is nothing to setup, just run:
bin/propel test:prepare --vendor=sqlite --dsn="sqlite:/tmp/database.sqlite" --user="" --password=""
Now you can run the test suite by running: