dbal.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" ?>
  2. <container xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  5. <parameters>
  6. <parameter key="doctrine.dbal.logger.chain.class">Doctrine\DBAL\Logging\LoggerChain</parameter>
  7. <parameter key="doctrine.dbal.logger.profiling.class">Doctrine\DBAL\Logging\DebugStack</parameter>
  8. <parameter key="doctrine.dbal.logger.class">Symfony\Bridge\Doctrine\Logger\DbalLogger</parameter>
  9. <parameter key="doctrine.dbal.configuration.class">Doctrine\DBAL\Configuration</parameter>
  10. <parameter key="doctrine.data_collector.class">Doctrine\Bundle\DoctrineBundle\DataCollector\DoctrineDataCollector</parameter>
  11. <parameter key="doctrine.dbal.connection.event_manager.class">Symfony\Bridge\Doctrine\ContainerAwareEventManager</parameter>
  12. <parameter key="doctrine.dbal.connection_factory.class">Doctrine\Bundle\DoctrineBundle\ConnectionFactory</parameter>
  13. <parameter key="doctrine.dbal.events.mysql_session_init.class">Doctrine\DBAL\Event\Listeners\MysqlSessionInit</parameter>
  14. <parameter key="doctrine.dbal.events.oracle_session_init.class">Doctrine\DBAL\Event\Listeners\OracleSessionInit</parameter>
  15. <parameter key="doctrine.class">Doctrine\Bundle\DoctrineBundle\Registry</parameter>
  16. <parameter key="doctrine.entity_managers" type="collection"></parameter>
  17. <parameter key="doctrine.default_entity_manager"></parameter>
  18. </parameters>
  19. <services>
  20. <service id="Doctrine\DBAL\Driver\Connection" alias="database_connection" public="false" />
  21. <service id="Doctrine\DBAL\Connection" alias="database_connection" public="false" />
  22. <service id="doctrine.dbal.logger.chain" class="%doctrine.dbal.logger.chain.class%" public="false" abstract="true" >
  23. <!-- TODO: deprecate this service in 2.3.0 -->
  24. </service>
  25. <service id="doctrine.dbal.logger.profiling" class="%doctrine.dbal.logger.profiling.class%" public="false" abstract="true" />
  26. <service id="doctrine.dbal.logger.backtrace" class="Doctrine\Bundle\DoctrineBundle\Dbal\Logging\BacktraceLogger" public="false" abstract="true" />
  27. <service id="doctrine.dbal.logger" class="%doctrine.dbal.logger.class%" public="false">
  28. <tag name="monolog.logger" channel="doctrine" />
  29. <argument type="service" id="logger" on-invalid="null" />
  30. <argument type="service" id="debug.stopwatch" on-invalid="null" />
  31. </service>
  32. <service id="data_collector.doctrine" class="%doctrine.data_collector.class%" public="false">
  33. <tag name="data_collector" template="@Doctrine/Collector/db.html.twig" id="db" priority="250" />
  34. <argument type="service" id="doctrine" />
  35. <argument>true</argument>
  36. </service>
  37. <service id="doctrine.dbal.connection_factory" class="%doctrine.dbal.connection_factory.class%">
  38. <argument>%doctrine.dbal.connection_factory.types%</argument>
  39. </service>
  40. <service id="doctrine.dbal.connection" class="Doctrine\DBAL\Connection" abstract="true">
  41. <factory service="doctrine.dbal.connection_factory" method="createConnection" />
  42. </service>
  43. <service id="doctrine.dbal.connection.event_manager" class="%doctrine.dbal.connection.event_manager.class%" public="false" abstract="true">
  44. <argument type="service" id="service_container" />
  45. </service>
  46. <service id="doctrine.dbal.connection.configuration" class="%doctrine.dbal.configuration.class%" public="false" abstract="true" />
  47. <service id="doctrine" class="%doctrine.class%" public="true">
  48. <argument type="service" id="service_container" />
  49. <argument>%doctrine.connections%</argument>
  50. <argument>%doctrine.entity_managers%</argument>
  51. <argument>%doctrine.default_connection%</argument>
  52. <argument>%doctrine.default_entity_manager%</argument>
  53. <tag name="kernel.reset" method="reset" />
  54. </service>
  55. <service id="Doctrine\Persistence\ManagerRegistry" alias="doctrine" public="false" />
  56. <service id="Doctrine\Common\Persistence\ManagerRegistry" alias="doctrine" public="false" />
  57. <service id="doctrine.twig.doctrine_extension" class="Doctrine\Bundle\DoctrineBundle\Twig\DoctrineExtension" public="false">
  58. <tag name="twig.extension" />
  59. </service>
  60. <service id="doctrine.dbal.schema_asset_filter_manager" class="Doctrine\Bundle\DoctrineBundle\Dbal\SchemaAssetsFilterManager" public="false" abstract="true">
  61. <!-- schema assets filters -->
  62. </service>
  63. <service id="doctrine.dbal.well_known_schema_asset_filter" class="Doctrine\Bundle\DoctrineBundle\Dbal\BlacklistSchemaAssetFilter" public="false">
  64. <argument type="collection" />
  65. </service>
  66. <!-- commands -->
  67. <service id="doctrine.database_create_command" class="Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand">
  68. <argument type="service" id="doctrine" />
  69. <tag name="console.command" command="doctrine:database:create" />
  70. </service>
  71. <service id="doctrine.database_drop_command" class="Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand">
  72. <argument type="service" id="doctrine" />
  73. <tag name="console.command" command="doctrine:database:drop" />
  74. </service>
  75. <service id="doctrine.query_sql_command" class="Doctrine\Bundle\DoctrineBundle\Command\Proxy\RunSqlDoctrineCommand">
  76. <argument type="service" id="Doctrine\Bundle\DoctrineBundle\Dbal\ManagerRegistryAwareConnectionProvider" on-invalid="null" />
  77. <tag name="console.command" command="doctrine:query:sql" />
  78. </service>
  79. <service id="Doctrine\DBAL\Tools\Console\Command\RunSqlCommand">
  80. <argument type="service" id="Doctrine\Bundle\DoctrineBundle\Dbal\ManagerRegistryAwareConnectionProvider" on-invalid="null" />
  81. <tag name="console.command" command="dbal:run-sql" />
  82. </service>
  83. </services>
  84. </container>