Permalink
Browse files

Added deprecation errors in the deprecated registry methods

  • Loading branch information...
1 parent 164b55f commit 89c7e1486dcf162ef0b5848209748fcc556e1486 @stof stof committed Jan 12, 2013
Showing with 14 additions and 0 deletions.
  1. +14 −0 Registry.php
View
@@ -52,6 +52,8 @@ public function __construct(ContainerInterface $container, array $connections, a
*/
public function getDefaultEntityManagerName()
{
+ trigger_error('getDefaultEntityManagerName is deprecated since Symfony 2.1. Use getDefaultManagerName instead', E_USER_DEPRECATED);
+
return $this->getDefaultManagerName();
}
@@ -66,6 +68,8 @@ public function getDefaultEntityManagerName()
*/
public function getEntityManager($name = null)
{
+ trigger_error('getEntityManager is deprecated since Symfony 2.1. Use getManager instead', E_USER_DEPRECATED);
+
return $this->getManager($name);
}
@@ -78,6 +82,8 @@ public function getEntityManager($name = null)
*/
public function getEntityManagers()
{
+ trigger_error('getEntityManagers is deprecated since Symfony 2.1. Use getManagers instead', E_USER_DEPRECATED);
+
return $this->getManagers();
}
@@ -100,6 +106,8 @@ public function getEntityManagers()
*/
public function resetEntityManager($name = null)
{
+ trigger_error('resetEntityManager is deprecated since Symfony 2.1. Use resetManager instead', E_USER_DEPRECATED);
+
$this->resetManager($name);
}
@@ -114,6 +122,8 @@ public function resetEntityManager($name = null)
*/
public function getEntityNamespace($alias)
{
+ trigger_error('getEntityNamespace is deprecated since Symfony 2.1. Use getAliasNamespace instead', E_USER_DEPRECATED);
+
return $this->getAliasNamespace($alias);
}
@@ -147,6 +157,8 @@ public function getAliasNamespace($alias)
*/
public function getEntityManagerNames()
{
+ trigger_error('getEntityManagerNames is deprecated since Symfony 2.1. Use getManagerNames instead', E_USER_DEPRECATED);
+
return $this->getManagerNames();
}
@@ -159,6 +171,8 @@ public function getEntityManagerNames()
*/
public function getEntityManagerForClass($class)
{
+ trigger_error('getEntityManagerForClass is deprecated since Symfony 2.1. Use getManagerForClass instead', E_USER_DEPRECATED);
+
return $this->getManagerForClass($class);
}
}

0 comments on commit 89c7e14

Please sign in to comment.