diff -Nru php-doctrine-bundle-1.6.2/composer.json php-doctrine-bundle-1.6.3/composer.json --- php-doctrine-bundle-1.6.2/composer.json 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/composer.json 2016-04-21 19:55:56.000000000 +0000 @@ -36,13 +36,14 @@ "doctrine/orm": "~2.3", "symfony/yaml": "~2.2|~3.0", "symfony/validator": "~2.2|~3.0", + "symfony/property-info": "~2.8|~3.0", "symfony/phpunit-bridge": "~2.7|~3.0", "twig/twig": "~1.10", "satooshi/php-coveralls": "~0.6.1", "phpunit/phpunit": "~4" }, "suggest": { - "symfony/web-profiler-bundle": "to use the data collector", + "symfony/web-profiler-bundle": "To use the data collector.", "doctrine/orm": "The Doctrine ORM integration is optional in the bundle." }, "autoload": { diff -Nru php-doctrine-bundle-1.6.2/debian/autoload.ci.php.tpl php-doctrine-bundle-1.6.3/debian/autoload.ci.php.tpl --- php-doctrine-bundle-1.6.2/debian/autoload.ci.php.tpl 2016-02-11 01:56:09.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/autoload.ci.php.tpl 2016-06-30 13:46:46.000000000 +0000 @@ -11,14 +11,15 @@ static $classes = null; if ($classes === null) { $classes = array( - ___CLASSLIST___, - 'sqlformatter' => '/../../../SqlFormatter.php' + ___CLASSLIST___ ); } $cn = strtolower($class); if (isset($classes[$cn])) { require ___BASEDIR___$classes[$cn]; } - } + }, + true, + false ); // @codeCoverageIgnoreEnd diff -Nru php-doctrine-bundle-1.6.2/debian/autoload.php.tpl php-doctrine-bundle-1.6.3/debian/autoload.php.tpl --- php-doctrine-bundle-1.6.2/debian/autoload.php.tpl 2015-09-05 22:36:49.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/autoload.php.tpl 2016-06-30 13:46:46.000000000 +0000 @@ -3,7 +3,7 @@ require_once 'Symfony/Bundle/FrameworkBundle/autoload.php'; require_once 'Symfony/Component/Console/autoload.php'; // (already *included* by Symfony/Bundle/FrameworkBundle) require_once 'Doctrine/DBAL/autoload.php'; // (already *included* by Symfony/Bridge/Doctrine) -// require_once 'SqlFormatter.php'; (added after CLASSLIST instead of requiring the whole file) +require_once 'SqlFormatter/autoload.php'; require_once 'Symfony/Bridge/Doctrine/autoload.php'; require_once 'Doctrine/Bundle/DoctrineCacheBundle/autoload.php'; if (stream_resolve_include_path('Symfony/Bundle/WebProfilerBundle/autoload.php')){ @@ -19,14 +19,15 @@ static $classes = null; if ($classes === null) { $classes = array( - ___CLASSLIST___, - 'sqlformatter' => '/../../../SqlFormatter.php' + ___CLASSLIST___ ); } $cn = strtolower($class); if (isset($classes[$cn])) { require ___BASEDIR___$classes[$cn]; } - } + }, + true, + false ); // @codeCoverageIgnoreEnd diff -Nru php-doctrine-bundle-1.6.2/debian/autoload.tests.php.tpl php-doctrine-bundle-1.6.3/debian/autoload.tests.php.tpl --- php-doctrine-bundle-1.6.2/debian/autoload.tests.php.tpl 2015-09-05 22:36:49.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/autoload.tests.php.tpl 2016-06-30 13:46:46.000000000 +0000 @@ -1,15 +1,6 @@ '/../../../SqlFormatter.php' + ___CLASSLIST___ ); } $cn = strtolower($class); if (isset($classes[$cn])) { require ___BASEDIR___$classes[$cn]; } - } + }, + true, + false ); // @codeCoverageIgnoreEnd diff -Nru php-doctrine-bundle-1.6.2/debian/changelog php-doctrine-bundle-1.6.3/debian/changelog --- php-doctrine-bundle-1.6.2/debian/changelog 2016-02-21 23:41:43.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/changelog 2016-06-30 13:46:46.000000000 +0000 @@ -1,3 +1,47 @@ +php-doctrine-bundle (1.6.3-1ubuntu1) yakkety; urgency=medium + + * Merge with Debian unstable (LP: #1593499). Remaining changes: + - add nocheck and stage1 build profiles. + - LP #1544341. + * Drop: + - update to PHP 7.0 dependencies. + [ Fixed in 1.6.2-2; pkg-php-tools versioned dependency was only + during the PHP7 transition in 16.04 ] + + -- Nishanth Aravamudan Thu, 16 Jun 2016 17:17:12 -0700 + +php-doctrine-bundle (1.6.3-1) unstable; urgency=medium + + [ Kévin Dunglas ] + * Register the PropertyInfo extractor from the Symfony Bridge + + [ Benjamin Lazarecki ] + * Fix count break on queries list for profiler + + [ mike ] + * Adding the options for the connectstring and instancename parameter of + oracle + + [ bocharsky.bw ] + * Highlight query count box according to the db toolbar icon status + + [ Thomas Lallement ] + * Add global metrics on top of Doctrine page + + [ David Prévot ] + * Update Standards-Version to 3.9.8 + + -- David Prévot Sat, 04 Jun 2016 11:44:40 -0400 + +php-doctrine-bundle (1.6.2-2) unstable; urgency=medium + + * Simplify homemade static autoload.php for tests + * PHP 7.0 transition: + - Build-depend on php-sqlite3 instead of php5-sqlite + - Rebuild with latest pkg-php-tools + + -- David Prévot Fri, 04 Mar 2016 22:51:25 -0400 + php-doctrine-bundle (1.6.2-1ubuntu1) xenial; urgency=medium * update to PHP 7.0 dependencies. diff -Nru php-doctrine-bundle-1.6.2/debian/control php-doctrine-bundle-1.6.3/debian/control --- php-doctrine-bundle-1.6.2/debian/control 2016-02-21 23:40:54.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/control 2016-06-30 13:46:46.000000000 +0000 @@ -7,16 +7,17 @@ Build-Depends: debhelper (>= 9), php-doctrine-cache-bundle, php-doctrine-orm (>= 2.4.8), + php-sql-formatter, + php-sqlite3, php-symfony-console (>= 2.4), php-symfony-doctrine-bridge (>= 2.4) , php-symfony-framework-bundle (>= 2.4), php-symfony-validator (>= 2.4), php-twig (>= 1.18), - php-sqlite3, phpab, phpunit , - pkg-php-tools (>= 1.32~) -Standards-Version: 3.9.7 + pkg-php-tools (>= 1.7~) +Standards-Version: 3.9.8 Vcs-Git: git://anonscm.debian.org/pkg-php/php-doctrine-bundle.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-php/php-doctrine-bundle.git Homepage: https://symfony.com/doc/master/bundles/DoctrineBundle/index.html diff -Nru php-doctrine-bundle-1.6.2/debian/rules php-doctrine-bundle-1.6.3/debian/rules --- php-doctrine-bundle-1.6.2/debian/rules 2016-02-11 02:22:16.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/rules 2016-06-30 13:46:46.000000000 +0000 @@ -12,8 +12,7 @@ phpab \ --output vendor/autoload.php \ --template debian/autoload.tests.php.tpl \ - --basedir vendor \ - . + Tests override_dh_auto_clean: rm -rf vendor diff -Nru php-doctrine-bundle-1.6.2/debian/tests/control php-doctrine-bundle-1.6.3/debian/tests/control --- php-doctrine-bundle-1.6.2/debian/tests/control 2016-02-21 23:40:54.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/tests/control 2016-06-30 13:46:46.000000000 +0000 @@ -1,3 +1,3 @@ -Test-Command: mkdir --parents vendor && phpab --output vendor/autoload.php --template debian/autoload.ci.php.tpl --basedir vendor Tests && phpunit -v +Test-Command: mkdir --parents vendor && phpab --output vendor/autoload.php --template debian/autoload.ci.php.tpl Tests && phpunit -v Restrictions: rw-build-tree -Depends: @, php-doctrine-orm (>= 2.4.8), php-symfony-validator (>= 2.4), php-twig (>= 1.18), php-sqlite3, phpab, phpunit +Depends: @, php-doctrine-orm (>= 2.4.8), php-sqlite3, php-symfony-validator (>= 2.4), php-twig (>= 1.18), phpab, phpunit diff -Nru php-doctrine-bundle-1.6.2/debian/upstream/changelog-1.6 php-doctrine-bundle-1.6.3/debian/upstream/changelog-1.6 --- php-doctrine-bundle-1.6.2/debian/upstream/changelog-1.6 2016-02-11 02:07:34.000000000 +0000 +++ php-doctrine-bundle-1.6.3/debian/upstream/changelog-1.6 2016-06-30 13:46:46.000000000 +0000 @@ -1,3 +1,11 @@ +## 1.6.3 (2016-04-21) + +* Fix count break on queries list for profiler #518 +* Adding the connectstring and instancename param of oracle #531 +* Highlight query count box according to the db toolbar icon status #533 +* Add global metrics on top of Doctrine page #534 +* Register the PropertyInfo extractor from the Symfony Bridge #502 + ## 1.6.2 (2016-01-10) * Fix creating sqlite database #483 diff -Nru php-doctrine-bundle-1.6.2/DependencyInjection/Configuration.php php-doctrine-bundle-1.6.3/DependencyInjection/Configuration.php --- php-doctrine-bundle-1.6.2/DependencyInjection/Configuration.php 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/DependencyInjection/Configuration.php 2016-04-21 19:55:56.000000000 +0000 @@ -240,6 +240,21 @@ ->booleanNode('pooled')->info('True to use a pooled server with the oci8/pdo_oracle driver')->end() ->booleanNode('MultipleActiveResultSets')->info('Configuring MultipleActiveResultSets for the pdo_sqlsrv driver')->end() ->booleanNode('use_savepoints')->info('Use savepoints for nested transactions')->end() + ->scalarNode('instancename') + ->info( + 'Optional parameter, complete whether to add the INSTANCE_NAME parameter in the connection.'. + ' It is generally used to connect to an Oracle RAC server to select the name'. + ' of a particular instance.' + ) + ->end() + ->scalarNode('connectstring') + ->info( + 'Complete Easy Connect connection descriptor, see https://docs.oracle.com/database/121/NETAG/naming.htm.'. + 'When using this option, you will still need to provide the user and password parameters, but the other '. + 'parameters will no longer be used. Note that when using this parameter, the getHost and getPort methods'. + ' from Doctrine\DBAL\Connection will no longer function as expected.' + ) + ->end() ->end() ->beforeNormalization() ->ifTrue(function ($v) {return !isset($v['sessionMode']) && isset($v['session_mode']);}) diff -Nru php-doctrine-bundle-1.6.2/DependencyInjection/DoctrineExtension.php php-doctrine-bundle-1.6.3/DependencyInjection/DoctrineExtension.php --- php-doctrine-bundle-1.6.2/DependencyInjection/DoctrineExtension.php 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/DependencyInjection/DoctrineExtension.php 2016-04-21 19:55:56.000000000 +0000 @@ -375,9 +375,16 @@ $def->setFactoryMethod('create'); } + $loadPropertyInfoExtractor = interface_exists('Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface') + && class_exists('Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'); + foreach ($config['entity_managers'] as $name => $entityManager) { $entityManager['name'] = $name; $this->loadOrmEntityManager($entityManager, $container); + + if ($loadPropertyInfoExtractor) { + $this->loadPropertyInfoExtractor($name, $container); + } } if ($config['resolve_target_entities']) { @@ -759,6 +766,29 @@ } /** + * Loads a property info extractor for each defined entity manager. + * + * @param string $entityManagerName + * @param ContainerBuilder $container + */ + private function loadPropertyInfoExtractor($entityManagerName, ContainerBuilder $container) + { + $metadataFactoryService = sprintf('doctrine.orm.%s_entity_manager.metadata_factory', $entityManagerName); + + $metadataFactoryDefinition = $container->register($metadataFactoryService, 'Doctrine\Common\Persistence\Mapping\ClassMetadataFactory'); + $metadataFactoryDefinition->setFactory(array( + new Reference(sprintf('doctrine.orm.%s_entity_manager', $entityManagerName)), + 'getMetadataFactory' + )); + $metadataFactoryDefinition->setPublic(false); + + $propertyExtractorDefinition = $container->register(sprintf('doctrine.orm.%s_entity_manager.property_info_extractor', $entityManagerName), 'Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor'); + $propertyExtractorDefinition->addArgument(new Reference($metadataFactoryService)); + $propertyExtractorDefinition->addTag('property_info.list_extractor', array('priority' => -1001)); + $propertyExtractorDefinition->addTag('property_info.type_extractor', array('priority' => -999)); + } + + /** * @param array $objectManager * @param ContainerBuilder $container * @param string $cacheName diff -Nru php-doctrine-bundle-1.6.2/Resources/config/schema/doctrine-1.0.xsd php-doctrine-bundle-1.6.3/Resources/config/schema/doctrine-1.0.xsd --- php-doctrine-bundle-1.6.2/Resources/config/schema/doctrine-1.0.xsd 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Resources/config/schema/doctrine-1.0.xsd 2016-04-21 19:55:56.000000000 +0000 @@ -63,6 +63,8 @@ + + diff -Nru php-doctrine-bundle-1.6.2/Resources/views/Collector/db.html.twig php-doctrine-bundle-1.6.3/Resources/views/Collector/db.html.twig --- php-doctrine-bundle-1.6.2/Resources/views/Collector/db.html.twig 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Resources/views/Collector/db.html.twig 2016-04-21 19:55:56.000000000 +0000 @@ -41,7 +41,7 @@ {% set text %}
Database Queries - {{ collector.querycount }} + {{ collector.querycount }}
Query time @@ -140,6 +140,42 @@ {% endif %} + {% if profiler_markup_version > 1 %} +

Query Metrics

+ +
+
+ {{ collector.querycount }} + Database Queries +
+ +
+ {{ '%0.2f'|format(collector.time * 1000) }} ms + Query time +
+ +
+ {{ collector.invalidEntityCount }} + Invalid entities +
+ + {% if collector.cacheEnabled %} +
+ {{ collector.cacheHitsCount }} + Cache hits +
+
+ {{ collector.cacheMissesCount }} + Cache misses +
+
+ {{ collector.cachePutsCount }} + Cache puts +
+ {% endif %} +
+ {% endif %} +

Queries

{% for connection, queries in collector.queries %} @@ -163,7 +199,7 @@ {% for i, query in queries %} - {{ loop.index }} + {{ loop.index }} {{ '%0.2f'|format(query.executionMS * 1000) }} ms {{ query.sql|doctrine_pretty_query(highlight_only = true) }} diff -Nru php-doctrine-bundle-1.6.2/Tests/ContainerTest.php php-doctrine-bundle-1.6.3/Tests/ContainerTest.php --- php-doctrine-bundle-1.6.2/Tests/ContainerTest.php 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/ContainerTest.php 2016-04-21 19:55:56.000000000 +0000 @@ -60,5 +60,13 @@ } else { $this->assertFalse($container->has('doctrine.dbal.default_connection.events.mysqlsessioninit')); } + + if (interface_exists('Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface') && class_exists('Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor')) { + $this->assertInstanceOf('Doctrine\Common\Persistence\Mapping\ClassMetadataFactory', $container->get('doctrine.orm.default_entity_manager.metadata_factory')); + $this->assertInstanceOf('Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor', $container->get('doctrine.orm.default_entity_manager.property_info_extractor')); + } else { + $this->assertFalse($container->has('doctrine.orm.default_entity_manager.metadata_factory')); + $this->assertFalse($container->has('doctrine.orm.default_entity_manager.property_info_extractor')); + } } } diff -Nru php-doctrine-bundle-1.6.2/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php php-doctrine-bundle-1.6.3/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php --- php-doctrine-bundle-1.6.2/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 2016-01-10 17:21:44.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 2016-04-21 19:55:56.000000000 +0000 @@ -735,6 +735,22 @@ $this->assertDICDefinitionMethodCallOnce($definition, 'setAutoCommit', array(false)); } + public function testDbalOracleConnectstring() + { + $container = $this->loadContainer('dbal_oracle_connectstring'); + + $config = $container->getDefinition('doctrine.dbal.default_connection')->getArgument(0); + $this->assertSame('scott@sales-server:1521/sales.us.example.com', $config['connectstring']); + } + + public function testDbalOracleInstancename() + { + $container = $this->loadContainer('dbal_oracle_instancename'); + + $config = $container->getDefinition('doctrine.dbal.default_connection')->getArgument(0); + $this->assertSame('mySuperInstance', $config['instancename']); + } + public function testDbalSchemaFilter() { $container = $this->loadContainer('dbal_schema_filter'); diff -Nru php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_connectstring.xml php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_connectstring.xml --- php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_connectstring.xml 1970-01-01 00:00:00.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_connectstring.xml 2016-04-21 19:55:56.000000000 +0000 @@ -0,0 +1,13 @@ + + + + + + + + + diff -Nru php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_instancename.xml php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_instancename.xml --- php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_instancename.xml 1970-01-01 00:00:00.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/xml/dbal_oracle_instancename.xml 2016-04-21 19:55:56.000000000 +0000 @@ -0,0 +1,13 @@ + + + + + + + + + diff -Nru php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_connectstring.yml php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_connectstring.yml --- php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_connectstring.yml 1970-01-01 00:00:00.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_connectstring.yml 2016-04-21 19:55:56.000000000 +0000 @@ -0,0 +1,3 @@ +doctrine: + dbal: + connectstring: scott@sales-server:1521/sales.us.example.com diff -Nru php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_instancename.yml php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_instancename.yml --- php-doctrine-bundle-1.6.2/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_instancename.yml 1970-01-01 00:00:00.000000000 +0000 +++ php-doctrine-bundle-1.6.3/Tests/DependencyInjection/Fixtures/config/yml/dbal_oracle_instancename.yml 2016-04-21 19:55:56.000000000 +0000 @@ -0,0 +1,3 @@ +doctrine: + dbal: + instancename: mySuperInstance