symfony/symfony — Issue #2771: ProxyFactory Issue
Author: codabit
Created: 2011-12-02 16:57:16+00:00
State: open

Hi,
I have found a problem/error. I have a relationship between two entities (One User has Many Contracts).
If I want to query the contracts with the following code:

```php
getDoctrine()
->getRepository('DomiconAdminBundle:User')
->find(2);

return $this->render('DomiconMemberBundle:Domain:contract.html.twig', array(
'controller' => 'Domain',
'contracts' => $user->getContracts()
));
}
...
?>
```
Now I want to access the Contract entitiy in my template:
```
{% for Contract in contracts %}
{% debug Contract %}
{% endfor %}
```

and I get the following error:
```
An exception has been thrown during the rendering of a template ("Class sting does not exist") in DomiconMemberBundle:Domain:contract.html.twig at line 6.
```
```
ReflectionException: Class sting does not exist
in C:\xampp\htdocs\Domicon\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php at line 192
}
// We need to pick the type hint class too
if (($paramClass = $param->getClass()) !== null) {
$parameterString .= '\\' . $paramClass->getName() . ' ';
} else if ($param->isArray()) {
$parameterString .= 'array ';
```
What and where is class sting? I didn't find any solution, so I'm asking here :)