Skip to content

Commit 695e078

Browse files
committed
Remove deprecated doctrine init and form file
1 parent 0aedde3 commit 695e078

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

lib/plugins/sfDoctrinePlugin/lib/database/sfDoctrineDatabase.class.php

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ public function initialize($parameters = array())
103103
$this->_doctrineConnection->addListener($this->profiler, 'symfony_profiler');
104104
}
105105

106-
// Invoke the configuration methods for the connection if they exist (deprecated in favor of the "doctrine.configure_connection" event)
107-
$method = sprintf('configureDoctrineConnection%s', ucwords($this->_doctrineConnection->getName()));
108-
109-
if (method_exists($configuration, 'configureDoctrineConnection') && ! method_exists($configuration, $method))
110-
{
111-
$configuration->configureDoctrineConnection($this->_doctrineConnection);
112-
}
113-
114-
if (method_exists($configuration, $method))
115-
{
116-
$configuration->$method($this->_doctrineConnection);
117-
}
118-
119106
$dispatcher->notify(new sfEvent($manager, 'doctrine.configure_connection', array('connection' => $this->_doctrineConnection, 'database' => $this)));
120107
}
121108

@@ -131,7 +118,7 @@ public function getDoctrineConnection()
131118

132119
/**
133120
* Returns the connection profiler.
134-
*
121+
*
135122
* @return sfDoctrineConnectionProfiler|null
136123
*/
137124
public function getProfiler()
@@ -160,9 +147,9 @@ public function shutdown()
160147
{
161148
$this->connection = null;
162149
}
163-
if ($this->_doctrineConnection !== null)
164-
{
165-
$this->_doctrineConnection->getManager()->closeConnection($this->_doctrineConnection);
150+
if ($this->_doctrineConnection !== null)
151+
{
152+
$this->_doctrineConnection->getManager()->closeConnection($this->_doctrineConnection);
166153
}
167154
}
168-
}
155+
}

lib/plugins/sfDoctrinePlugin/lib/form/sfFormDoctrine.class.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,11 +395,6 @@ protected function saveFile($field, $filename = null, sfValidatedFile $file = nu
395395
{
396396
return $file->save($this->getObject()->$method($file));
397397
}
398-
else if (method_exists($this->getObject(), $method = sprintf('generate%sFilename', $field)))
399-
{
400-
// this non-camelized method name has been deprecated
401-
return $file->save($this->getObject()->$method($file));
402-
}
403398
else
404399
{
405400
return $file->save();

0 commit comments

Comments
 (0)