Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: bc1ea20fe1
Fetching contributors…

Cannot retrieve contributors at this time

144 lines (88 sloc) 6.035 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.

Propel\Generator\Model\VendorInfo::addParameter method has been removed.

Propel\Generator\Model\Column::setTypeFromString method has been removed.

Propel\Generator\Model\Column::getPropelType method has been removed.

Propel\Generator\Model\Column::getDefaultSetting method has been removed.

Propel\Generator\Model\Column::makeList method has been removed.

Propel\Generator\Model\Column::printSize method has been renamed to Propel\Generator\Model\Column::getSizeDefinition.

Propel\Generator\Model\ForeignKey::getLocalColumnNames method has been removed.

Propel\Generator\Model\ForeignKey::getForeignColumnNames method has been removed.

Propel\Generator\Model\Domain::printSize method has been renamed to

Propel\Generator\Model\Domain::getSizeDefinition.

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

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

Propel\Generator\Model\PropelTypes::getCreoleTypes method has been removed.

Propel\Generator\Model\ScopedElement class has been renamed to Propel\Generator\Model\ScopedMappingModel.

Propel\Generator\Model\XmlElement class has been renamed to Propel\Generator\Model\MappingModel.

Propel\Generator\Model\XmlElement::loadFromXml method has been renamed to Propel\Generator\Model\MappingModel::loadMapping.

Propel\Runtime\Om\BaseObject class has been removed.

All base object methods have been merged in generated Base Object classes. This could break, behaviors that call parent methods

Propel\Runtime\Om\Persistent Interface replaced by Propel\Runtime\Om\ActiveRecordInterface

All methods from Propel\Runtime\Om\Persistent Interface have been removed All Base Object classes now implements Propel\Runtime\Om\ActiveRecordInterface this could be use to identify a Propel Object

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