Ticket #936 (closed defect: fixed)
Adding Child Template to Template doesn't work since 0.10.1
| Reported by: | micatom | Owned by: | romanb |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.11.0 |
| Component: | Record | Version: | 0.11.0 |
| Severity: | Keywords: | addChild Record Generator Template | |
| Cc: | Has Test: | ||
| Status: | Has Patch: |
Description
Taking Wiki Class example :
i18n->addChild() doesn't work anymore since 0.10.1 release.
addChild(Doctrine_Template) is delegated to the Doctrine_Record_Generator::addChild(Doctrine_Record_Generator)
it breaks causing a cast error.
<?php
class Wiki extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('title', 'string', 255);
$this->hasColumn('content', 'string');
}
public function setUp()
{
$options = array('fields' => array('title', 'content'));
$auditLog = new Doctrine_Template_Versionable($options);
$search = new Doctrine_Template_Searchable($options);
$slug = new Doctrine_Template_Sluggable($options);
$i18n = new Doctrine_Template_I18n($options);
$i18n->addChild($auditLog)
->addChild($search)
->addChild($slug);
$this->actAs($i18n);
$this->actAs('Timestampable');
}
}
Result :
Catchable fatal error: Argument 1 passed to Doctrine_Record_Generator::addChild() must be an instance of Doctrine_Record_Generator, instance of Doctrine_Template_Searchable given, called in C:serverApache2htdocssharedDoctrineDoctrineTemplate.php on line 98 and defined in C:serverApache2htdocssharedDoctrineDoctrineRecordGenerator.php on line 115
Attachments
Change History
Note: See
TracTickets for help on using
tickets.