File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/LiveComponent/src/Hydration Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -102,18 +102,13 @@ private function objectManagerFor(string $class): ?ObjectManager
102
102
103
103
foreach ($ this ->managerRegistries as $ registry ) {
104
104
foreach ($ registry ->getManagers () as $ om ) {
105
- // the getClassMetaData can indeed throw an exception
106
- // so, we
105
+
107
106
try {
108
107
if (null !== $ om ->getClassMetadata ($ class )) {
109
108
return self ::ensureManagedObject ($ om , $ class );
110
109
}
111
110
} catch (MappingException $ e ) {
112
- // I did not find a nice way to check if it is because the class is really unknown
113
- // It is good to check for a specific exception ?
114
- // eg: \Doctrine\Persistence\Mapping\MappingException
115
- // @see \Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::getMetadataFor
116
- // throw $e;
111
+ // Catching Excpetion in case of the $class does not match a valid classname or a valid interface name
117
112
}
118
113
}
119
114
}
You can’t perform that action at this time.
0 commit comments