8000 Added deprecation errors in the deprecated registry methods · doctrine/DoctrineBundle@89c7e14 · GitHub
[go: up one dir, main page]

Skip to content

Commit 89c7e14

Browse files
committed
Added deprecation errors in the deprecated registry methods
1 parent 164b55f commit 89c7e14

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Registry.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function __construct(ContainerInterface $container, array $connections, a
5252
*/
5353
public function getDefaultEntityManagerName()
5454
{
55+
trigger_error('getDefaultEntityManagerName is deprecated since Symfony 2.1. Use getDefaultManagerName instead', E_USER_DEPRECATED);
56+
5557
return $this->getDefaultManagerName();
5658
}
5759

@@ -66,6 +68,8 @@ public function getDefaultEntityManagerName()
6668
*/
6769
public function getEntityManager($name = null)
6870
{
71+
trigger_error('getEntityManager is deprecated since Symfony 2.1. Use getManager instead', E_USER_DEPRECATED);
72+
6973
return $this->getManager($name);
7074
}
7175

@@ -78,6 +82,8 @@ public function getEntityManager($name = null)
7882
*/
7983
public function getEntityManagers()
8084
{
85+
trigger_error('getEntityManagers is deprecated since Symfony 2.1. Use getManagers instead', E_USER_DEPRECATED);
86+
8187
return $this->getManagers();
8288
}
8389

@@ -100,6 +106,8 @@ public function getEntityManagers()
100106
*/
101107
public function resetEntityManager($name = null)
102108
{
109+
trigger_error('resetEntityManager is deprecated since Symfony 2.1. Use resetManager instead', E_USER_DEPRECATED);
110+
103111
$this->resetManager($name);
104112
}
105113

@@ -114,6 +122,8 @@ public function resetEntityManager($name = null)
114122
*/
115123
public function getEntityNamespace($alias)
116124
{
125+
trigger_error('getEntityNamespace is deprecated since Symfony 2.1. Use getAliasNamespace instead', E_USER_DEPRECATED);
126+
117127
return $this->getAliasNamespace($alias);
118128
}
119129

@@ -147,6 +157,8 @@ public function getAliasNamespace($alias)
147157
*/
148158
public function getEntityManagerNames()
149159
{
160+
trigger_error('getEntityManagerNames is deprecated since Symfony 2.1. Use getManagerNames instead', E_USER_DEPRECATED);
161+
150162
return $this->getManagerNames();
151163
}
152164

@@ -159,6 +171,8 @@ public function getEntityManagerNames()
159171
*/
160172
public function getEntityManagerForClass($class)
161173
{
174+
trigger_error('getEntityManagerForClass is deprecated since Symfony 2.1. Use getManagerForClass instead', E_USER_DEPRECATED);
175+
162176
return $this->getManagerForClass($class);
163177
}
164178
}

0 commit comments

Comments
 (0)
0