Git Product home page Git Product logo

propel2's Introduction

Propel2 #

Propel2 is an open-source Object-Relational Mapping (ORM) for PHP 5.4.

Build Status

Requirements

Propel2 uses the following Symfony2 Components:

Propel2 also relies on Composer to manage dependencies but you also can use ClassLoader (see the autoload.php.dist file for instance).

Propel2 is only supported on PHP 5.4 and up.

Installation

Read the Propel documentation.

Contribute

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 php-cs-fixer script. You just need to install the script:

wget http://cs.sensiolabs.org/get/php-cs-fixer.phar

Then use it:

php php-cs-fixer.phar fix .

Unit Tests

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:

wget http://getcomposer.org/composer.phar

If you haven't wget on your computer, use curl instead:

curl -s http://getcomposer.org/installer | php

Then, install dependencies:

php composer.phar install --dev

MySQL

The Propel test suite requires a database (test for instance, but feel free to choose the name you want), and three database schemas: bookstore_schemas, contest, and second_hand_books.

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 mysql):

bin/propel test:prepare

To match Travis CI MySQL configuration, you must set @@sql_mode to STRICT_ALL_TABLES in yours.

PostgreSQL

Create mandatory databases, then run:

bin/propel test:prepare --vendor=pgsql --dsn="pgsql:dbname=test" --user="postgres"

SQLite

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:

phpunit

License

See the LICENSE file.

propel2's People

Contributors

fzaninotto avatar willdurand avatar jaugustin avatar cristianoc72 avatar robin850 avatar themouette avatar mhitza avatar k-phoen avatar staabm avatar andrey-yantsen avatar nnarhinen avatar lunika avatar gigablah avatar rouffj avatar gromnan avatar havvg avatar kendallhopkins avatar benoitleveque avatar nibsirahsieu avatar cedriclombardot avatar shanielh avatar pablogd avatar jeremyfreeagent avatar harikt avatar rozwell avatar pborreli avatar ludofleury avatar etienneroudeix avatar mskarupianski avatar mazenovi avatar

Watchers

Alessandro Di Candia avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.