Awesome Open Source
Awesome Open Source


Propel3 is an open-source Object-Relational Mapping (ORM) for modern PHP 7.1+.

Build Status Code Climate PPM Compatible Gitter

Version 3 of Propel ORM replaces Propel2, which is not maintained anymore. Propel3 introduces a data-mapper implementation which separates your entities from the actual persisting logic.


This is in current development and is not yet ready to use.


  • Propel is blazing fast
  • Data mapper with runtime UnitOfWork for high performance with massive object counts (bulks inserts/updates)
  • Query-Builder
  • Very IDE friendly thanks to code-generation
  • Generation of methods for all columns and relations
  • Database schema migration
  • Schema reverse engineering
  • Customizable
  • Propel comes with common ‘behaviors’
  • Completely unit tested for MySQL, PostgreSQL, SQLite. Oracle and MSSQL are experimental.


Define the entity

<database name="default">
  <entity name="Vendor\Car">
      <field name="id" primaryKey="true" autoIncrement="true" type="INTEGER" />
      <field name="name" type="VARCHAR" required="true"  />
      <relation target="Publisher" onDelete="setnull"/>
      <relation target="Author" onDelete="setnull" onUpdate="cascade"/>
or annotations

In work.

namespace Vendor

use Propel\Annotations\Entity;
use Propel\Annotations\Field;
use Propel\Annotations\PrimaryKey;

 * @Entity()
class Car
     * @PrimaryKey(auto_increment=true)
    private $id;
     * @Field(type="VARCHAR")
    private $name;
    // getters/setters

Data mapper

$propel = new Propel\Runtime\Configuration('path/to/propel.yml');

// require a session for each request/workload
$session = $propel->getSession();

$car = new Vendor\Car();



// use <entity name="Vendor\Car" activeRecord="true">
$car = new Vendor\Car();


Read the Propel documentation. This documentation is for Propel2 still.


Everybody can contribute to Propel. Just fork it, and send Pull Requests. You have to follow PSR2 coding standards and provides unit tests as much as possible.

Please see our contribution guideline. Thank you!


See the LICENSE file.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
php (15,946
orm (359
php7 (254

Find Open Source By Browsing 7,000 Topics Across 59 Categories