This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Propel 2 integration with Nette framework

1.0.1 2014-05-15 19:21 UTC

This package is not auto-updated.

Last update: 2021-11-27 00:07:59 UTC


Propel 2 integration with Nette Framework


Can be used as compiler extension:

        - NettePropel2\PropelExtension

or calling setup() in bootstrap.php:

  use NettePropel2;
  $container = $configurator->createContainer();

You can use both Neon or PHP to configure the database (If both are present, the php will be preferred).

In propel.local.php:

  $database = [
      'default' => [
          'adapter'     => 'sqlite|pgsql|mysql|oracle|mssql',
          'host'        => 'host',
          'dbname'      => 'dbname',
          'user'        => 'user',
          'password'    => 'password'

Or propel.local.neon:

    adapter: sqlite|pgsql|mysql|oracle|mssql
    host: host
    dbname: dbname
    user: user
    password: password

Schema and shell

You schema.xml must be on app/schema directory.

To run propel commands (model:build, migration:diff, etc) use the npropel shell instead of propel. The npropel script will set the --input-dir, --output-dir and --connection parameters to your project.

  ln -s vendor/bin/npropel propel