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
102102
103103 foreach ($ this ->managerRegistries as $ registry ) {
104104 foreach ($ registry ->getManagers () as $ om ) {
105- // the getClassMetaData can indeed throw an exception
106- // so, we
105+
107106 try {
108107 if (null !== $ om ->getClassMetadata ($ class )) {
109108 return self ::ensureManagedObject ($ om , $ class );
110109 }
111110 } 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
117112 }
118113 }
119114 }
You can’t perform that action at this time.
0 commit comments