<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>"yes and no"</td>
</tr>
<tr>
<td>Feature request?</td>
<td>"yes and no"</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>no</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.3.x, probably ever since there is this bridge though (so 2.7 minimum ?)</td>
</tr>
</tbody>
</table>
<p dir="auto">I am currently using the Doctrine bridge on a Flex install. For some reasons, if I add a typehint to an action in a controller (<code class="notranslate">public function myAction(Request $request)</code> for example), it tries to load the <code class="notranslate">form.type_guesser.doctrine</code> service, which in turn implements an interface that is present in the Form Component.</p>
<p dir="auto">I think that if the form component is not available, this service shouldn't be registered, as <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sstok/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sstok">@sstok</a> suggested it on Slack.</p>
<table role="table">
<thead>
<tr>
<th>Q</th>
<th>A</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bug report?</td>
<td>yes</td>
</tr>
<tr>
<td>Feature request?</td>
<td>no</td>
</tr>
<tr>
<td>BC Break report?</td>
<td>yes</td>
</tr>
<tr>
<td>RFC?</td>
<td>no</td>
</tr>
<tr>
<td>Symfony version</td>
<td>3.3.6</td>
</tr>
</tbody>
</table>
<p dir="auto">Install Symfony Flex, create console comand which uses <code class="notranslate">Doctrine\DBAL\Connection</code>, run it and got an error</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Z:\home\dev\gleb-migrator&gt;php bin/console app:migrate-issues                                                                                                                                                                                                 
PHP Fatal error:  Uncaught ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php:25                                               
Stack trace:                                                                                                                                                                                                                                                 
#0 Z:\home\dev\gleb-migrator\vendor\symfony\debug\DebugClassLoader.php(144): require_once('Z:\\home\\dev\\gle...')                                                                                                                                           
#1 [internal function]: Symfony\Component\Debug\DebugClassLoader-&gt;loadClass('Symfony\\Bridge\\...')                                                                                                                                                          
#2 [internal function]: spl_autoload_call('Symfony\\Bridge\\...')                                                                                                                                                                                            
#3 Z:\home\dev\gleb-migrator\vendor\symfony\config\Resource\ClassExistenceResource.php(78): class_exists('Symfony\\Bridge\\...')                                                                                                                             
#4 Z:\home\dev\gleb-migrator\vendor\symfony\config\Resource\SelfCheckingResourceChecker.php(34): Symfony\Component\Config\Resource\ClassExistenceResource-&gt;isFresh(1502115661)                                                                               
#5 Z:\home\dev\gleb-migrator\vendor\symfony\config\ResourceCheckerConfigCache.php(113): Symfony\Component\Config\Resource\SelfCheckingResourceChecker-&gt;isFresh(Object(Symfony\Component\Config\Resource\ClassExistenceResource), 1502115661)                 
 in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                                                                                                                                      
                                                                                                                                                                                                                                                             
Fatal error: Uncaught ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                            
                                                                                                                                                                                                                                                             
ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                                                  
                                                                                                                                                                                                                                                             
Call Stack:                                                                                                                                                                                                                                                  
    0.5601    2716928   1. Symfony\Component\Debug\ErrorHandler-&gt;handleException() Z:\home\dev\gleb-migrator\vendor\symfony\debug\ErrorHandler.php:0                                                                                                         "><pre class="notranslate"><code class="notranslate">Z:\home\dev\gleb-migrator&gt;php bin/console app:migrate-issues                                                                                                                                                                                                 
PHP Fatal error:  Uncaught ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php:25                                               
Stack trace:                                                                                                                                                                                                                                                 
#0 Z:\home\dev\gleb-migrator\vendor\symfony\debug\DebugClassLoader.php(144): require_once('Z:\\home\\dev\\gle...')                                                                                                                                           
#1 [internal function]: Symfony\Component\Debug\DebugClassLoader-&gt;loadClass('Symfony\\Bridge\\...')                                                                                                                                                          
#2 [internal function]: spl_autoload_call('Symfony\\Bridge\\...')                                                                                                                                                                                            
#3 Z:\home\dev\gleb-migrator\vendor\symfony\config\Resource\ClassExistenceResource.php(78): class_exists('Symfony\\Bridge\\...')                                                                                                                             
#4 Z:\home\dev\gleb-migrator\vendor\symfony\config\Resource\SelfCheckingResourceChecker.php(34): Symfony\Component\Config\Resource\ClassExistenceResource-&gt;isFresh(1502115661)                                                                               
#5 Z:\home\dev\gleb-migrator\vendor\symfony\config\ResourceCheckerConfigCache.php(113): Symfony\Component\Config\Resource\SelfCheckingResourceChecker-&gt;isFresh(Object(Symfony\Component\Config\Resource\ClassExistenceResource), 1502115661)                 
 in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                                                                                                                                      
                                                                                                                                                                                                                                                             
