All php builds fail

Hello everyone,

this morning all our php builds fail with a strange error.

Script cache:clear returned with error code 255
!! Fatal error: During class fetch: Uncaught ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in /var/www/app/php/vendor/symfony/doctrine-bridge/Form/DoctrineOrmTypeGuesser.php:25
!! Stack trace:
!! #0 /var/www/app/php/vendor/symfony/debug/DebugClassLoader.php(143): require(’/var/www/app/ph…’)
!! #1 [internal function]: Symfony\Component\Debug\DebugClassLoader->loadClass(‘Symfony\Bridge\…’)
!! #2 [internal function]: spl_autoload_call(‘Symfony\Bridge\…’)
!! #3 /var/www/app/php/vendor/symfony/config/Resource/ClassExistenceResource.php(76): class_exists(‘Symfony\Bridge\…’)
!! #4 /var/www/app/php/vendor/symfony/dependency-injection/ContainerBuilder.php(349): Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0)
!! #5 /var/www/app/php/vendor/symfony/dependency-injection/Compiler/AutowirePass.php(312): Symfony\Component\DependencyInjection\ContainerBuilder->getReflectionClass(‘Symfony\Bridge\…’, false)
!! #6 /var/www/app/php/vendor/symfony/dependency-injection/Compiler/AutowirePass.php in /var/www/app/php/vendor/symfony/doctrine-bridge/Form/DoctrineOrmTypeGuesser.php on line 25
!! In DoctrineOrmTypeGuesser.php line 25:
!! Error: During class fetch: Uncaught ReflectionException: Class Symfony\Comp
!! onent\Form\FormTypeGuesserInterface not found in /var/www/app/php/vendor/sy
!! mfony/doctrine-bridge/Form/DoctrineOrmTypeGuesser.php:25
!! Stack trace:
!! #0 /var/www/app/php/vendor/symfony/debug/DebugClassLoader.php(143): require
!! (’/var/www/app/ph…’)
!! #1 [internal function]: Symfony\Component\Debug\DebugClassLoader->loadClass
!! (‘Symfony\Bridge\…’)
!! #2 [internal function]: spl_autoload_call(‘Symfony\Bridge\…’)
!! #3 /var/www/app/php/vendor/symfony/config/Resource/ClassExistenceResource.p
!! hp(76): class_exists(‘Symfony\Bridge\…’)
!! #4 /var/www/app/php/vendor/symfony/dependency-injection/
!! p(349): Symfony\Component\Config\Resource\ClassExistenceResource->isFresh(0
!! )
!! #5 /var/www/app/php/vendor/symfony/dependency-injection/Compiler/AutowirePa
!! ss.php(312): Symfony\Component\DependencyInjection\ContainerBuilder->getRef
!! lectionClass(‘Symfony\Bridge\…’, false)
!! #6 /var/www/app/php/vendor/symfony/dependency-injection/Compiler/AutowirePa
!! ss.php

Looks like the code is not in the container. I tried to build the Docker image locally and everything success correctly.

You could request a (re)build with SSH from the CircleCI UI, and then you can debug by looking around the container. There is generally no reason why a working build will stop working, so perhaps something changed on your side.

Obviously, if you want more feedback than that, readers would need to see your config and a detailed description of your set-up. Are you using PHP in the Docker executor, or PHP in Docker in the Docker executor (Docker-in-Docker)?

Thanks for the reply and suggest that I can use SSH to the CicleCI UI. Now I’m debuging the problem there and looks that the problem come from new php version.

Hey hhristof do you have any pointer to help me solve the very same issue?
Thanks in advance

@barrycarton: this is almost certainly a PHP/app issue. I’ve built PHP apps on CircleCI for a couple of years, and I get one or two (network) failures per year. PHP testing is extremely stable on CircleCI.

@hhristoff suggests the issue is the PHP version may have changed. If that is the case, you need to find a way to pin the PHP version to be identical to the one you use in production. There is much less value in running tests/builds on a different PHP version.

I would urge you to use the SSH feature to dig about, and perhaps the first thing you could do is run php -v to see if it is exactly correct. If it is not, then you could paste your config.yml here to get some advice on how to fix that.

Hello everyone,

first I want to thanks for the support. I already fix my problem with the build.

@halfer Yes, my problem come from different version of php and dependencies of the project. After some debug I found all things that I should change and fix my problem.

@barrycarton maybe your issue is the same. Check with ssh what kind of problems you want :wink: