Skip to content

Commit aeb49b2

Browse files
committed
Merge pull request #116 from LExpress/doctrine-project-upgrade
Update UPGRADE file about configureDoctrine
2 parents 6ac65f7 + b64c0fb commit aeb49b2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

UPGRADE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,32 @@ Due to the new embed form enhancements:
2626
* You cannot added the same `sfValidatorErrorSchema` instance twice or more into an `sfValidatorErrorSchema`.
2727
* The method `sfValidatorErrorSchema::addErrors` only accept an `sfValidatorErrorSchema` instance as argument.
2828
+ The `sfValidatorErrorSchema` constructor no longer accept an array of errors as second argument.
29+
30+
Doctrine & Project configuration
31+
--------------------------------
32+
33+
Previously, you were able to configure doctrine in your `/config/ProjectConfiguration.class.php` using the method `configureDoctrine`.
34+
This method isn't called anymore. You now need to connect to the `doctrine.configure` event:
35+
36+
```php
37+
<?php
38+
// ...
39+
40+
class ProjectConfiguration extends sfProjectConfiguration
41+
{
42+
public function setup()
43+
{
44+
// ...
45+
46+
$this->dispatcher->connect('doctrine.configure', array($this, 'configureDoctrineEvent'));
47+
}
48+
49+
public function configureDoctrineEvent(sfEvent $event)
50+
{
51+
$manager = $event->getSubject();
52+
53+
// configure what ever you want on the doctrine manager
54+
$manager->setAttribute(Doctrine_Core::ATTR_USE_DQL_CALLBACKS, false);
55+
}
56+
}
57+
```

0 commit comments

Comments
 (0)