Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 428dfddbc5
Fetching contributors…

Cannot retrieve contributors at this time

105 lines (66 sloc) 4.15 kB

List of Backwards Incompatible Changes

Tasks become Commands... and change names

The Phing tasks that you used at buildtime are now refactored to Commands using the Symfony2 Command component. They work the same, but their name has changed.

Replace...           With...
build-model          model:build
build-sql            sql:build
insert-sql           sql:insert
convert-conf         config:convert-xml
diff                 [not yet refactored]
status               migration:status
migrate              [not yet refactored]
up                   migration:up
down                 migration:down
reverse              [not yet refactored]

Propel\Runtime\Propel methods renamed.

Some static methods from the Propel class have been renamed. Therefore, you must replace the following occurrences in your code:

Replace...                                              With...
Propel::CONNECTION_WRITE                                ServiceContainerInterface::CONNECTION_WRITE
Propel::CONNECTION_READ                                 ServiceContainerInterface::CONNECTION_READ
Propel::getDB($name)                                    Propel::getAdapter($name)
Propel::getConnection($name, Propel::CONNECTION_READ)   Propel::getReadConnection($name)
Propel::getConnection($name, Propel::CONNECTION_WRITE)  Propel::getWriteConnection($name)
Propel::getDefaultDB()                                  Propel::getDefaultDatasource()

The generated model is automatically updated once you rebuild your model.

Tip: Internally, Propel::getAdapter() proxies to Propel::getServiceContainer()->getAdapter(). The Propel class was refactored to keep only one static class and to be more extensible. It remains the easy entry point to all the necessary services provided by Propel.

Propel::setConnection() is removed. As for Propel::init($configFilePath), where $configFilePath is the path to the PHP configuration generated by the config:convert-xml command, you can now replace it with include $configFilePath.

Builders renamed

The classes used by Propel internally to build the object model were renamed. This affects your project if you extended one of these classes.

Replace...                       With...
OMBuilder.php                    AbstractOMBuilder.php
ObjectBuilder.php                AbstractObjectBuilder.php
PeerBuilder.php                  AbstractPeerBuilder.php
PHP5ExtensionObjectBuilder.php   ExtensionObjectBuilder.php
PHP5ExtensionPeerBuilder.php     ExtensionPeerBuilder.php
PHP5InterfaceBuilder.php         InterfaceBuilder.php
PHP5MultiExtendObjectBuilder.php MultiExtendObjectBuilder.php
PHP5ObjectBuilder.php            ObjectBuilder.php
PHP5PeerBuilder.php              PeerBuilder.php
PHP5TableMapBuilder.php          TableMapBuilder.php

Base classes reorganized

Base classes are generated in a Base directory, and base classes are no more prefixed by Base.

Parameters basePrefix and namespaceOm have been removed

Propel\Generator\Model\Database methods renamed.

Before:

public function setAppData(AppData $parent)

After:

public function setParentSchema(Schema $parent)

Before:

public function getAppData()

After:

public function getParentSchema()

Propel\Generator\Model\AppData class has been renamed to Schema.

The AppData::joinAppDatas method has been renamed to Schema::joinSchemas.

Before:

public function joinAppDatas($ads)

After:

public function joinSchemas($schemas)

Propel\Generator\Builder\Util\XmlToAppData class has been renamed to SchemaReader.

Both SchemaReader::parseString and SchemaReader::parseFile methods return a Propel\Generator\Model\Schema object instead of a Propel\Generator\Model\AppData object.

Propel\Generator\Util\SchemaValidator constructor signature changed.

Before:

public function __construct(AppData $appData)

After:

public function __construct(Schema $schema)

Propel\Generator\Model\Table::containsColumn method has been removed.

Jump to Line
Something went wrong with that request. Please try again.