I am developing a site using symfony2 (2.6.3) on OS X (10.10.1) nginx (1.7.6) with PHP (5.5.20 or 5.6.4 - same errors). When I enter a URL that should give (and had been until some change in the last several weeks) a 404 not found error, I get these PHP errors in prod:
(!) Fatal error: Cannot redeclare class Symfony\Component\Debug\Exception\FlattenException in /srv/www-dev/sf- turtles/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php on line 25
Call Stack
# Time Memory Function Location
1 0.0002 240392 {main}( ) ../app.php:0
2 0.0030 1253672 Symfony\Component\HttpKernel\Kernel->handle( ) ../app.php:27
3 0.0166 4842112 Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle( ) ../bootstrap.php.cache:2376
4 0.0167 4843760 Symfony\Component\HttpKernel\HttpKernel->handle( ) ../bootstrap.php.cache:3131
5 0.0308 5334944 Symfony\Component\HttpKernel\HttpKernel->handleException( ) ../bootstrap.php.cache:2988
6 0.0309 5335272 Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch( ) ../bootstrap.php.cache:3052
7 0.0310 5337312 Symfony\Component\EventDispatcher\EventDispatcher->dispatch( ) ../classes.php:2287
8 0.0311 5337792 Symfony\Component\EventDispatcher\EventDispatcher->doDispatch( ) ../classes.php:2126
9 0.0311 5338144 call_user_func:{/srv/www/sf-turtles/app/cache/prod/classes.php:2193} ( ) ../classes.php:2193
10 0.0311 5338504 Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException( ) ../classes.php:2193
11 0.0327 5344256 Symfony\Component\HttpKernel\EventListener\ExceptionListener->duplicateRequest( ) ../ExceptionListener.php:55
12 0.0327 5344872 spl_autoload_call ( ) ../ExceptionListener.php:115
13 0.0327 5344944 Composer\Autoload\ClassLoader->loadClass( ) ../ExceptionListener.php:0
14 0.0328 5345120 Composer\Autoload\includeFile( ) ../ClassLoader.php:278
15 0.0329 5445056 include( '/srv/www-dev/sf-turtles/vendor/symfony/symfony/src/Symfony/Component/Debug/Exception/FlattenException.php' ) ../ClassLoader .php:386
In dev I get a blank screen.
I have tried to follow what's happening using xdebug, but navigating through the 'compiled' cache code is beyond me.
I suppose I can back off my latest changes until normal 404 operation returns, but I'm not really sure when this problem started and I have put a ton of work into this project in the last several weeks.
Does anyone out there have any ideas on what is the best way to proceed? Or can someone explain this behavior to me?