Skip to content

Exception in Doctrine's Cache Warmer results in blank Page in Production Environment #5732

Closed
@stollr

Description

@stollr

Hi.
I had the problem that I got a blank page when I loaded the application the first time after removing the cache directory (only on production environment). Nothing was shown or logged. Only the PHP error log said

PHP Fatal error:  Uncaught exception 'ReflectionException' with message 'Class integer does not exist' in C:\projects\osl\trunk\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php:226
Stack trace:
#0 C:\projects\osl\trunk\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php(226): ReflectionParameter->getClass()
#1 C:\projects\osl\trunk\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php(160): Doctrine\ORM\Proxy\ProxyFactory->_generateMethods(Object(Doctrine\ORM\Mapping\ClassMetadata))
#2 C:\projects\osl\trunk\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php(144): Doctrine\ORM\Proxy\ProxyFactory->_generateProxyClass(Object(Doctrine\ORM\Mapping\ClassMetadata), 'C:/projects/osl...', '<?php??namespac...')
#3 C:\projects\osl\trunk\vendor\symfony\src\Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer.php(68): Doctrine\ORM\Proxy\ProxyFactory->generateProxyClasses(Array)
#4 C:\projects\osl\trunk\vendor\symfony\src\Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate.php(47): Symfony\Bridge\Doctrine\CacheWa in C:\projects\osl\trunk\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php on line 226

The problem was that there has been made a mistake in an entity (class \integer did not exist):

public function setAdrid(\integer $adrid)
{
    $this->adrid = $adrid;
    return $this;
}

It would be nice if this exception could be catched anywhere in Symfony and the error page could be loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions