Skip to content

Commit

Permalink
Merge pull request #116 from LExpress/doctrine-project-upgrade
Browse files Browse the repository at this point in the history
Update UPGRADE file about configureDoctrine
  • Loading branch information
j0k3r committed Feb 2, 2016
2 parents 6ac65f7 + b64c0fb commit aeb49b2
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,32 @@ Due to the new embed form enhancements:
* You cannot added the same `sfValidatorErrorSchema` instance twice or more into an `sfValidatorErrorSchema`.
* The method `sfValidatorErrorSchema::addErrors` only accept an `sfValidatorErrorSchema` instance as argument.
+ The `sfValidatorErrorSchema` constructor no longer accept an array of errors as second argument.

Doctrine & Project configuration
--------------------------------

Previously, you were able to configure doctrine in your `/config/ProjectConfiguration.class.php` using the method `configureDoctrine`.
This method isn't called anymore. You now need to connect to the `doctrine.configure` event:

```php
<?php
// ...

class ProjectConfiguration extends sfProjectConfiguration
{
public function setup()
{
// ...

$this->dispatcher->connect('doctrine.configure', array($this, 'configureDoctrineEvent'));
}

public function configureDoctrineEvent(sfEvent $event)
{
$manager = $event->getSubject();

// configure what ever you want on the doctrine manager
$manager->setAttribute(Doctrine_Core::ATTR_USE_DQL_CALLBACKS, false);
}
}
```

0 comments on commit aeb49b2

Please sign in to comment.