Fatal error: Uncaught ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                            
                                                                                                                                                                                                                                                             
ReflectionException: Class Symfony\Component\Form\FormTypeGuesserInterface not found in Z:\home\dev\gleb-migrator\vendor\symfony\doctrine-bridge\Form\DoctrineOrmTypeGuesser.php on line 25                                                                  
                                                                                                                                                                                                                                                             
Call Stack:                                                                                                                                                                                                                                                  
    0.5601    2716928   1. Symfony\Component\Debug\ErrorHandler-&gt;handleException() Z:\home\dev\gleb-migrator\vendor\symfony\debug\ErrorHandler.php:0                                                                                                         
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="composer show
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
clue/stream-filter             v1.3.0  A simple and modern approach to stream filtering in PHP
doctrine/annotations           v1.5.0  Docblock Annotations Parser
doctrine/cache                 v1.7.0  Caching library offering an object-oriented API for many cache backends
doctrine/collections           v1.5.0  Collections Abstraction library
doctrine/common                v2.7.3  Common Library for Doctrine projects
doctrine/dbal                  v2.5.13 Database Abstraction Layer
doctrine/doctrine-bundle       1.6.8   Symfony DoctrineBundle
doctrine/doctrine-cache-bundle 1.3.0   Symfony Bundle for Doctrine Cache
doctrine/inflector             v1.2.0  Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator          1.0.5   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                 v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm                   v2.5.6  Object-Relational-Mapper for PHP
guzzlehttp/guzzle              6.3.0   Guzzle is a PHP HTTP client library
guzzlehttp/promises            v1.3.1  Guzzle promises library
guzzlehttp/psr7                1.4.2   PSR-7 message implementation that also provides common utility methods
jdorn/sql-formatter            v1.2.17 a PHP SQL highlighting library
monolog/monolog                1.23.0  Sends your logs to files, sockets, inboxes, databases and various web services
php-http/cache-plugin          v1.4.0  PSR-6 Cache plugin for HTTPlug
php-http/client-common         1.5.0   Common HTTP Client implementations and tools for HTTPlug
php-http/discovery             1.3.0   Finds installed HTTPlug implementations and PSR-7 message factories
php-http/guzzle6-adapter       v1.1.1  Guzzle 6 HTTP Adapter
php-http/httplug               v1.1.0  HTTPlug, the HTTP client abstraction for PHP
php-http/httplug-bundle        v1.7.0  Symfony integration for HTTPlug
php-http/logger-plugin         v1.0.0  PSR-3 Logger plugin for HTTPlug
php-http/message               1.6.0   HTTP Message related tools
php-http/message-factory       v1.0.2  Factory interfaces for PSR-7 HTTP Message
php-http/promise               v1.0.0  Promise used for asynchronous HTTP requests
php-http/stopwatch-plugin      1.0.1   Symfony Stopwatch plugin for HTTPlug
psr/cache                      1.0.1   Common interface for caching libraries
psr/container                  1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/http-message               1.0.1   Common interface for HTTP messages
psr/log                        1.0.2   Common interface for logging libraries
psr/simple-cache               1.0.0   Common interfaces for simple caching
symfony/cache                  v3.3.6  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/class-loader           v3.3.6  Symfony ClassLoader Component
symfony/config                 v3.3.6  Symfony Config Component
symfony/console                v3.3.6  Symfony Console Component
symfony/debug                  v3.3.6  Symfony Debug Component
symfony/dependency-injection   v3.3.6  Symfony DependencyInjection Component
symfony/doctrine-bridge        v3.3.6  Symfony Doctrine Bridge
symfony/dotenv                 v3.3.6  Registers environment variables from a .env file
symfony/event-dispatcher       v3.3.6  Symfony EventDispatcher Component
symfony/filesystem             v3.3.6  Symfony Filesystem Component
symfony/finder                 v3.3.6  Symfony Finder Component
symfony/flex                   v1.0.14
symfony/framework-bundle       v3.3.6  Symfony FrameworkBundle
symfony/http-foundation        v3.3.6  Symfony HttpFoundation Component
symfony/http-kernel            v3.3.6  Symfony HttpKernel Component
symfony/monolog-bridge         v3.3.6  Symfony Monolog Bridge
symfony/monolog-bundle         v3.1.0  Symfony MonologBundle
symfony/options-resolver       v3.3.6  Symfony OptionsResolver Component
symfony/orm-pack               v1.0.0  A pack for the Doctrine ORM
symfony/polyfill-mbstring      v1.4.0  Symfony polyfill for the Mbstring extension
symfony/routing                v3.3.6  Symfony Routing Component
symfony/stopwatch              v3.3.6  Symfony Stopwatch Component
symfony/var-dumper             v3.3.6  Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                   v3.3.6  Symfony Yaml Component
twig/twig                      v2.4.3  Twig, the flexible, fast, and secure template language for PHP"><pre class="notranslate"><code class="notranslate">composer show
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
clue/stream-filter             v1.3.0  A simple and modern approach to stream filtering in PHP
doctrine/annotations           v1.5.0  Docblock Annotations Parser
doctrine/cache                 v1.7.0  Caching library offering an object-oriented API for many cache backends
doctrine/collections           v1.5.0  Collections Abstraction library
doctrine/common                v2.7.3  Common Library for Doctrine projects
doctrine/dbal                  v2.5.13 Database Abstraction Layer
doctrine/doctrine-bundle       1.6.8   Symfony DoctrineBundle
doctrine/doctrine-cache-bundle 1.3.0   Symfony Bundle for Doctrine Cache
doctrine/inflector             v1.2.0  Common String Manipulations with regard to casing and singular/plural rules.
doctrine/instantiator          1.0.5   A small, lightweight utility to instantiate objects in PHP without invoking their constructors
doctrine/lexer                 v1.0.1  Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
doctrine/orm                   v2.5.6  Object-Relational-Mapper for PHP
guzzlehttp/guzzle              6.3.0   Guzzle is a PHP HTTP client library
guzzlehttp/promises            v1.3.1  Guzzle promises library
guzzlehttp/psr7                1.4.2   PSR-7 message implementation that also provides common utility methods
jdorn/sql-formatter            v1.2.17 a PHP SQL highlighting library
monolog/monolog                1.23.0  Sends your logs to files, sockets, inboxes, databases and various web services
php-http/cache-plugin          v1.4.0  PSR-6 Cache plugin for HTTPlug
php-http/client-common         1.5.0   Common HTTP Client implementations and tools for HTTPlug
php-http/discovery             1.3.0   Finds installed HTTPlug implementations and PSR-7 message factories
php-http/guzzle6-adapter       v1.1.1  Guzzle 6 HTTP Adapter
php-http/httplug               v1.1.0  HTTPlug, the HTTP client abstraction for PHP
php-http/httplug-bundle        v1.7.0  Symfony integration for HTTPlug
php-http/logger-plugin         v1.0.0  PSR-3 Logger plugin for HTTPlug
php-http/message               1.6.0   HTTP Message related tools
php-http/message-factory       v1.0.2  Factory interfaces for PSR-7 HTTP Message
php-http/promise               v1.0.0  Promise used for asynchronous HTTP requests
php-http/stopwatch-plugin      1.0.1   Symfony Stopwatch plugin for HTTPlug
psr/cache                      1.0.1   Common interface for caching libraries
psr/container                  1.0.0   Common Container Interface (PHP FIG PSR-11)
psr/http-message               1.0.1   Common interface for HTTP messages
psr/log                        1.0.2   Common interface for logging libraries
psr/simple-cache               1.0.0   Common interfaces for simple caching
symfony/cache                  v3.3.6  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/class-loader           v3.3.6  Symfony ClassLoader Component
symfony/config                 v3.3.6  Symfony Config Component
symfony/console                v3.3.6  Symfony Console Component
symfony/debug                  v3.3.6  Symfony Debug Component
symfony/dependency-injection   v3.3.6  Symfony DependencyInjection Component
symfony/doctrine-bridge        v3.3.6  Symfony Doctrine Bridge
symfony/dotenv                 v3.3.6  Registers environment variables from a .env file
symfony/event-dispatcher       v3.3.6  Symfony EventDispatcher Component
symfony/filesystem             v3.3.6  Symfony Filesystem Component
symfony/finder                 v3.3.6  Symfony Finder Component
symfony/flex                   v1.0.14
symfony/framework-bundle       v3.3.6  Symfony FrameworkBundle
symfony/http-foundation        v3.3.6  Symfony HttpFoundation Component
symfony/http-kernel            v3.3.6  Symfony HttpKernel Component
symfony/monolog-bridge         v3.3.6  Symfony Monolog Bridge
symfony/monolog-bundle         v3.1.0  Symfony MonologBundle
symfony/options-resolver       v3.3.6  Symfony OptionsResolver Component
symfony/orm-pack               v1.0.0  A pack for the Doctrine ORM
symfony/polyfill-mbstring      v1.4.0  Symfony polyfill for the Mbstring extension
symfony/routing                v3.3.6  Symfony Routing Component
symfony/stopwatch              v3.3.6  Symfony Stopwatch Component
symfony/var-dumper             v3.3.6  Symfony mechanism for exploring and dumping PHP variables
symfony/yaml                   v3.3.6  Symfony Yaml Component
twig/twig                      v2.4.3  Twig, the flexible, fast, and secure template language for PHP
</code></pre></div>