Skip to content

Installation

  • PHP 8.5 or higher, with the dom (libxml2) extension enabled

  • A supported database, and its PDO driver:

    EngineMinimum versionPDO extension
    PostgreSQL (recommended and default)16pdo_pgsql
    MySQL8.0pdo_mysql
    MariaDB10.5pdo_mysql
    SQLite3.35pdo_sqlite
    MSSQL / SQL Server2012pdo_dblib
    Oracle12cpdo_oci (must be built from source)
  • Composer

See Supported databases for driver setup — in particular for Oracle, where pdo_oci isn’t distributed as a prebuilt package for any current PHP version and has to be compiled against an Oracle Instant Client.

Propulsion depends on a handful of Symfony components (symfony/console, symfony/yaml), psr/log for its logging interface, psr/event-dispatcher for model events, psr/simple-cache for the PSR-16 cache contract the query cache is written against, and psr/http-client, psr/http-factory and php-http/discovery — the PSR-18/PSR-17 interfaces and the discovery shim that finds a concrete HTTP client at runtime — for exporting OpenTelemetry spans over OTLP. All of these are interface packages rather than implementations, and Composer pulls them in automatically.

Propulsion is available on Packagist. The latest stable version is v3.0.0 — if you’re upgrading an existing 2.x project rather than starting fresh, read Upgrading from 2.x to 3.0 first, since it changes the shape of every generated stub class.

Terminal window
composer require quioteframework/propulsion

Or add it to your composer.json manually:

{
"require": {
"quioteframework/propulsion": "^3.0"
}
}

Then run:

Terminal window
composer install

Propulsion ships a single console script, bin/propulsion, that replaces everything Propel 1 did through Phing. It’s a plain Symfony Console application — no build.xml, no Ant, no propel-gen wrapper script. Check that it’s available:

Terminal window
vendor/bin/propulsion

This prints the Propulsion version and the full list of available commands:

CommandPurpose
initScaffold a new project’s directory structure, a sample schema, and a starter config file
model:buildGenerate Object Model and Query classes from a schema
sql:buildGenerate SQL DDL from a schema
sql:execRun .sql files against a live database
sql:diffCompare a schema against a live database and generate migration SQL
schema:reverseGenerate a schema from an existing database
graph:buildRender a schema as a Graphviz diagram
migration:statusList pending and already-applied migrations
migration:upExecute the next pending migration
migration:downRevert the most recently applied migration
data:dumpDump the rows of a live database into an XML dataset file
data:sqlConvert an XML dataset file into INSERT SQL

See Building your schema for model:build and sql:build in detail, Migrations for the migration:* commands and the versioning table they read, XML dataset fixtures for the data:* pair, and Migrating from Propel 1 for the full old-Phing-target-to-new-command mapping.

bin/propulsion init asks a couple of questions and creates a starting point for a new project:

Terminal window
vendor/bin/propulsion init

It prompts for a project name (used to name the generated directory and the sample database) and a database platform (mysql, postgresql, sqlite, oracle, or mssql), then creates:

  • <project>/schema/ — holds your schema XML files, seeded with a sample schema.xml describing a small user/post data model (with a timestampable behavior and a foreign key between them) so you have something to build against immediately
  • <project>/generated-classes/ — the default output directory model:build writes Object Model and Query classes into
  • <project>/generated-sql/ — the default output directory sql:build writes DDL into
  • a starter connection configuration file with a DSN guessed from the platform you picked (e.g. pgsql:host=localhost;dbname=<project>) and placeholder credentials you’ll need to edit

Treat the generated config as a starting point rather than a final answer — for a real project you’ll want to move to a build.php file (see Building your schema) once you’re past the initial scaffold. From there, the workflow is the same one init prints at the end: edit the schema, run model:build, then sql:build and sql:exec to create the tables.

With Propulsion installed, move on to Building your schema to describe a data model in XML and generate PHP classes from it.