ソースを参照

uppgrade to 2.0.17

Sevajol Bastien 11 年 前
コミット
13a40ad5a2
共有100 個のファイルを変更した1153 個の追加550 個の削除を含む
  1. 12 10
      app/autoload.php
  2. 53 49
      app/bootstrap.php.cache
  3. 6 6
      deps
  4. 10 10
      deps.lock
  5. 0 0
      src/Muzich/CoreBundle/Entity/Presubscription.php
  6. 0 0
      src/Muzich/CoreBundle/Resources/public/js/TagPrompt.js
  7. 0 0
      src/Muzich/CoreBundle/Resources/public/js/autoplay.js
  8. 0 0
      src/Muzich/CoreBundle/Resources/public/js/play2.js
  9. 0 0
      src/Muzich/CoreBundle/Resources/public/js/player/GenericPlayer.js
  10. 0 0
      src/Muzich/CoreBundle/Resources/public/js/player/GenericStreamingPlayer.js
  11. 0 0
      src/Muzich/CoreBundle/Resources/public/js/player/JamendoPlayer.js
  12. 0 0
      src/Muzich/CoreBundle/Resources/public/js/player/SoundCloudPlayer.js
  13. 0 0
      src/Muzich/CoreBundle/Resources/public/js/player/YoutubePlayer.js
  14. 0 0
      src/Muzich/CoreBundle/Resources/views/Autoplay/autoplay.html.twig
  15. 0 0
      src/Muzich/CoreBundle/Resources/views/Component/element_add_box.html.twig
  16. 0 0
      src/Muzich/CoreBundle/Resources/views/Component/element_add_buttons.html.twig
  17. 0 0
      src/Muzich/CoreBundle/Resources/views/Component/element_add_buttons_topright.html.twig
  18. 0 0
      src/Muzich/CoreBundle/Resources/views/Component/element_added_to_group.html.twig
  19. 0 0
      src/Muzich/CoreBundle/Resources/views/Component/element_autoplay_button.html.twig
  20. 0 0
      src/Muzich/CoreBundle/Resources/views/Info/cgu.html.twig
  21. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/flash_messages.html.twig
  22. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/footer.html.twig
  23. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/head.html.twig
  24. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/head_css.html.twig
  25. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig
  26. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/header.html.twig
  27. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/noscript.html.twig
  28. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/side.html.twig
  29. 0 0
      src/Muzich/CoreBundle/Resources/views/Layout/social.html.twig
  30. 0 0
      src/Muzich/CoreBundle/Resources/views/Menu/access.html.twig
  31. 0 0
      src/Muzich/CoreBundle/Resources/views/Menu/main_menu.html.twig
  32. 0 0
      src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig
  33. 0 0
      src/Muzich/HomeBundle/Resources/views/Component/filter_menu.html.twig
  34. 0 0
      src/Muzich/IndexBundle/Resources/views/Index/presubscription.html.twig
  35. 0 0
      src/Muzich/UserBundle/Resources/views/Event/elements.html.twig
  36. 0 0
      src/Muzich/UserBundle/Resources/views/User/preference_form.html.twig
  37. 0 0
      src/Muzich/UserBundle/Resources/views/User/resetting.email.twig
  38. 1 1
      vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build.sh
  39. 0 4
      vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php
  40. 0 25
      vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Resources/doc/annotations/cache.rst
  41. 1 1
      vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Resources/doc/annotations/converters.rst
  42. 2 2
      vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/composer.json
  43. 1 1
      vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php
  44. 1 1
      vendor/bundles/Sensio/Bundle/GeneratorBundle/Resources/skeleton/crud/views/index.html.twig
  45. 2 4
      vendor/bundles/Sensio/Bundle/GeneratorBundle/composer.json
  46. 2 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/AsseticBundle.php
  47. 1 1
      vendor/bundles/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php
  48. 1 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/Controller/AsseticController.php
  49. 2 19
      vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/AsseticExtension.php
  50. 67 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/Compiler/TemplateResourcesPass.php
  51. 1 1
      vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/DirectoryResourceDefinition.php
  52. 1 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/MainConfiguration.php
  53. 12 2
      vendor/bundles/Symfony/Bundle/AsseticBundle/Factory/Resource/FileResource.php
  54. 1 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/Resources/config/assetic.xml
  55. 4 2
      vendor/bundles/Symfony/Bundle/AsseticBundle/Resources/config/filters/sprockets.xml
  56. 28 0
      vendor/bundles/Symfony/Bundle/AsseticBundle/composer.json
  57. 0 1
      vendor/doctrine-dbal/.gitignore
  58. 3 0
      vendor/doctrine-dbal/.gitmodules
  59. 10 0
      vendor/doctrine-dbal/build.properties
  60. 0 16
      vendor/doctrine-dbal/build.properties.dev
  61. 36 148
      vendor/doctrine-dbal/build.xml
  62. 1 1
      vendor/doctrine-dbal/composer.json
  63. 10 6
      vendor/doctrine-dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php
  64. 3 3
      vendor/doctrine-dbal/lib/Doctrine/DBAL/SQLParserUtils.php
  65. 0 2
      vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php
  66. 1 1
      vendor/doctrine-dbal/lib/Doctrine/DBAL/Version.php
  67. 6 0
      vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
  68. 38 22
      vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php
  69. 2 1
      vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php
  70. 1 1
      vendor/doctrine/composer.json
  71. 4 2
      vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php
  72. 16 5
      vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php
  73. 25 1
      vendor/doctrine/lib/Doctrine/ORM/PersistentCollection.php
  74. 1 1
      vendor/doctrine/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php
  75. 2 0
      vendor/doctrine/lib/Doctrine/ORM/Query/Expr.php
  76. 110 111
      vendor/doctrine/lib/Doctrine/ORM/Query/SqlWalker.php
  77. 9 1
      vendor/doctrine/lib/Doctrine/ORM/Tools/EntityGenerator.php
  78. 7 1
      vendor/doctrine/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php
  79. 29 5
      vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php
  80. 1 1
      vendor/doctrine/lib/Doctrine/ORM/Version.php
  81. 77 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php
  82. 97 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php
  83. 23 5
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php
  84. 9 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php
  85. 3 5
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php
  86. 2 2
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php
  87. 23 21
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php
  88. 16 16
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php
  89. 3 1
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php
  90. 121 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php
  91. 158 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.php
  92. 10 1
      vendor/doctrine/tests/Doctrine/Tests/ORM/Query/ExprTest.php
  93. 15 7
      vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php
  94. 5 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/annotation/Doctrine.Tests.ORM.Tools.Export.User.php
  95. 5 1
      vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/php/Doctrine.Tests.ORM.Tools.Export.User.php
  96. 19 7
      vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/xml/Doctrine.Tests.ORM.Tools.Export.User.dcm.xml
  97. 3 0
      vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/yaml/Doctrine.Tests.ORM.Tools.Export.User.dcm.yml
  98. 14 14
      vendor/doctrine/tests/Doctrine/Tests/OrmFunctionalTestCase.php
  99. 26 1
      vendor/swiftmailer/CHANGES
  100. 0 0
      vendor/swiftmailer/README

+ 12 - 10
app/autoload.php ファイルの表示

@@ -17,15 +17,15 @@ $loader->registerNamespaces(array(
17 17
     'FOS'              => __DIR__.'/../vendor/bundles',
18 18
     'Gregwar'          => __DIR__.'/../vendor/bundles',
19 19
     'Doctrine\\Common\\DataFixtures' => __DIR__.'/../vendor/doctrine-fixtures/lib',
20
-    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
21
-    'Stof'  => __DIR__.'/../vendor/bundles',
22
-    'Gedmo' => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',
23
-    'WhiteOctober' => __DIR__.'/../vendor/bundles',
24
-    'Pagerfanta'   => __DIR__.'/../vendor/pagerfanta/src',
25
-    'Sonata'                         => __DIR__.'/../vendor/bundles',
26
-    'Knp'                             => array(
27
-        __DIR__.'/../vendor/bundles',
28
-        __DIR__.'/../vendor/knp/menu/src',
20
+    'Doctrine\\Common'               => __DIR__.'/../vendor/doctrine-common/lib',
21
+    'Stof'             => __DIR__.'/../vendor/bundles',
22
+    'Gedmo'            => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',
23
+    'WhiteOctober'     => __DIR__.'/../vendor/bundles',
24
+    'Pagerfanta'       => __DIR__.'/../vendor/pagerfanta/src',
25
+    'Sonata'           => __DIR__.'/../vendor/bundles',
26
+    'Knp'              => array(
27
+                         __DIR__.'/../vendor/bundles',
28
+                         __DIR__.'/../vendor/knp/menu/src',
29 29
     ),
30 30
 ));
31 31
 $loader->registerPrefixes(array(
@@ -53,6 +53,8 @@ AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/M
53 53
 
54 54
 // Swiftmailer needs a special autoloader to allow
55 55
 // the lazy loading of the init file (which is expensive)
56
-require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
56
+
57
+//require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
58
+require __DIR__.'/../vendor/swiftmailer/lib/swift_required.php';
57 59
 Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');
58 60
 

+ 53 - 49
app/bootstrap.php.cache ファイルの表示

@@ -13,7 +13,7 @@ namespace Symfony\Component\DependencyInjection
13 13
 interface ContainerAwareInterface
14 14
 {
15 15
     
16
-    function setContainer(ContainerInterface $container = null);
16
+    public function setContainer(ContainerInterface $container = null);
17 17
 }
18 18
 }
19 19
  
@@ -33,37 +33,37 @@ interface ContainerInterface
33 33
     const SCOPE_PROTOTYPE                = 'prototype';
34 34
 
35 35
     
36
-    function set($id, $service, $scope = self::SCOPE_CONTAINER);
36
+    public function set($id, $service, $scope = self::SCOPE_CONTAINER);
37 37
 
38 38
     
39
-    function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
39
+    public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
40 40
 
41 41
     
42
-    function has($id);
42
+    public function has($id);
43 43
 
44 44
     
45
-    function getParameter($name);
45
+    public function getParameter($name);
46 46
 
47 47
     
48
-    function hasParameter($name);
48
+    public function hasParameter($name);
49 49
 
50 50
     
51
-    function setParameter($name, $value);
51
+    public function setParameter($name, $value);
52 52
 
53 53
     
54
-    function enterScope($name);
54
+    public function enterScope($name);
55 55
 
56 56
     
57
-    function leaveScope($name);
57
+    public function leaveScope($name);
58 58
 
59 59
     
60
-    function addScope(ScopeInterface $scope);
60
+    public function addScope(ScopeInterface $scope);
61 61
 
62 62
     
63
-    function hasScope($name);
63
+    public function hasScope($name);
64 64
 
65 65
     
66
-    function isScopeActive($name);
66
+    public function isScopeActive($name);
67 67
 }
68 68
 }
69 69
  
@@ -209,7 +209,7 @@ class Container implements ContainerInterface
209 209
         $ids = array();
210 210
         $r = new \ReflectionClass($this);
211 211
         foreach ($r->getMethods() as $method) {
212
-            if (preg_match('/^get(.+)Service$/', $method->getName(), $match)) {
212
+            if (preg_match('/^get(.+)Service$/', $method->name, $match)) {
213 213
                 $ids[] = self::underscore($match[1]);
214 214
             }
215 215
         }
@@ -315,13 +315,13 @@ class Container implements ContainerInterface
315 315
     }
316 316
 
317 317
     
318
-    static public function camelize($id)
318
+    public static function camelize($id)
319 319
     {
320 320
         return preg_replace_callback('/(^|_|\.)+(.)/', function ($match) { return ('.' === $match[1] ? '_' : '').strtoupper($match[2]); }, $id);
321 321
     }
322 322
 
323 323
     
324
-    static public function underscore($id)
324
+    public static function underscore($id)
325 325
     {
326 326
         return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), strtr($id, '_', '.')));
327 327
     }
@@ -344,7 +344,7 @@ interface HttpKernelInterface
344 344
     const SUB_REQUEST = 2;
345 345
 
346 346
     
347
-    function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true);
347
+    public function handle(Request $request, $type = self::MASTER_REQUEST, $catch = true);
348 348
 }
349 349
 }
350 350
  
@@ -363,52 +363,52 @@ use Symfony\Component\Config\Loader\LoaderInterface;
363 363
 interface KernelInterface extends HttpKernelInterface, \Serializable
364 364
 {
365 365
     
366
-    function registerBundles();
366
+    public function registerBundles();
367 367
 
368 368
     
369
-    function registerContainerConfiguration(LoaderInterface $loader);
369
+    public function registerContainerConfiguration(LoaderInterface $loader);
370 370
 
371 371
     
372
-    function boot();
372
+    public function boot();
373 373
 
374 374
     
375
-    function shutdown();
375
+    public function shutdown();
376 376
 
377 377
     
378
-    function getBundles();
378
+    public function getBundles();
379 379
 
380 380
     
381
-    function isClassInActiveBundle($class);
381
+    public function isClassInActiveBundle($class);
382 382
 
383 383
     
384
-    function getBundle($name, $first = true);
384
+    public function getBundle($name, $first = true);
385 385
 
386 386
     
387
-    function locateResource($name, $dir = null, $first = true);
387
+    public function locateResource($name, $dir = null, $first = true);
388 388
 
389 389
     
390
-    function getName();
390
+    public function getName();
391 391
 
392 392
     
393
-    function getEnvironment();
393
+    public function getEnvironment();
394 394
 
395 395
     
396
-    function isDebug();
396
+    public function isDebug();
397 397
 
398 398
     
399
-    function getRootDir();
399
+    public function getRootDir();
400 400
 
401 401
     
402
-    function getContainer();
402
+    public function getContainer();
403 403
 
404 404
     
405
-    function getStartTime();
405
+    public function getStartTime();
406 406
 
407 407
     
408
-    function getCacheDir();
408
+    public function getCacheDir();
409 409
 
410 410
     
411
-    function getLogDir();
411
+    public function getLogDir();
412 412
 }
413 413
 }
414 414
  
@@ -433,7 +433,6 @@ use Symfony\Component\HttpKernel\Bundle\BundleInterface;
433 433
 use Symfony\Component\HttpKernel\Config\FileLocator;
434 434
 use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
435 435
 use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass;
436
-use Symfony\Component\HttpKernel\DependencyInjection\Extension as DIExtension;
437 436
 use Symfony\Component\HttpKernel\Debug\ErrorHandler;
438 437
 use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
439 438
 use Symfony\Component\Config\Loader\LoaderResolver;
@@ -456,7 +455,12 @@ abstract class Kernel implements KernelInterface
456 455
     protected $startTime;
457 456
     protected $classes;
458 457
 
459
-    const VERSION = '2.0.13';
458
+    const VERSION         = '2.0.17';
459
+    const VERSION_ID      = '20017';
460
+    const MAJOR_VERSION   = '2';
461
+    const MINOR_VERSION   = '0';
462
+    const RELEASE_VERSION = '17';
463
+    const EXTRA_VERSION   = '';
460 464
 
461 465
     
462 466
     public function __construct($environment, $debug)
@@ -663,7 +667,7 @@ abstract class Kernel implements KernelInterface
663 667
     {
664 668
         if (null === $this->rootDir) {
665 669
             $r = new \ReflectionObject($this);
666
-            $this->rootDir = dirname($r->getFileName());
670
+            $this->rootDir = str_replace('\\', '/', dirname($r->getFileName()));
667 671
         }
668 672
 
669 673
         return $this->rootDir;
@@ -898,7 +902,7 @@ abstract class Kernel implements KernelInterface
898 902
     }
899 903
 
900 904
     
901
-    static public function stripComments($source)
905
+    public static function stripComments($source)
902 906
     {
903 907
         if (!function_exists('token_get_all')) {
904 908
             return $source;
@@ -941,10 +945,10 @@ namespace Symfony\Component\ClassLoader
941 945
 
942 946
 class ClassCollectionLoader
943 947
 {
944
-    static private $loaded;
948
+    private static $loaded;
945 949
 
946 950
     
947
-    static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
951
+    public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
948 952
     {
949 953
                 if (isset(self::$loaded[$name])) {
950 954
             return;
@@ -1022,7 +1026,7 @@ class ClassCollectionLoader
1022 1026
     }
1023 1027
 
1024 1028
     
1025
-    static public function fixNamespaceDeclarations($source)
1029
+    public static function fixNamespaceDeclarations($source)
1026 1030
     {
1027 1031
         if (!function_exists('token_get_all')) {
1028 1032
             return $source;
@@ -1067,7 +1071,7 @@ class ClassCollectionLoader
1067 1071
     }
1068 1072
 
1069 1073
     
1070
-    static private function writeCacheFile($file, $content)
1074
+    private static function writeCacheFile($file, $content)
1071 1075
     {
1072 1076
         $tmpFile = tempnam(dirname($file), basename($file));
1073 1077
         if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
@@ -1080,7 +1084,7 @@ class ClassCollectionLoader
1080 1084
     }
1081 1085
 
1082 1086
     
1083
-    static private function stripComments($source)
1087
+    private static function stripComments($source)
1084 1088
     {
1085 1089
         if (!function_exists('token_get_all')) {
1086 1090
             return $source;
@@ -1389,28 +1393,28 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
1389 1393
 interface BundleInterface
1390 1394
 {
1391 1395
     
1392
-    function boot();
1396
+    public function boot();
1393 1397
 
1394 1398
     
1395
-    function shutdown();
1399
+    public function shutdown();
1396 1400
 
1397 1401
     
1398
-    function build(ContainerBuilder $container);
1402
+    public function build(ContainerBuilder $container);
1399 1403
 
1400 1404
     
1401
-    function getContainerExtension();
1405
+    public function getContainerExtension();
1402 1406
 
1403 1407
     
1404
-    function getParent();
1408
+    public function getParent();
1405 1409
 
1406 1410
     
1407
-    function getName();
1411
+    public function getName();
1408 1412
 
1409 1413
     
1410
-    function getNamespace();
1414
+    public function getNamespace();
1411 1415
 
1412 1416
     
1413
-    function getPath();
1417
+    public function getPath();
1414 1418
 }
1415 1419
 }
1416 1420
  

+ 6 - 6
deps ファイルの表示

@@ -1,10 +1,10 @@
1 1
 [symfony]
2 2
     git=http://github.com/symfony/symfony.git
3
-    version=v2.0.13
3
+    version=v2.0.17
4 4
 
5 5
 [twig]
6 6
     git=http://github.com/fabpot/Twig.git
7
-    version=v1.7.0
7
+    version=v1.9.2
8 8
 
9 9
 [monolog]
10 10
     git=http://github.com/Seldaek/monolog.git
@@ -16,15 +16,15 @@
16 16
 
17 17
 [doctrine-dbal]
18 18
     git=http://github.com/doctrine/dbal.git
19
-    version=2.1.6
19
+    version=2.1.7
20 20
 
21 21
 [doctrine]
22 22
     git=http://github.com/doctrine/doctrine2.git
23
-    version=2.1.6
23
+    version=2.1.7
24 24
 
25 25
 [swiftmailer]
26 26
     git=http://github.com/swiftmailer/swiftmailer.git
27
-    version=v4.1.7
27
+    version=v4.2.1
28 28
 
29 29
 [assetic]
30 30
     git=http://github.com/kriswallsmith/assetic.git
@@ -60,4 +60,4 @@
60 60
 [AsseticBundle]
61 61
     git=http://github.com/symfony/AsseticBundle.git
62 62
     target=/bundles/Symfony/Bundle/AsseticBundle
63
-    version=v1.0.1
63
+    version=origin/2.0

+ 10 - 10
deps.lock ファイルの表示

@@ -1,15 +1,15 @@
1
-symfony v2.0.13
2
-twig v1.7.0
1
+symfony v2.0.17
2
+twig v1.9.2
3 3
 monolog 1.0.2
4 4
 doctrine-common 2.1.4
5
-doctrine-dbal 2.1.6
6
-doctrine 2.1.6
7
-swiftmailer v4.1.7
5
+doctrine-dbal 2.1.7
6
+doctrine 2.1.7
7
+swiftmailer v4.2.1
8 8
 assetic v1.0.3
9
-twig-extensions 446d870272cd87a720e95242eade38a2acf56eaa
9
+twig-extensions feb6d3f10c411e2631997c0a905aa581c80305c1
10 10
 metadata 1.0.0
11
-SensioFrameworkExtraBundle cb61b92ed55241d93ed9726bc3f5f47c7d2ce8fe
11
+SensioFrameworkExtraBundle v2.0.17
12 12
 JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102
13
-SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
14
-SensioGeneratorBundle b1ccb78c1743f30817b0fce9bb5c6baff6ed7bf8
15
-AsseticBundle v1.0.1
13
+SensioDistributionBundle v2.0.17
14
+SensioGeneratorBundle v2.0.17
15
+AsseticBundle 6f15728c1aefa5246caa83730e3dbf70b0d46052

+ 0 - 0
src/Muzich/CoreBundle/Entity/Presubscription.php ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/TagPrompt.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/autoplay.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/play2.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/player/GenericPlayer.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/player/GenericStreamingPlayer.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/player/JamendoPlayer.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/player/SoundCloudPlayer.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/public/js/player/YoutubePlayer.js ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Autoplay/autoplay.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Component/element_add_box.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Component/element_add_buttons.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Component/element_add_buttons_topright.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Component/element_added_to_group.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Component/element_autoplay_button.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Info/cgu.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/flash_messages.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/footer.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/head.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/head_css.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/head_js.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/header.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/noscript.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/side.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Layout/social.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Menu/access.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Menu/main_menu.html.twig ファイルの表示


+ 0 - 0
src/Muzich/CoreBundle/Resources/views/Menu/side_menu.html.twig ファイルの表示


+ 0 - 0
src/Muzich/HomeBundle/Resources/views/Component/filter_menu.html.twig ファイルの表示


+ 0 - 0
src/Muzich/IndexBundle/Resources/views/Index/presubscription.html.twig ファイルの表示


+ 0 - 0
src/Muzich/UserBundle/Resources/views/Event/elements.html.twig ファイルの表示


+ 0 - 0
src/Muzich/UserBundle/Resources/views/User/preference_form.html.twig ファイルの表示


+ 0 - 0
src/Muzich/UserBundle/Resources/views/User/resetting.email.twig ファイルの表示


+ 1 - 1
vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build.sh ファイルの表示

@@ -9,7 +9,7 @@
9 9
 
10 10
 DIR=`php -r "echo realpath(dirname(\\$_SERVER['argv'][0]));"`
11 11
 cd $DIR
12
-VERSION=`grep 'VERSION' vendor/symfony/src/Symfony/Component/HttpKernel/Kernel.php | sed -E "s/.*'(.+)'.*/\1/g"`
12
+VERSION=`grep ' VERSION ' vendor/symfony/src/Symfony/Component/HttpKernel/Kernel.php | sed -E "s/.*'(.+)'.*/\1/g"`
13 13
 
14 14
 if [ ! -d "$DIR/build" ]; then
15 15
     mkdir -p $DIR/build

+ 0 - 4
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php ファイルの表示

@@ -91,10 +91,6 @@ class DoctrineParamConverter implements ParamConverterInterface
91 91
 
92 92
         $options = $this->getOptions($configuration);
93 93
 
94
-        if (false === isset($options['entity_manager'])) { 
95
-            return false; 
96
-        }
97
-
98 94
         // Doctrine Entity?
99 95
         try {
100 96
             $this->registry->getEntityManager($options['entity_manager'])->getClassMetadata($configuration->getClass());

+ 0 - 25
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Resources/doc/annotations/cache.rst ファイルの表示

@@ -15,31 +15,6 @@ The ``@Cache`` annotation makes it easy to define HTTP caching::
15 15
     {
16 16
     }
17 17
 
18
-You can also use the annotation on a class to define caching for all methods::
19
-
20
-    /**
21
-     * @Cache(expires="tomorrow")
22
-     */
23
-    class BlogController extends Controller
24
-    {
25
-    }
26
-
27
-When there is a conflict between the class configuration and the method
28
-configuration, the latter overrides the former::
29
-
30
-    /**
31
-     * @Cache(expires="tomorrow")
32
-     */
33
-    class BlogController extends Controller
34
-    {
35
-        /**
36
-         * @Cache(expires="+2 days")
37
-         */
38
-        public function indexAction()
39
-        {
40
-        }
41
-    }
42
-
43 18
 Attributes
44 19
 ----------
45 20
 

+ 1 - 1
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/Resources/doc/annotations/converters.rst ファイルの表示

@@ -98,4 +98,4 @@ on the request attributes, it should set an attribute named
98 98
 
99 99
 .. tip::
100 100
 
101
-   Use the ``DoctrineConverter`` class as a template for your own converters.
101
+   Use the ``DoctrineParamConverter`` class as a template for your own converters.

+ 2 - 2
vendor/bundles/Sensio/Bundle/FrameworkExtraBundle/composer.json ファイルの表示

@@ -11,8 +11,8 @@
11 11
         }
12 12
     ],
13 13
     "require": {
14
-        "symfony/framework-bundle": "2.*",
15
-        "doctrine/common": ">=2.0"
14
+        "symfony/framework-bundle": "2.0.*",
15
+        "doctrine/common": ">=2.1,<2.4-dev"
16 16
     },
17 17
     "autoload": {
18 18
         "psr-0": { "Sensio\\Bundle\\FrameworkExtraBundle": "" }

+ 1 - 1
vendor/bundles/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php ファイルの表示

@@ -63,7 +63,7 @@ with <comment>--format</comment>:
63 63
 <info>php app/console doctrine:generate:entity --entity=AcmeBlogBundle:Blog/Post --format=yml</info>
64 64
 
65 65
 To deactivate the interaction mode, simply use the `--no-interaction` option
66
-whitout forgetting to pass all needed options:
66
+without forgetting to pass all needed options:
67 67
 
68 68
 <info>php app/console doctrine:generate:entity --entity=AcmeBlogBundle:Blog/Post --format=annotation --fields="title:string(255) body:text" --with-repository --no-interaction</info>
69 69
 EOT

+ 1 - 1
vendor/bundles/Sensio/Bundle/GeneratorBundle/Resources/skeleton/crud/views/index.html.twig ファイルの表示

@@ -23,7 +23,7 @@
23 23
 
24 24
         {%- elseif metadata.type in ['date', 'datetime'] %}
25 25
 
26
-            <td>{{ '{% if entity.'~ field|replace({'_': ''}) ~' %}{{ entity.'~ field|replace({'_': ''}) ~'|date(\'Y-m-d H:i:s\') }}{% endif%}' }}</td>
26
+            <td>{{ '{% if entity.'~ field|replace({'_': ''}) ~' %}{{ entity.'~ field|replace({'_': ''}) ~'|date(\'Y-m-d H:i:s\') }}{% endif %}' }}</td>
27 27
 
28 28
         {%- else %}
29 29
 

+ 2 - 4
vendor/bundles/Sensio/Bundle/GeneratorBundle/composer.json ファイルの表示

@@ -11,10 +11,8 @@
11 11
         }
12 12
     ],
13 13
     "require": {
14
-        "symfony/framework-bundle": "2.*"
15
-    },
16
-    "recommend": {
17
-        "symfony/doctrine-bundle": "2.*"
14
+        "symfony/framework-bundle": "2.0.*",
15
+        "symfony/doctrine-bundle": "2.0.*"
18 16
     },
19 17
     "autoload": {
20 18
         "psr-0": { "Sensio\\Bundle\\GeneratorBundle": "" }

+ 2 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/AsseticBundle.php ファイルの表示

@@ -11,6 +11,7 @@
11 11
 
12 12
 namespace Symfony\Bundle\AsseticBundle;
13 13
 
14
+use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\TemplateResourcesPass;
14 15
 use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetFactoryPass;
15 16
 use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetManagerPass;
16 17
 use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
@@ -33,6 +34,7 @@ class AsseticBundle extends Bundle
33 34
     {
34 35
         parent::build($container);
35 36
 
37
+        $container->addCompilerPass(new TemplateResourcesPass());
36 38
         $container->addCompilerPass(new CheckClosureFilterPass());
37 39
         $container->addCompilerPass(new CheckCssEmbedFilterPass());
38 40
         $container->addCompilerPass(new CheckYuiFilterPass());

+ 1 - 1
vendor/bundles/Symfony/Bundle/AsseticBundle/Command/DumpCommand.php ファイルの表示

@@ -54,7 +54,7 @@ class DumpCommand extends ContainerAwareCommand
54 54
     protected function execute(InputInterface $input, OutputInterface $output)
55 55
     {
56 56
         $output->writeln(sprintf('Dumping all <comment>%s</comment> assets.', $input->getOption('env')));
57
-        $output->writeln(sprintf('Debug mode is <comment>%s</comment>.', $input->getOption('no-debug') ? 'off' : 'on'));
57
+        $output->writeln(sprintf('Debug mode is <comment>%s</comment>.', $this->am->isDebug() ? 'on' : 'off'));
58 58
         $output->writeln('');
59 59
 
60 60
         if (!$input->getOption('watch')) {

+ 1 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/Controller/AsseticController.php ファイルの表示

@@ -58,6 +58,7 @@ class AsseticController
58 58
         }
59 59
 
60 60
         $response = $this->createResponse();
61
+        $response->setExpires(new \DateTime());
61 62
 
62 63
         // last-modified
63 64
         if (null !== $lastModified = $asset->getLastModified()) {

+ 2 - 19
vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/AsseticExtension.php ファイルの表示

@@ -53,6 +53,7 @@ class AsseticExtension extends Extension
53 53
 
54 54
         $container->setParameter('assetic.java.bin', $config['java']);
55 55
         $container->setParameter('assetic.node.bin', $config['node']);
56
+        $container->setParameter('assetic.ruby.bin', $config['ruby']);
56 57
         $container->setParameter('assetic.sass.bin', $config['sass']);
57 58
 
58 59
         // register formulae
@@ -121,25 +122,7 @@ class AsseticExtension extends Extension
121 122
             $loader->load('asset_writer.xml');
122 123
         }
123 124
 
124
-        // bundle and kernel resources
125
-        foreach ($container->getParameterBag()->resolveValue($config['bundles']) as $bundle) {
126
-            $rc = new \ReflectionClass($bundles[$bundle]);
127
-            foreach (array('twig', 'php') as $engine) {
128
-                $container->setDefinition(
129
-                    'assetic.'.$engine.'_directory_resource.'.$bundle,
130
-                    new DirectoryResourceDefinition($bundle, $engine, array(
131
-                        $container->getParameter('kernel.root_dir').'/Resources/'.$bundle.'/views',
132
-                        dirname($rc->getFileName()).'/Resources/views',
133
-                    ))
134
-                );
135
-            }
136
-        }
137
-        foreach (array('twig', 'php') as $engine) {
138
-            $container->setDefinition(
139
-                'assetic.'.$engine.'_directory_resource.kernel',
140
-                new DirectoryResourceDefinition('', $engine, array($container->getParameter('kernel.root_dir').'/Resources/views'))
141
-            );
142
-        }
125
+        $container->setParameter('assetic.bundles', $config['bundles']);
143 126
     }
144 127
 
145 128
     /**

+ 67 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/Compiler/TemplateResourcesPass.php ファイルの表示

@@ -0,0 +1,67 @@
1
+<?php
2
+
3
+/*
4
+ * This file is part of the Symfony framework.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * This source file is subject to the MIT license that is bundled
9
+ * with this source code in the file LICENSE.
10
+ */
11
+
12
+namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;
13
+
14
+use Symfony\Component\DependencyInjection\ContainerBuilder;
15
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
16
+use Symfony\Bundle\AsseticBundle\DependencyInjection\DirectoryResourceDefinition;
17
+
18
+/**
19
+ * This pass adds directory resources to scan for assetic assets.
20
+ *
21
+ * @author Kris Wallsmith <kris@symfony.com>
22
+ * @author Lukas Kahwe Smith <smith@pooteeweet.org>
23
+ */
24
+class TemplateResourcesPass implements CompilerPassInterface
25
+{
26
+    public function process(ContainerBuilder $container)
27
+    {
28
+        if (!$container->hasDefinition('assetic.asset_manager')) {
29
+            return;
30
+        }
31
+
32
+        $engines = $container->getParameter('templating.engines');
33
+
34
+        // bundle and kernel resources
35
+        $bundles = $container->getParameter('kernel.bundles');
36
+        $asseticBundles = $container->getParameterBag()->resolveValue($container->getParameter('assetic.bundles'));
37
+        foreach ($asseticBundles as $bundleName) {
38
+            $rc = new \ReflectionClass($bundles[$bundleName]);
39
+            foreach ($engines as $engine) {
40
+                $this->setBundleDirectoryResources($container, $engine, dirname($rc->getFileName()), $bundleName);
41
+            }
42
+        }
43
+
44
+        foreach ($engines as $engine) {
45
+            $this->setAppDirectoryResources($container, $engine);
46
+        }
47
+    }
48
+
49
+    protected function setBundleDirectoryResources(ContainerBuilder $container, $engine, $bundleDirName, $bundleName)
50
+    {
51
+        $container->setDefinition(
52
+            'assetic.'.$engine.'_directory_resource.'.$bundleName,
53
+            new DirectoryResourceDefinition($bundleName, $engine, array(
54
+                $container->getParameter('kernel.root_dir').'/Resources/'.$bundleName.'/views',
55
+                $bundleDirName.'/Resources/views',
56
+            ))
57
+        );
58
+    }
59
+
60
+    protected function setAppDirectoryResources(ContainerBuilder $container, $engine)
61
+    {
62
+        $container->setDefinition(
63
+            'assetic.'.$engine.'_directory_resource.kernel',
64
+            new DirectoryResourceDefinition('', $engine, array($container->getParameter('kernel.root_dir').'/Resources/views'))
65
+        );
66
+    }
67
+}

+ 1 - 1
vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/DirectoryResourceDefinition.php ファイルの表示

@@ -68,7 +68,7 @@ class DirectoryResourceDefinition extends Definition
68 68
             ->addArgument(new Reference('templating.loader'))
69 69
             ->addArgument($bundle)
70 70
             ->addArgument($dir)
71
-            ->addArgument('/^[^.]+\.[^.]+\.'.$engine.'$/')
71
+            ->addArgument('/\.[^.]+\.'.$engine.'$/')
72 72
             ->setPublic(false)
73 73
         ;
74 74
     }

+ 1 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/DependencyInjection/MainConfiguration.php ファイルの表示

@@ -65,6 +65,7 @@ class MainConfiguration implements ConfigurationInterface
65 65
                 ->booleanNode('dump_on_warmup')->end()
66 66
                 ->scalarNode('java')->defaultValue(function() use($finder) { return $finder->find('java', '/usr/bin/java'); })->end()
67 67
                 ->scalarNode('node')->defaultValue(function() use($finder) { return $finder->find('node', '/usr/bin/node'); })->end()
68
+                ->scalarNode('ruby')->defaultValue(function() use($finder) { return $finder->find('ruby', '/usr/bin/ruby'); })->end()
68 69
                 ->scalarNode('sass')->defaultValue(function() use($finder) { return $finder->find('sass', '/usr/bin/sass'); })->end()
69 70
             ->end()
70 71
 

+ 12 - 2
vendor/bundles/Symfony/Bundle/AsseticBundle/Factory/Resource/FileResource.php ファイルの表示

@@ -51,7 +51,14 @@ class FileResource implements ResourceInterface
51 51
 
52 52
     public function getContent()
53 53
     {
54
-        return $this->loader->load($this->getTemplate())->getContent();
54
+        $templateReference = $this->getTemplate();
55
+        $fileResource = $this->loader->load($templateReference);
56
+
57
+        if (!$fileResource) {
58
+            throw new \InvalidArgumentException(sprintf('Unable to find template "%s".', $templateReference));
59
+        }
60
+
61
+        return $fileResource->getContent();
55 62
     }
56 63
 
57 64
     public function __toString()
@@ -72,7 +79,10 @@ class FileResource implements ResourceInterface
72 79
     {
73 80
         $parts = explode('/', strtr($file, '\\', '/'));
74 81
         $elements = explode('.', array_pop($parts));
82
+        $engine = array_pop($elements);
83
+        $format = array_pop($elements);
84
+        $name = implode('.', $elements);
75 85
 
76
-        return new TemplateReference($bundle, implode('/', $parts), $elements[0], $elements[1], $elements[2]);
86
+        return new TemplateReference($bundle, implode('/', $parts), $name, $format, $engine);
77 87
     }
78 88
 }

+ 1 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/Resources/config/assetic.xml ファイルの表示

@@ -19,6 +19,7 @@
19 19
 
20 20
         <parameter key="assetic.node.paths" type="collection"></parameter>
21 21
         <parameter key="assetic.cache_dir">%kernel.cache_dir%/assetic</parameter>
22
+        <parameter key="assetic.bundles" type="collection"></parameter>
22 23
     </parameters>
23 24
 
24 25
     <services>

+ 4 - 2
vendor/bundles/Symfony/Bundle/AsseticBundle/Resources/config/filters/sprockets.xml ファイルの表示

@@ -6,7 +6,8 @@
6 6
 
7 7
     <parameters>
8 8
         <parameter key="assetic.filter.sprockets.class">Assetic\Filter\SprocketsFilter</parameter>
9
-        <parameter key="assetic.filter.sprockets.bin">/usr/bin/sprocketize</parameter>
9
+        <parameter key="assetic.filter.sprockets.lib">null</parameter>
10
+        <parameter key="assetic.filter.sprockets.ruby">%assetic.ruby.bin%</parameter>
10 11
         <parameter key="assetic.filter.sprockets.asset_root">%assetic.write_to%</parameter>
11 12
         <parameter key="assetic.filter.sprockets.include_dirs" type="collection" />
12 13
     </parameters>
@@ -14,7 +15,8 @@
14 15
     <services>
15 16
         <service id="assetic.filter.sprockets" class="%assetic.filter.sprockets.class%">
16 17
             <tag name="assetic.filter" alias="sprockets" />
17
-            <argument>%assetic.filter.sprockets.bin%</argument>
18
+            <argument>%assetic.filter.sprockets.lib%</argument>
19
+            <argument>%assetic.filter.sprockets.ruby%</argument>
18 20
             <call method="setAssetRoot"><argument>%assetic.filter.sprockets.asset_root%</argument></call>
19 21
         </service>
20 22
     </services>

+ 28 - 0
vendor/bundles/Symfony/Bundle/AsseticBundle/composer.json ファイルの表示

@@ -0,0 +1,28 @@
1
+{
2
+    "name": "symfony/assetic-bundle",
3
+    "version": "2.0.2",
4
+    "description": "Integrates Assetic into Symfony2",
5
+    "keywords": ["assets", "compression", "minification"],
6
+    "homepage": "https://github.com/symfony/AsseticBundle",
7
+    "type": "symfony-bundle",
8
+    "license": "MIT",
9
+    "authors": [
10
+        {
11
+            "name": "Kris Wallsmith",
12
+            "email": "kris.wallsmith@gmail.com",
13
+            "homepage": "http://kriswallsmith.net/"
14
+        }
15
+    ],
16
+    "require": {
17
+        "php": ">=5.3.0",
18
+        "symfony/framework-bundle": "2.0.*",
19
+        "kriswallsmith/assetic": "1.0.*"
20
+    },
21
+    "suggest": {
22
+        "symfony/twig-bundle": "2.0.*"
23
+    },
24
+    "autoload": {
25
+        "psr-0": { "Symfony\\Bundle\\AsseticBundle": "" }
26
+    },
27
+    "target-dir": "Symfony/Bundle/AsseticBundle"
28
+}

+ 0 - 1
vendor/doctrine-dbal/.gitignore ファイルの表示

@@ -1,4 +1,3 @@
1
-build.properties
2 1
 build/
3 2
 logs/
4 3
 reports/

+ 3 - 0
vendor/doctrine-dbal/.gitmodules ファイルの表示

@@ -4,3 +4,6 @@
4 4
 [submodule "lib/vendor/Symfony/Component/Console"]
5 5
 	path = lib/vendor/Symfony/Component/Console
6 6
 	url = git://github.com/symfony/Console.git
7
+[submodule "lib/vendor/doctrine-build-common"]
8
+	path = lib/vendor/doctrine-build-common
9
+	url = git://github.com/doctrine/doctrine-build-common.git

+ 10 - 0
vendor/doctrine-dbal/build.properties ファイルの表示

@@ -0,0 +1,10 @@
1
+# Project Name
2
+project.name=DoctrineDBAL
3
+
4
+# Dependency minimum versions
5
+dependencies.common=2.0.1
6
+dependencies.sfconsole=2.0.0
7
+
8
+# Version class and file
9
+project.version_class = Doctrine\DBAL\Version
10
+project.version_file = lib/Doctrine/DBAL/Version.php

+ 0 - 16
vendor/doctrine-dbal/build.properties.dev ファイルの表示

@@ -1,16 +0,0 @@
1
-version_name=2.0.2
2
-stability=stable
3
-build.dir=build
4
-dist.dir=dist
5
-report.dir=reports
6
-project.pirum_dir=
7
-project.download_dir=
8
-log.archive.dir=logs
9
-svn.path=/usr/bin/svn
10
-test.phpunit_configuration_file=
11
-test.phpunit_generate_coverage=0
12
-test.pmd_reports=0
13
-test.pdepend_exec=
14
-test.phpmd_exec=
15
-dependencies.common=2.0.1
16
-dependencies.sfconsole=2.0.0

+ 36 - 148
vendor/doctrine-dbal/build.xml ファイルの表示

@@ -1,11 +1,7 @@
1 1
 <?xml version="1.0"?>
2
-
3
-<!--
4
-    Doctrine 2 build file.
5
--->
6
-
7
-<project name="Doctrine DBAL" default="build" basedir=".">
2
+<project name="DoctrineDBAL" default="build" basedir=".">
8 3
     <taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
4
+    <import file="${project.basedir}/lib/vendor/doctrine-build-common/packaging.xml" />
9 5
 
10 6
     <property file="build.properties" />
11 7
 
@@ -41,163 +37,55 @@
41 37
     <!--
42 38
       Fileset for source of the Symfony YAML and Console components.
43 39
     -->
44
-    <fileset id="symfony-sources" dir="./lib/vendor">
40
+    <fileset id="external-sources" dir="./lib/vendor">
45 41
         <include name="Symfony/Component**"/>
46 42
     </fileset>
47 43
 
48
-    <!--
49
-        Clean the directory for the next build.
50
-    -->
51
-    <target name="clean">
52
-        <available file="./build.properties" property="build_properties_exist" value="true"/>
53
-        <fail unless="build_properties_exist" message="The build.properties file is missing." />
54
-
55
-        <delete dir="${build.dir}" includeemptydirs="true" />
56
-        <delete dir="${dist.dir}" includeemptydirs="true" />
57
-        <delete dir="${report.dir}" includeemptydirs="true" />
58
-    </target>
59
-
60
-    <!--
61
-        Prepare the new build directories after cleaning
62
-    -->
63
-    <target name="prepare" depends="clean">
64
-        <echo msg="Creating build directory: ${build.dir}" />
65
-        <mkdir dir="${build.dir}" />
66
-        <echo msg="Creating distribution directory: ${dist.dir}" />
67
-        <mkdir dir="${dist.dir}" />
68
-        <echo msg="Creating report directory: ${report.dir}" />
69
-        <mkdir dir="${report.dir}" />
70
-        <mkdir dir="${build.dir}/logs"/>
71
-        <mkdir dir="${report.dir}/tests"/>
72
-    </target>
73
-
74
-    <!--
75
-        Builds DBAL package, preparing it for distribution.
76
-    -->
77
-    <target name="build-dbal" depends="prepare">
78
-        <exec command="grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php" checkreturn="true"/>
79
-        <copy todir="${build.dir}/doctrine-dbal">
44
+    <target name="copy-files" depends="prepare">
45
+        <echo msg="Checking for ${version} in ${project.version_file}" />
46
+        <exec command="grep '${version}' ${project.basedir}/${project.version_file}" checkreturn="true"/>
47
+        <copy todir="${build.dir}/${project.name}-${version}">
80 48
             <fileset refid="shared-artifacts"/>
81 49
         </copy>
82
-        <copy todir="${build.dir}/doctrine-dbal">
50
+        <copy todir="${build.dir}/${project.name}-${version}">
83 51
             <fileset refid="common-sources"/>
84 52
             <fileset refid="dbal-sources"/>
85 53
         </copy>
86
-        <copy todir="${build.dir}/doctrine-dbal/Doctrine">
87
-            <fileset refid="symfony-sources"/>
54
+        <copy todir="${build.dir}/${project.name}-${version}/Doctrine">
55
+            <fileset refid="external-sources"/>
88 56
         </copy>
89
-        <copy todir="${build.dir}/doctrine-dbal/bin">
57
+        <copy todir="${build.dir}/${project.name}-${version}/bin">
90 58
             <fileset refid="bin-scripts"/>
91 59
         </copy>
92
-        <exec command="sed 's/${version}-DEV/${version}/' ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version.php > ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version2.php" passthru="true" />
93
-        <exec command="mv ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version2.php ${build.dir}/doctrine-dbal/Doctrine/DBAL/Version.php" passthru="true" />
94
-    </target>
95
-
96
-    <target name="build" depends="test,build-dbal"/>
97
-
98
-    <!--
99
-        Runs the full test suite.
100
-    -->
101
-    <target name="test" depends="prepare">
102
-        <if><equals arg1="${test.phpunit_generate_coverage}" arg2="1" />
103
-            <then>
104
-                <property name="test.phpunit_coverage_option" value="--coverage-clover ${build.dir}/logs/clover.xml" />
105
-            </then>
106
-            <else>
107
-                <property name="test.phpunit_coverage_option" value="" />
108
-            </else>
109
-        </if>
110
-
111
-        <if><equals arg1="${test.phpunit_configuration_file}" arg2="" />
112
-            <then>
113
-                <property name="test.phpunit_configuration_option" value="" />
114
-            </then>
115
-            <else>
116
-                <property name="test.phpunit_configuration_option" value="--configuration ${test.phpunit_configuration_file}" />
117
-            </else>
118
-        </if>
119
-
120
-        <exec command="phpunit ${test.phpunit_configuration_option} ${test.phpunit_coverage_option} --log-junit ../${build.dir}/logs/testsuites.xml Doctrine/Tests/AllTests.php" dir="./tests" />
121
-        <phpunitreport infile="${build.dir}/logs/testsuites.xml" format="frames" todir="${report.dir}/tests" />
122
-
123
-        <tstamp/>
124
-        <copy file="${build.dir}/logs/testsuites.xml" tofile="${log.archive.dir}/latest/log.xml" overwrite="true"/>
125
-
126
-        <if><equals arg1="${test.pmd_reports}" arg2="1" />
127
-            <then>
128
-                <exec command="${test.pdepend_exec} --jdepend-xml=${build.dir}/logs/jdepend.xml ./lib/Doctrine" />
129
-                <exec command="${test.phpmd_exec} ./lib/Doctrine xml codesize --reportfile ${build.dir}/logs/phpmd.xml" />
130
-
131
-                <copy file="${build.dir}/logs/jdepend.xml" tofile="${log.archive.dir}/latest/jdepend.xml" overwrite="true"/>
132
-                <copy file="${build.dir}/logs/phpmd.xml" tofile="${log.archive.dir}/latest/phpmd.xml" overwrite="true"/>
133
-            </then>
134
-        </if>
135 60
     </target>
136 61
 
137
-    <!--
138
-        Builds distributable PEAR packages.
139
-    -->
140
-    <target name="build-packages" depends="build-dbal">
141
-        <d51pearpkg2 baseinstalldir="/" dir="${build.dir}/doctrine-dbal">
142
-           <name>DoctrineDBAL</name>
143
-           <summary>Doctrine Database Abstraction Layer</summary>
144
-           <channel>pear.doctrine-project.org</channel>
145
-           <description>The Doctrine DBAL package is the database abstraction layer used to power the ORM package.</description>
146
-           <lead user="jwage" name="Jonathan H. Wage" email="jonwage@gmail.com" />
147
-           <lead user="guilhermeblanco" name="Guilherme Blanco" email="guilhermeblanco@gmail.com" />
148
-           <lead user="romanb" name="Roman Borschel" email="roman@code-factory.org" />
149
-           <lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de" />
150
-           <license>LGPL</license>
151
-           <version release="${version}" api="${version}" />
152
-           <stability release="${stability}" api="${stability}" />
153
-           <notes>-</notes>
154
-           <dependencies>
155
-               <php minimum_version="5.3.2" />
156
-               <pear minimum_version="1.6.0" recommended_version="1.6.1" />
157
-               <package name="DoctrineCommon" channel="pear.doctrine-project.org" minimum_version="${dependencies.common}" />
158
-               <!-- Doctrine Symfony Console PEAR package is generated in ORM build.xml process -->
159
-               <package name="DoctrineSymfonyConsole" channel="pear.doctrine-project.org" minimum_version="${dependencies.sfconsole}" />
160
-           </dependencies>
161
-           <dirroles key="bin">script</dirroles>
162
-           <ignore>Doctrine/Common/</ignore>
163
-           <ignore>Doctrine/Symfony/</ignore>
164
-           <release>
62
+    <target name="define-pear-package" depends="copy-files">
63
+        <d51pearpkg2 baseinstalldir="/" dir="${build.dir}/${project.name}-${version}">
64
+            <name>${project.name}</name>
65
+            <summary>Doctrine Database Abstraction Layer</summary>
66
+            <channel>pear.doctrine-project.org</channel>
67
+            <description>The Doctrine DBAL package is the database abstraction layer used to power the ORM package.</description>
68
+            <lead user="jwage" name="Jonathan H. Wage" email="jonwage@gmail.com" />
69
+            <lead user="guilhermeblanco" name="Guilherme Blanco" email="guilhermeblanco@gmail.com" />
70
+            <lead user="romanb" name="Roman Borschel" email="roman@code-factory.org" />
71
+            <lead user="beberlei" name="Benjamin Eberlei" email="kontakt@beberlei.de" />
72
+            <license>LGPL</license>
73
+            <version release="${pear.version}" api="${pear.version}" />
74
+            <stability release="${pear.stability}" api="${pear.stability}" />
75
+            <notes>-</notes>
76
+            <dependencies>
77
+                <php minimum_version="5.3.2" />
78
+                <pear minimum_version="1.6.0" recommended_version="1.6.1" />
79
+                <package name="DoctrineCommon" channel="pear.doctrine-project.org" minimum_version="${dependencies.common}" />
80
+                <package name="Console" channel="pear.symfony.com" minimum_version="${dependencies.sfconsole}" />
81
+            </dependencies>
82
+            <dirroles key="bin">script</dirroles>
83
+            <ignore>Doctrine/Common/</ignore>
84
+            <ignore>Doctrine/Symfony/</ignore>
85
+            <release>
165 86
                 <install as="doctrine-dbal" name="bin/doctrine-dbal" />
166 87
                 <install as="doctrine-dbal.php" name="bin/doctrine-dbal.php" />
167
-           </release>
88
+            </release>
168 89
         </d51pearpkg2>
169
-        <exec command="pear package" dir="${build.dir}/doctrine-dbal" passthru="true" />
170
-        <exec command="mv DoctrineDBAL-${version}.tgz ../../dist" dir="${build.dir}/doctrine-dbal" passthru="true" />
171
-        <tar destfile="dist/DoctrineDBAL-${version}-full.tar.gz" compression="gzip" basedir="${build.dir}">
172
-            <fileset dir="${build.dir}">
173
-                <include name="**/**" />
174
-                <exclude name="logs/" />
175
-            </fileset>
176
-        </tar>
177 90
     </target>
178
-
179
-    <target name="git-tag">
180
-        <exec command="grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php" checkreturn="true"/>
181
-        <exec command="git tag -a ${version}" passthru="true" />
182
-    </target>
183
-
184
-    <target name="pirum-release">
185
-        <exec command="sudo pirum add ${project.pirum_dir} ${project.basedir}/dist/DoctrineDBAL-${version}.tgz" dir="."  passthru="true" />
186
-        <exec command="sudo pirum build ${project.pirum_dir}" passthru="true" />
187
-    </target>
188
-
189
-    <target name="distribute-download">
190
-        <copy file="dist/DoctrineDBAL-${version}-full.tar.gz" todir="${project.download_dir}" />
191
-    </target>
192
-
193
-    <target name="update-dev-version">
194
-        <exec command="grep '${version}' ${project.basedir}/lib/Doctrine/DBAL/Version.php" checkreturn="true"/>
195
-        <propertyprompt propertyName="next_version" defaultValue="${version}" promptText="Enter next version string (without -DEV)" />
196
-        <exec command="sed 's/${version}-DEV/${next_version}-DEV/' ${project.basedir}/lib/Doctrine/DBAL/Version.php > ${project.basedir}/lib/Doctrine/DBAL/Version2.php" passthru="true" />
197
-        <exec command="mv ${project.basedir}/lib/Doctrine/DBAL/Version2.php ${project.basedir}/lib/Doctrine/DBAL/Version.php" passthru="true" />
198
-        <exec command="git add ${project.basedir}/lib/Doctrine/DBAL/Version.php" passthru="true" />
199
-        <exec command="git commit -m 'Bump Dev Version to ${next_version}'" passthru="true" />
200
-    </target>
201
-
202
-    <target name="release" depends="git-tag,build-packages,distribute-download,pirum-release,update-dev-version" />
203 91
 </project>

+ 1 - 1
vendor/doctrine-dbal/composer.json ファイルの表示

@@ -1,6 +1,6 @@
1 1
 {
2 2
     "name": "doctrine/dbal",
3
-    "type": "library",
3
+    "type": "library","version":"2.1.7",
4 4
     "description": "Database Abstraction Layer",
5 5
     "keywords": ["dbal", "database", "persistence", "queryobject"],
6 6
     "homepage": "http://www.doctrine-project.org",

+ 10 - 6
vendor/doctrine-dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php ファイルの表示

@@ -54,11 +54,15 @@ class Driver implements \Doctrine\DBAL\Driver
54 54
         if (isset($params['port']) && !empty($params['port'])) {
55 55
             $dsn .= ',' . $params['port'];
56 56
         }
57
-		
58
-		if (isset($params['dbname'])) {
59
-			$dsn .= ';Database=' .  $params['dbname'];
60
-		}
61
-		
57
+
58
+        if (isset($params['dbname'])) {;
59
+            $dsn .= ';Database=' .  $params['dbname'];
60
+        }
61
+
62
+        if (isset($params['MultipleActiveResultSets'])) {
63
+            $dsn .= '; MultipleActiveResultSets=' . ($params['MultipleActiveResultSets'] ? 'true' : 'false');
64
+        }
65
+
62 66
         return $dsn;
63 67
     }
64 68
 
@@ -83,4 +87,4 @@ class Driver implements \Doctrine\DBAL\Driver
83 87
         $params = $conn->getParams();
84 88
         return $params['dbname'];
85 89
     }
86
-}
90
+}

+ 3 - 3
vendor/doctrine-dbal/lib/Doctrine/DBAL/SQLParserUtils.php ファイルの表示

@@ -61,7 +61,7 @@ class SQLParserUtils
61 61
                 } else {
62 62
                     $name = "";
63 63
                     // TODO: Something faster/better to match this than regex?
64
-                    for ($j = $i; ($j < $stmtLen && preg_match('(([:a-zA-Z0-9]{1}))', $statement[$j])); $j++) {
64
+                    for ($j = $i; ($j < $stmtLen && preg_match('(([:a-zA-Z0-9_]{1}))', $statement[$j])); $j++) {
65 65
                         $name .= $statement[$j];
66 66
                     }
67 67
                     $paramMap[$name][] = $i; // named parameters can be duplicated!
@@ -90,7 +90,7 @@ class SQLParserUtils
90 90
         $bindIndex = -1;
91 91
         foreach ($types AS $name => $type) {
92 92
             ++$bindIndex;
93
-            if ($type === Connection::PARAM_INT_ARRAY || $type == Connection::PARAM_STR_ARRAY) {
93
+            if ($type === Connection::PARAM_INT_ARRAY || $type === Connection::PARAM_STR_ARRAY) {
94 94
                 if ($isPositional) {
95 95
                     $name = $bindIndex;
96 96
                 }
@@ -140,4 +140,4 @@ class SQLParserUtils
140 140
         
141 141
         return array($query, $params, $types);
142 142
     }
143
-}
143
+}

+ 0 - 2
vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php ファイルの表示

@@ -135,8 +135,6 @@ class MySqlSchemaManager extends AbstractSchemaManager
135 135
             case 'mediumblob':
136 136
             case 'longblob':
137 137
             case 'blob':
138
-            case 'binary':
139
-            case 'varbinary':
140 138
             case 'year':
141 139
                 $length = null;
142 140
                 break;

+ 1 - 1
vendor/doctrine-dbal/lib/Doctrine/DBAL/Version.php ファイルの表示

@@ -36,7 +36,7 @@ class Version
36 36
     /**
37 37
      * Current Doctrine Version
38 38
      */
39
-    const VERSION = '2.1.7-DEV';
39
+    const VERSION = '2.1.7';
40 40
 
41 41
     /**
42 42
      * Compares a Doctrine version with the current one.

+ 6 - 0
vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php ファイルの表示

@@ -6,6 +6,12 @@ require_once __DIR__ . '/../../../TestInit.php';
6 6
  
7 7
 class OCI8StatementTest extends \Doctrine\Tests\DbalTestCase
8 8
 {
9
+    public function setUp()
10
+    {
11
+        if ( ! extension_loaded('oci8')) {
12
+            $this->markTestSkipped();
13
+        }
14
+    }
9 15
 
10 16
     protected function getMockOCI8Statement()
11 17
     {

+ 38 - 22
vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/Functional/TemporaryTableTest.php ファイルの表示

@@ -12,75 +12,91 @@ class TemporaryTableTest extends \Doctrine\Tests\DbalFunctionalTestCase
12 12
     {
13 13
         parent::setUp();
14 14
         try {
15
-            $this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTableSQL("non_temporary"));
15
+            $this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTableSQL("nontemporary"));
16 16
         } catch(\Exception $e) {
17 17
 
18 18
         }
19 19
     }
20 20
 
21
+    public function tearDown()
22
+    {
23
+        if ($this->_conn) {
24
+            try {
25
+                $tempTable = $this->_conn->getDatabasePlatform()->getTemporaryTableName("temporary");
26
+                $this->_conn->exec($this->_conn->getDatabasePlatform()->getDropTemporaryTableSQL($tempTable));
27
+            } catch(\Exception $e) { }
28
+        }
29
+    }
30
+
21 31
     /**
22 32
      * @group DDC-1337
23 33
      * @return void
24 34
      */
25
-    public function testDropTemporaryTableNotAbortsTransaction()
35
+    public function testDropTemporaryTableNotAutoCommitTransaction()
26 36
     {
27 37
         $platform = $this->_conn->getDatabasePlatform();
28 38
         $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
29 39
         $tempTable = $platform->getTemporaryTableName("temporary");
30 40
 
31
-        $tempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
41
+        $createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
32 42
                 . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
43
+        $this->_conn->executeUpdate($createTempTableSQL);
33 44
 
34
-        $table = new Table("non_temporary");
45
+        $table = new Table("nontemporary");
35 46
         $table->addColumn("id", "integer");
47
+        $table->setPrimaryKey(array('id'));
36 48
 
37
-        $this->_conn->getSchemaManager()->createTable($table);
38
-        $this->_conn->beginTransaction();
39
-        $this->_conn->insert("non_temporary", array("id" => 1));
49
+        foreach ($platform->getCreateTableSQL($table) AS $sql) {
50
+            $this->_conn->executeQuery($sql);
51
+        }
40 52
 
41
-        $this->_conn->exec($tempTableSQL);
53
+        $this->_conn->beginTransaction();
54
+        $this->_conn->insert("nontemporary", array("id" => 1));
42 55
         $this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable));
43
-
44
-        $this->_conn->insert("non_temporary", array("id" => 2));
56
+        $this->_conn->insert("nontemporary", array("id" => 2));
45 57
 
46 58
         $this->_conn->rollback();
47 59
 
48
-        $rows = $this->_conn->fetchAll('SELECT * FROM non_temporary');
49
-        $this->assertEquals(array(), $rows);
60
+        $rows = $this->_conn->fetchAll('SELECT * FROM nontemporary');
61
+        $this->assertEquals(array(), $rows, "In an event of an error this result has one row, because of an implicit commit.");
50 62
     }
51 63
 
52 64
     /**
53 65
      * @group DDC-1337
54 66
      * @return void
55 67
      */
56
-    public function testCreateTemporaryTableNotAbortsTransaction()
68
+    public function testCreateTemporaryTableNotAutoCommitTransaction()
57 69
     {
58 70
         $platform = $this->_conn->getDatabasePlatform();
59 71
         $columnDefinitions = array("id" => array("type" => Type::getType("integer"), "notnull" => true));
60 72
         $tempTable = $platform->getTemporaryTableName("temporary");
61 73
 
62
-        $tempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
74
+        $createTempTableSQL = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
63 75
                 . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
64 76
 
65
-        $table = new Table("non_temporary");
77
+        $table = new Table("nontemporary");
66 78
         $table->addColumn("id", "integer");
79
+        $table->setPrimaryKey(array('id'));
80
+
81
+        foreach ($platform->getCreateTableSQL($table) AS $sql) {
82
+            $this->_conn->executeQuery($sql);
83
+        }
67 84
 
68
-        $this->_conn->getSchemaManager()->createTable($table);
69 85
         $this->_conn->beginTransaction();
70
-        $this->_conn->insert("non_temporary", array("id" => 1));
86
+        $this->_conn->insert("nontemporary", array("id" => 1));
71 87
 
72
-        $this->_conn->exec($tempTableSQL);
73
-        $this->_conn->insert("non_temporary", array("id" => 2));
88
+        $this->_conn->exec($createTempTableSQL);
89
+        $this->_conn->insert("nontemporary", array("id" => 2));
74 90
 
75 91
         $this->_conn->rollback();
76 92
 
77 93
         try {
78 94
             $this->_conn->exec($platform->getDropTemporaryTableSQL($tempTable));
79 95
         } catch(\Exception $e) {
80
-            
96
+
81 97
         }
82 98
 
83
-        $rows = $this->_conn->fetchAll('SELECT * FROM non_temporary');
84
-        $this->assertEquals(array(), $rows);
99
+        $rows = $this->_conn->fetchAll('SELECT * FROM nontemporary');
100
+        $this->assertEquals(array(), $rows, "In an event of an error this result has one row, because of an implicit commit.");
85 101
     }
86 102
 }

+ 2 - 1
vendor/doctrine-dbal/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php ファイルの表示

@@ -33,6 +33,7 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
33 33
             array('SELECT * FROM Foo WHERE bar IN (:name1, :name2)', false, array(':name1' => array(32), ':name2' => array(40))),
34 34
             array('SELECT ":foo" FROM Foo WHERE bar IN (:name1, :name2)', false, array(':name1' => array(37), ':name2' => array(45))),
35 35
             array("SELECT ':foo' FROM Foo WHERE bar IN (:name1, :name2)", false, array(':name1' => array(37), ':name2' => array(45))),
36
+            array('SELECT :foo_id', false, array(':foo_id' => array(7))), // Ticket DBAL-231
36 37
         );
37 38
     }
38 39
     
@@ -116,4 +117,4 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
116 117
         $this->assertEquals($expectedParams, $params, "Params dont match");
117 118
         $this->assertEquals($expectedTypes, $types, "Types dont match");
118 119
     }
119
-}
120
+}

+ 1 - 1
vendor/doctrine/composer.json ファイルの表示

@@ -1,6 +1,6 @@
1 1
 {
2 2
     "name": "doctrine/orm",
3
-    "type": "library","version":"2.1.6",
3
+    "type": "library","version":"2.1.7",
4 4
     "description": "Object-Relational-Mapper for PHP",
5 5
     "keywords": ["orm", "database"],
6 6
     "homepage": "http://www.doctrine-project.org",

+ 4 - 2
vendor/doctrine/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php ファイルの表示

@@ -884,7 +884,9 @@ class ClassMetadataInfo implements ClassMetadata
884 884
             foreach ($mapping['joinColumns'] as $key => &$joinColumn) {
885 885
                 if ($mapping['type'] === self::ONE_TO_ONE) {
886 886
                     if (count($mapping['joinColumns']) == 1) {
887
-                        $joinColumn['unique'] = true;
887
+                        if (! isset($mapping['id']) || ! $mapping['id']) {
888
+                            $joinColumn['unique'] = true;
889
+                        }
888 890
                     } else {
889 891
                         $uniqueContraintColumns[] = $joinColumn['name'];
890 892
                     }
@@ -1640,7 +1642,7 @@ class ClassMetadataInfo implements ClassMetadata
1640 1642
                 if ( ! class_exists($className)) {
1641 1643
                     throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
1642 1644
                 }
1643
-                if (is_subclass_of($className, $this->name)) {
1645
+                if (is_subclass_of($className, $this->name) && ! in_array($className, $this->subClasses)) {
1644 1646
                     $this->subClasses[] = $className;
1645 1647
                 }
1646 1648
             }

+ 16 - 5
vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php ファイルの表示

@@ -185,12 +185,13 @@ class DatabaseDriver implements Driver
185 185
         $fieldMappings = array();
186 186
         foreach ($columns as $column) {
187 187
             $fieldMapping = array();
188
-            if ($primaryKeyColumns && in_array($column->getName(), $primaryKeyColumns)) {
189
-                $fieldMapping['id'] = true;
190
-            } else if (in_array($column->getName(), $allForeignKeyColumns)) {
188
+            
189
+            if (in_array($column->getName(), $allForeignKeyColumns)) {
191 190
                 continue;
191
+            } else if ($primaryKeyColumns && in_array($column->getName(), $primaryKeyColumns)) {
192
+                $fieldMapping['id'] = true;
192 193
             }
193
-
194
+            
194 195
             $fieldMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $column->getName(), false);
195 196
             $fieldMapping['columnName'] = $column->getName();
196 197
             $fieldMapping['type'] = strtolower((string) $column->getType());
@@ -291,13 +292,23 @@ class DatabaseDriver implements Driver
291 292
             $associationMapping['fieldName'] = $this->getFieldNameForColumn($tableName, $localColumn, true);
292 293
             $associationMapping['targetEntity'] = $this->getClassNameForTable($foreignTable);
293 294
 
295
+            if ($primaryKeyColumns && in_array($localColumn, $primaryKeyColumns)) {
296
+                $associationMapping['id'] = true;
297
+            }
298
+
294 299
             for ($i = 0; $i < count($cols); $i++) {
295 300
                 $associationMapping['joinColumns'][] = array(
296 301
                     'name' => $cols[$i],
297 302
                     'referencedColumnName' => $fkCols[$i],
298 303
                 );
299 304
             }
300
-            $metadata->mapManyToOne($associationMapping);
305
+            
306
+            //Here we need to check if $cols are the same as $primaryKeyColums
307
+            if (!array_diff($cols,$primaryKeyColumns)) {
308
+                $metadata->mapOneToOne($associationMapping);
309
+            } else {
310
+                $metadata->mapManyToOne($associationMapping);
311
+            }
301 312
         }
302 313
     }
303 314
 

+ 25 - 1
vendor/doctrine/lib/Doctrine/ORM/PersistentCollection.php ファイルの表示

@@ -280,7 +280,7 @@ final class PersistentCollection implements Collection
280 280
         if ( ! $this->isDirty) {
281 281
             $this->isDirty = true;
282 282
             if ($this->association !== null && $this->association['isOwningSide'] && $this->association['type'] == ClassMetadata::MANY_TO_MANY &&
283
-                    $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()) {
283
+                    $this->owner && $this->em->getClassMetadata(get_class($this->owner))->isChangeTrackingNotify()) {
284 284
                 $this->em->getUnitOfWork()->scheduleForDirtyCheck($this->owner);
285 285
             }
286 286
         }
@@ -687,4 +687,28 @@ final class PersistentCollection implements Collection
687 687
         $this->initialize();
688 688
         return $this->coll->slice($offset, $length);
689 689
     }
690
+
691
+    /**
692
+     * Cleanup internal state of cloned persistent collection.
693
+     *
694
+     * The following problems have to be prevented:
695
+     * 1. Added entities are added to old PC
696
+     * 2. New collection is not dirty, if reused on other entity nothing
697
+     * changes.
698
+     * 3. Snapshot leads to invalid diffs being generated.
699
+     * 4. Lazy loading grabs entities from old owner object.
700
+     * 5. New collection is connected to old owner and leads to duplicate keys.
701
+     */
702
+    public function __clone()
703
+    {
704
+        if (is_object($this->coll)) {
705
+            $this->coll = clone $this->coll;
706
+        }
707
+
708
+        $this->initialize();
709
+        $this->owner = null;
710
+
711
+        $this->snapshot = array();
712
+        $this->changed();
713
+    }
690 714
 }

+ 1 - 1
vendor/doctrine/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php ファイルの表示

@@ -194,4 +194,4 @@ abstract class AbstractCollectionPersister
194 194
      * @param mixed $element
195 195
      */
196 196
     abstract protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element);
197
-}
197
+}

+ 2 - 0
vendor/doctrine/lib/Doctrine/ORM/Query/Expr.php ファイルの表示

@@ -560,6 +560,8 @@ class Expr
560 560
     {
561 561
         if (is_numeric($literal) && !is_string($literal)) {
562 562
             return (string) $literal;
563
+        } else if (is_bool($literal)) {
564
+            return $literal ? "true" : "false";
563 565
         } else {
564 566
             return "'" . str_replace("'", "''", $literal) . "'";
565 567
         }

+ 110 - 111
vendor/doctrine/lib/Doctrine/ORM/Query/SqlWalker.php ファイルの表示

@@ -39,7 +39,7 @@ class SqlWalker implements TreeWalker
39 39
      * @var string
40 40
      */
41 41
     const HINT_DISTINCT = 'doctrine.distinct';
42
-  
42
+
43 43
     /**
44 44
      * @var ResultSetMapping
45 45
      */
@@ -165,18 +165,18 @@ class SqlWalker implements TreeWalker
165 165
         switch (true) {
166 166
             case ($AST instanceof AST\DeleteStatement):
167 167
                 $primaryClass = $this->_em->getClassMetadata($AST->deleteClause->abstractSchemaName);
168
-                
168
+
169 169
                 return ($primaryClass->isInheritanceTypeJoined())
170 170
                     ? new Exec\MultiTableDeleteExecutor($AST, $this)
171 171
                     : new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
172
-                
172
+
173 173
             case ($AST instanceof AST\UpdateStatement):
174 174
                 $primaryClass = $this->_em->getClassMetadata($AST->updateClause->abstractSchemaName);
175
-                
176
-                return ($primaryClass->isInheritanceTypeJoined()) 
175
+
176
+                return ($primaryClass->isInheritanceTypeJoined())
177 177
                     ? new Exec\MultiTableUpdateExecutor($AST, $this)
178 178
                     : new Exec\SingleTableDeleteUpdateExecutor($AST, $this);
179
-                
179
+
180 180
             default:
181 181
                 return new Exec\SingleSelectExecutor($AST, $this);
182 182
         }
@@ -267,7 +267,7 @@ class SqlWalker implements TreeWalker
267 267
                 $sql .= ' LEFT JOIN ' . $subClass->getQuotedTableName($this->_platform)
268 268
                         . ' ' . $tableAlias . ' ON ';
269 269
                 $first = true;
270
-                
270
+
271 271
                 foreach ($class->getQuotedIdentifierColumnNames($this->_platform) as $columnName) {
272 272
                     if ($first) $first = false; else $sql .= ' AND ';
273 273
 
@@ -333,8 +333,7 @@ class SqlWalker implements TreeWalker
333 333
                     $encapsulate = true;
334 334
                 }
335 335
 
336
-                $sql .= ($sql != '' ? ' AND ' : '')
337
-                      . (($this->_useSqlTableAliases) ? $this->getSQLTableAlias($class->table['name'], $dqlAlias) . '.' : '')
336
+                $sql .= (($this->_useSqlTableAliases) ? $this->getSQLTableAlias($class->table['name'], $dqlAlias) . '.' : '')
338 337
                       . $class->discriminatorColumn['name'] . ' IN (' . implode(', ', $values) . ')';
339 338
             }
340 339
         }
@@ -502,7 +501,7 @@ class SqlWalker implements TreeWalker
502 501
                     throw QueryException::associationPathInverseSideNotSupported();
503 502
                 }
504 503
                 break;
505
-                
504
+
506 505
             default:
507 506
                 throw QueryException::invalidPathExpression($pathExpr);
508 507
         }
@@ -549,7 +548,7 @@ class SqlWalker implements TreeWalker
549 548
                 $tblAlias = $this->getSQLTableAlias($rootClass->table['name'], $dqlAlias);
550 549
                 $discrColumn = $rootClass->discriminatorColumn;
551 550
                 $columnAlias = $this->getSQLColumnAlias($discrColumn['name']);
552
-                
551
+
553 552
                 $sqlSelectExpressions[] = $tblAlias . '.' . $discrColumn['name'] . ' AS ' . $columnAlias;
554 553
 
555 554
                 $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
@@ -567,12 +566,12 @@ class SqlWalker implements TreeWalker
567 566
                             } else {
568 567
                                 $sqlTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
569 568
                             }
570
-                            
569
+
571 570
                             foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
572 571
                                 $columnAlias = $this->getSQLColumnAlias($srcColumn);
573
-                                
572
+
574 573
                                 $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
575
-                                
574
+
576 575
                                 $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
577 576
                                 $this->_rsm->addMetaResult($dqlAlias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn, (isset($assoc['id']) && $assoc['id'] === true));
578 577
                             }
@@ -587,9 +586,9 @@ class SqlWalker implements TreeWalker
587 586
                         if ($assoc['isOwningSide'] && $assoc['type'] & ClassMetadata::TO_ONE) {
588 587
                             foreach ($assoc['targetToSourceKeyColumns'] as $srcColumn) {
589 588
                                 $columnAlias = $this->getSQLColumnAlias($srcColumn);
590
-                                
589
+
591 590
                                 $sqlSelectExpressions[] = $sqlTableAlias . '.' . $srcColumn . ' AS ' . $columnAlias;
592
-                                
591
+
593 592
                                 $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
594 593
                                 $this->_rsm->addMetaResult($dqlAlias, $this->_platform->getSQLResultCasing($columnAlias), $srcColumn, (isset($assoc['id']) && $assoc['id'] === true));
595 594
                             }
@@ -598,7 +597,7 @@ class SqlWalker implements TreeWalker
598 597
                 }
599 598
             }
600 599
         }
601
-        
600
+
602 601
         $sql .= implode(', ', $sqlSelectExpressions);
603 602
 
604 603
         return $sql;
@@ -619,7 +618,7 @@ class SqlWalker implements TreeWalker
619 618
 
620 619
             $rangeDecl = $identificationVariableDecl->rangeVariableDeclaration;
621 620
             $dqlAlias = $rangeDecl->aliasIdentificationVariable;
622
-        
621
+
623 622
             $this->_rootAliases[] = $dqlAlias;
624 623
 
625 624
             $class = $this->_em->getClassMetadata($rangeDecl->abstractSchemaName);
@@ -874,7 +873,7 @@ class SqlWalker implements TreeWalker
874 873
 
875 874
         return $sql;
876 875
     }
877
-    
876
+
878 877
     /**
879 878
      * Walks down a CoalesceExpression AST node and generates the corresponding SQL.
880 879
      *
@@ -884,32 +883,32 @@ class SqlWalker implements TreeWalker
884 883
     public function walkCoalesceExpression($coalesceExpression)
885 884
     {
886 885
         $sql = 'COALESCE(';
887
-        
886
+
888 887
         $scalarExpressions = array();
889
-        
888
+
890 889
         foreach ($coalesceExpression->scalarExpressions as $scalarExpression) {
891 890
             $scalarExpressions[] = $this->walkSimpleArithmeticExpression($scalarExpression);
892 891
         }
893
-        
892
+
894 893
         $sql .= implode(', ', $scalarExpressions) . ')';
895
-        
894
+
896 895
         return $sql;
897 896
     }
898
-    
897
+
899 898
     public function walkCaseExpression($expression)
900 899
     {
901 900
         switch (true) {
902 901
             case ($expression instanceof AST\CoalesceExpression):
903 902
                 return $this->walkCoalesceExpression($expression);
904
-                
903
+
905 904
             case ($expression instanceof AST\NullIfExpression):
906 905
                 return $this->walkNullIfExpression($expression);
907
-                
906
+
908 907
             default:
909 908
                 return '';
910 909
         }
911 910
     }
912
-    
911
+
913 912
     /**
914 913
      * Walks down a NullIfExpression AST node and generates the corresponding SQL.
915 914
      *
@@ -918,14 +917,14 @@ class SqlWalker implements TreeWalker
918 917
      */
919 918
     public function walkNullIfExpression($nullIfExpression)
920 919
     {
921
-        $firstExpression = is_string($nullIfExpression->firstExpression) 
920
+        $firstExpression = is_string($nullIfExpression->firstExpression)
922 921
             ? $this->_conn->quote($nullIfExpression->firstExpression)
923 922
             : $this->walkSimpleArithmeticExpression($nullIfExpression->firstExpression);
924
-        
925
-        $secondExpression = is_string($nullIfExpression->secondExpression) 
923
+
924
+        $secondExpression = is_string($nullIfExpression->secondExpression)
926 925
             ? $this->_conn->quote($nullIfExpression->secondExpression)
927 926
             : $this->walkSimpleArithmeticExpression($nullIfExpression->secondExpression);
928
-        
927
+
929 928
         return 'NULLIF(' . $firstExpression . ', ' . $secondExpression . ')';
930 929
     }
931 930
 
@@ -962,7 +961,7 @@ class SqlWalker implements TreeWalker
962 961
                 $sqlTableAlias = $this->getSQLTableAlias($tableName, $dqlAlias);
963 962
                 $columnName = $class->getQuotedColumnName($fieldName, $this->_platform);
964 963
 
965
-                $columnAlias = $this->getSQLColumnAlias($columnName);
964
+                $columnAlias = $this->getSQLColumnAlias($class->fieldMappings[$fieldName]['columnName']);
966 965
                 $sql .= $sqlTableAlias . '.' . $columnName . ' AS ' . $columnAlias;
967 966
                 $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
968 967
                 $this->_rsm->addScalarResult($columnAlias, $resultAlias);
@@ -1025,13 +1024,13 @@ class SqlWalker implements TreeWalker
1025 1024
             }
1026 1025
 
1027 1026
             $columnAlias = 'sclr' . $this->_aliasCounter++;
1028
-            
1027
+
1029 1028
             if ($expr instanceof AST\Literal) {
1030 1029
                 $sql .= $this->walkLiteral($expr) . ' AS ' .$columnAlias;
1031 1030
             } else {
1032 1031
                 $sql .= $this->walkSimpleArithmeticExpression($expr) . ' AS ' . $columnAlias;
1033 1032
             }
1034
-            
1033
+
1035 1034
             $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
1036 1035
 
1037 1036
             $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
@@ -1048,9 +1047,9 @@ class SqlWalker implements TreeWalker
1048 1047
             }
1049 1048
 
1050 1049
             $columnAlias = 'sclr' . $this->_aliasCounter++;
1051
-            
1050
+
1052 1051
             $sql .= $this->walkCaseExpression($expr) . ' AS ' . $columnAlias;
1053
-            
1052
+
1054 1053
             $this->_scalarResultAliasMap[$resultAlias] = $columnAlias;
1055 1054
 
1056 1055
             $columnAlias = $this->_platform->getSQLResultCasing($columnAlias);
@@ -1230,61 +1229,61 @@ class SqlWalker implements TreeWalker
1230 1229
     {
1231 1230
         $expr = $simpleSelectExpression->expression;
1232 1231
         $sql  = ' ';
1233
-        
1232
+
1234 1233
         switch (true) {
1235 1234
             case ($expr instanceof AST\PathExpression):
1236 1235
                 $sql .= $this->walkPathExpression($expr);
1237 1236
                 break;
1238
-            
1237
+
1239 1238
             case ($expr instanceof AST\AggregateExpression):
1240 1239
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
1241
-                
1240
+
1242 1241
                 $sql .= $this->walkAggregateExpression($expr) . ' AS dctrn__' . $alias;
1243 1242
                 break;
1244
-            
1243
+
1245 1244
             case ($expr instanceof AST\Subselect):
1246 1245
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
1247
-                
1246
+
1248 1247
                 $columnAlias = 'sclr' . $this->_aliasCounter++;
1249 1248
                 $this->_scalarResultAliasMap[$alias] = $columnAlias;
1250
-                
1249
+
1251 1250
                 $sql .= '(' . $this->walkSubselect($expr) . ') AS ' . $columnAlias;
1252 1251
                 break;
1253
-            
1252
+
1254 1253
             case ($expr instanceof AST\Functions\FunctionNode):
1255 1254
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
1256
-                
1255
+
1257 1256
                 $columnAlias = 'sclr' . $this->_aliasCounter++;
1258 1257
                 $this->_scalarResultAliasMap[$alias] = $columnAlias;
1259
-                
1258
+
1260 1259
                 $sql .= $this->walkFunction($expr) . ' AS ' . $columnAlias;
1261 1260
                 break;
1262
-            
1261
+
1263 1262
             case ($expr instanceof AST\SimpleArithmeticExpression):
1264 1263
             case ($expr instanceof AST\ArithmeticTerm):
1265 1264
             case ($expr instanceof AST\ArithmeticFactor):
1266 1265
             case ($expr instanceof AST\ArithmeticPrimary):
1267 1266
             case ($expr instanceof AST\Literal):
1268 1267
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
1269
-                
1268
+
1270 1269
                 $columnAlias = 'sclr' . $this->_aliasCounter++;
1271 1270
                 $this->_scalarResultAliasMap[$alias] = $columnAlias;
1272
-                
1271
+
1273 1272
                 $sql .= $this->walkSimpleArithmeticExpression($expr) . ' AS ' . $columnAlias;
1274 1273
                 break;
1275
-                
1274
+
1276 1275
             case ($expr instanceof AST\NullIfExpression):
1277 1276
             case ($expr instanceof AST\CoalesceExpression):
1278 1277
             case ($expr instanceof AST\GeneralCaseExpression):
1279 1278
             case ($expr instanceof AST\SimpleCaseExpression):
1280 1279
                 $alias = $simpleSelectExpression->fieldIdentificationVariable ?: $this->_scalarResultCounter++;
1281
-                
1280
+
1282 1281
                 $columnAlias = 'sclr' . $this->_aliasCounter++;
1283 1282
                 $this->_scalarResultAliasMap[$alias] = $columnAlias;
1284
-                
1283
+
1285 1284
                 $sql .= $this->walkCaseExpression($expr) . ' AS ' . $columnAlias;
1286 1285
                 break;
1287
-            
1286
+
1288 1287
             default: // IdentificationVariable
1289 1288
                 $class      = $this->_queryComponents[$expr]['metadata'];
1290 1289
                 $tableAlias = $this->getSQLTableAlias($class->getTableName(), $expr);
@@ -1293,11 +1292,11 @@ class SqlWalker implements TreeWalker
1293 1292
                 foreach ($class->getQuotedIdentifierColumnNames($this->_platform) as $columnName) {
1294 1293
                     $sqlParts[] = $tableAlias . '.' . $columnName;
1295 1294
                 }
1296
-                
1295
+
1297 1296
                 $sql .= implode(', ', $sqlParts);
1298 1297
                 break;
1299 1298
         }
1300
-        
1299
+
1301 1300
         return $sql;
1302 1301
     }
1303 1302
 
@@ -1322,22 +1321,22 @@ class SqlWalker implements TreeWalker
1322 1321
     public function walkGroupByClause($groupByClause)
1323 1322
     {
1324 1323
         $sqlParts = array();
1325
-        
1324
+
1326 1325
         foreach ($groupByClause->groupByItems AS $groupByItem) {
1327 1326
             if ( ! is_string($groupByItem)) {
1328 1327
                 $sqlParts[] = $this->walkGroupByItem($groupByItem);
1329
-                
1328
+
1330 1329
                 continue;
1331 1330
             }
1332
-            
1331
+
1333 1332
             foreach ($this->_queryComponents[$groupByItem]['metadata']->identifier AS $idField) {
1334 1333
                 $groupByItem = new AST\PathExpression(AST\PathExpression::TYPE_STATE_FIELD, $groupByItem, $idField);
1335 1334
                 $groupByItem->type = AST\PathExpression::TYPE_STATE_FIELD;
1336
-                
1335
+
1337 1336
                 $sqlParts[] = $this->walkGroupByItem($groupByItem);
1338 1337
             }
1339 1338
         }
1340
-        
1339
+
1341 1340
         return ' GROUP BY ' . implode(', ', $sqlParts);
1342 1341
     }
1343 1342
 
@@ -1363,7 +1362,7 @@ class SqlWalker implements TreeWalker
1363 1362
         $class     = $this->_em->getClassMetadata($deleteClause->abstractSchemaName);
1364 1363
         $tableName = $class->getTableName();
1365 1364
         $sql       = 'DELETE FROM ' . $class->getQuotedTableName($this->_platform);
1366
-        
1365
+
1367 1366
         $this->setSQLTableAlias($tableName, $tableName, $deleteClause->aliasIdentificationVariable);
1368 1367
         $this->_rootAliases[] = $deleteClause->aliasIdentificationVariable;
1369 1368
 
@@ -1381,7 +1380,7 @@ class SqlWalker implements TreeWalker
1381 1380
         $class     = $this->_em->getClassMetadata($updateClause->abstractSchemaName);
1382 1381
         $tableName = $class->getTableName();
1383 1382
         $sql       = 'UPDATE ' . $class->getQuotedTableName($this->_platform);
1384
-        
1383
+
1385 1384
         $this->setSQLTableAlias($tableName, $tableName, $updateClause->aliasIdentificationVariable);
1386 1385
         $this->_rootAliases[] = $updateClause->aliasIdentificationVariable;
1387 1386
 
@@ -1408,11 +1407,11 @@ class SqlWalker implements TreeWalker
1408 1407
             case ($newValue instanceof AST\Node):
1409 1408
                 $sql .= $newValue->dispatch($this);
1410 1409
                 break;
1411
-            
1410
+
1412 1411
             case ($newValue === null):
1413 1412
                 $sql .= 'NULL';
1414 1413
                 break;
1415
-            
1414
+
1416 1415
             default:
1417 1416
                 $sql .= $this->_conn->quote($newValue);
1418 1417
                 break;
@@ -1436,8 +1435,8 @@ class SqlWalker implements TreeWalker
1436 1435
 
1437 1436
         if ($condSql) {
1438 1437
             return ' WHERE ' . (( ! $discrSql) ? $condSql : '(' . $condSql . ') AND ' . $discrSql);
1439
-        } 
1440
-        
1438
+        }
1439
+
1441 1440
         if ($discrSql) {
1442 1441
             return ' WHERE ' . $discrSql;
1443 1442
         }
@@ -1458,7 +1457,7 @@ class SqlWalker implements TreeWalker
1458 1457
         if ( ! ($condExpr instanceof AST\ConditionalExpression)) {
1459 1458
             return $this->walkConditionalTerm($condExpr);
1460 1459
         }
1461
-        
1460
+
1462 1461
         return implode(' OR ', array_map(array($this, 'walkConditionalTerm'), $condExpr->conditionalTerms));
1463 1462
     }
1464 1463
 
@@ -1475,7 +1474,7 @@ class SqlWalker implements TreeWalker
1475 1474
         if ( ! ($condTerm instanceof AST\ConditionalTerm)) {
1476 1475
             return $this->walkConditionalFactor($condTerm);
1477 1476
         }
1478
-        
1477
+
1479 1478
         return implode(' AND ', array_map(array($this, 'walkConditionalFactor'), $condTerm->conditionalFactors));
1480 1479
     }
1481 1480
 
@@ -1504,8 +1503,8 @@ class SqlWalker implements TreeWalker
1504 1503
     {
1505 1504
         if ($primary->isSimpleConditionalExpression()) {
1506 1505
             return $primary->simpleConditionalExpression->dispatch($this);
1507
-        } 
1508
-        
1506
+        }
1507
+
1509 1508
         if ($primary->isConditionalExpression()) {
1510 1509
             $condExpr = $primary->conditionalExpression;
1511 1510
 
@@ -1540,12 +1539,12 @@ class SqlWalker implements TreeWalker
1540 1539
         $sql .= 'EXISTS (SELECT 1 FROM ';
1541 1540
         $entityExpr = $collMemberExpr->entityExpression;
1542 1541
         $collPathExpr = $collMemberExpr->collectionValuedPathExpression;
1543
-        
1542
+
1544 1543
         $fieldName = $collPathExpr->field;
1545 1544
         $dqlAlias = $collPathExpr->identificationVariable;
1546
-        
1545
+
1547 1546
         $class = $this->_queryComponents[$dqlAlias]['metadata'];
1548
-        
1547
+
1549 1548
         if ($entityExpr instanceof AST\InputParameter) {
1550 1549
             $dqlParamKey = $entityExpr->name;
1551 1550
             $entity = $this->_query->getParameter($dqlParamKey);
@@ -1553,41 +1552,41 @@ class SqlWalker implements TreeWalker
1553 1552
             //TODO
1554 1553
             throw new \BadMethodCallException("Not implemented");
1555 1554
         }
1556
-        
1555
+
1557 1556
         $assoc = $class->associationMappings[$fieldName];
1558
-        
1557
+
1559 1558
         if ($assoc['type'] == ClassMetadata::ONE_TO_MANY) {
1560 1559
             $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);
1561 1560
             $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name']);
1562 1561
             $sourceTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
1563
-            
1562
+
1564 1563
             $sql .= $targetClass->getQuotedTableName($this->_platform)
1565 1564
                   . ' ' . $targetTableAlias . ' WHERE ';
1566
-                    
1565
+
1567 1566
             $owningAssoc = $targetClass->associationMappings[$assoc['mappedBy']];
1568
-            
1567
+
1569 1568
             $first = true;
1570
-            
1569
+
1571 1570
             foreach ($owningAssoc['targetToSourceKeyColumns'] as $targetColumn => $sourceColumn) {
1572 1571
                 if ($first) $first = false; else $sql .= ' AND ';
1573
-                
1574
-                $sql .= $sourceTableAlias . '.' . $class->getQuotedColumnName($class->fieldNames[$targetColumn], $this->_platform) 
1575
-                      . ' = ' 
1572
+
1573
+                $sql .= $sourceTableAlias . '.' . $class->getQuotedColumnName($class->fieldNames[$targetColumn], $this->_platform)
1574
+                      . ' = '
1576 1575
                       . $targetTableAlias . '.' . $sourceColumn;
1577 1576
             }
1578
-            
1577
+
1579 1578
             $sql .= ' AND ';
1580 1579
             $first = true;
1581
-            
1580
+
1582 1581
             foreach ($targetClass->getQuotedIdentifierColumnNames($this->_platform) as $targetColumnName) {
1583 1582
                 if ($first) $first = false; else $sql .= ' AND ';
1584
-                
1583
+
1585 1584
                 $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
1586 1585
                 $sql .= $targetTableAlias . '.'  . $targetColumnName . ' = ?';
1587 1586
             }
1588 1587
         } else { // many-to-many
1589 1588
             $targetClass = $this->_em->getClassMetadata($assoc['targetEntity']);
1590
-            
1589
+
1591 1590
             $owningAssoc = $assoc['isOwningSide'] ? $assoc : $targetClass->associationMappings[$assoc['mappedBy']];
1592 1591
             $joinTable = $owningAssoc['joinTable'];
1593 1592
 
@@ -1595,13 +1594,13 @@ class SqlWalker implements TreeWalker
1595 1594
             $joinTableAlias = $this->getSQLTableAlias($joinTable['name']);
1596 1595
             $targetTableAlias = $this->getSQLTableAlias($targetClass->table['name']);
1597 1596
             $sourceTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias);
1598
-            
1597
+
1599 1598
             // join to target table
1600 1599
             $sql .= $targetClass->getQuotedJoinTableName($owningAssoc, $this->_platform)
1601 1600
                   . ' ' . $joinTableAlias . ' INNER JOIN '
1602 1601
                   . $targetClass->getQuotedTableName($this->_platform)
1603 1602
                   . ' ' . $targetTableAlias . ' ON ';
1604
-            
1603
+
1605 1604
             // join conditions
1606 1605
             $joinColumns = $assoc['isOwningSide']
1607 1606
                 ? $joinTable['inverseJoinColumns']
@@ -1627,18 +1626,18 @@ class SqlWalker implements TreeWalker
1627 1626
             foreach ($joinColumns as $joinColumn) {
1628 1627
                 if ($first) $first = false; else $sql .= ' AND ';
1629 1628
 
1630
-                $sql .= $joinTableAlias . '.' . $joinColumn['name'] . ' = ' 
1629
+                $sql .= $joinTableAlias . '.' . $joinColumn['name'] . ' = '
1631 1630
                       . $sourceTableAlias . '.' . $class->getQuotedColumnName(
1632 1631
                               $class->fieldNames[$joinColumn['referencedColumnName']],
1633 1632
                               $this->_platform);
1634 1633
             }
1635
-            
1634
+
1636 1635
             $sql .= ' AND ';
1637 1636
             $first = true;
1638
-            
1637
+
1639 1638
             foreach ($targetClass->getQuotedIdentifierColumnNames($this->_platform) as $targetColumnName) {
1640 1639
                 if ($first) $first = false; else $sql .= ' AND ';
1641
-                
1640
+
1642 1641
                 $this->_parserResult->addParameterMapping($dqlParamKey, $this->_sqlParamIndex++);
1643 1642
                 $sql .= $targetTableAlias . '.' . $targetColumnName . ' = ?';
1644 1643
             }
@@ -1646,7 +1645,7 @@ class SqlWalker implements TreeWalker
1646 1645
 
1647 1646
         return $sql . ')';
1648 1647
     }
1649
-    
1648
+
1650 1649
     /**
1651 1650
      * Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
1652 1651
      *
@@ -1693,10 +1692,10 @@ class SqlWalker implements TreeWalker
1693 1692
      */
1694 1693
     public function walkInExpression($inExpr)
1695 1694
     {
1696
-        $sql = $this->walkPathExpression($inExpr->pathExpression) 
1695
+        $sql = $this->walkPathExpression($inExpr->pathExpression)
1697 1696
              . ($inExpr->not ? ' NOT' : '') . ' IN (';
1698 1697
 
1699
-        $sql .= ($inExpr->subselect) 
1698
+        $sql .= ($inExpr->subselect)
1700 1699
             ? $this->walkSubselect($inExpr->subselect)
1701 1700
             : implode(', ', array_map(array($this, 'walkInParameter'), $inExpr->literals));
1702 1701
 
@@ -1733,11 +1732,11 @@ class SqlWalker implements TreeWalker
1733 1732
             // We need to modify the parameter value to be its correspondent mapped value
1734 1733
             $dqlParamKey = $instanceOfExpr->value->name;
1735 1734
             $paramValue  = $this->_query->getParameter($dqlParamKey);
1736
-            
1735
+
1737 1736
             if ( ! ($paramValue instanceof \Doctrine\ORM\Mapping\ClassMetadata)) {
1738 1737
                 throw QueryException::invalidParameterType('ClassMetadata', get_class($paramValue));
1739 1738
             }
1740
-            
1739
+
1741 1740
             $entityClassName = $paramValue->name;
1742 1741
         } else {
1743 1742
             // Get name from ClassMetadata to resolve aliases.
@@ -1751,7 +1750,7 @@ class SqlWalker implements TreeWalker
1751 1750
             if (!isset($discrMap[$entityClassName])) {
1752 1751
                 throw QueryException::instanceOfUnrelatedClass($entityClassName, $class->rootEntityName);
1753 1752
             }
1754
-            
1753
+
1755 1754
             $sql .= $this->_conn->quote($discrMap[$entityClassName]);
1756 1755
         }
1757 1756
 
@@ -1766,8 +1765,8 @@ class SqlWalker implements TreeWalker
1766 1765
      */
1767 1766
     public function walkInParameter($inParam)
1768 1767
     {
1769
-        return $inParam instanceof AST\InputParameter 
1770
-            ? $this->walkInputParameter($inParam) 
1768
+        return $inParam instanceof AST\InputParameter
1769
+            ? $this->walkInputParameter($inParam)
1771 1770
             : $this->walkLiteral($inParam);
1772 1771
     }
1773 1772
 
@@ -1860,14 +1859,14 @@ class SqlWalker implements TreeWalker
1860 1859
         $leftExpr  = $compExpr->leftExpression;
1861 1860
         $rightExpr = $compExpr->rightExpression;
1862 1861
         $sql       = '';
1863
-        
1864
-        $sql .= ($leftExpr instanceof AST\Node) 
1862
+
1863
+        $sql .= ($leftExpr instanceof AST\Node)
1865 1864
             ? $leftExpr->dispatch($this)
1866 1865
             : (is_numeric($leftExpr) ? $leftExpr : $this->_conn->quote($leftExpr));
1867 1866
 
1868 1867
         $sql .= ' ' . $compExpr->operator . ' ';
1869 1868
 
1870
-        $sql .= ($rightExpr instanceof AST\Node) 
1869
+        $sql .= ($rightExpr instanceof AST\Node)
1871 1870
             ? $rightExpr->dispatch($this)
1872 1871
             : (is_numeric($rightExpr) ? $rightExpr : $this->_conn->quote($rightExpr));
1873 1872
 
@@ -1911,7 +1910,7 @@ class SqlWalker implements TreeWalker
1911 1910
         if ( ! ($simpleArithmeticExpr instanceof AST\SimpleArithmeticExpression)) {
1912 1911
             return $this->walkArithmeticTerm($simpleArithmeticExpr);
1913 1912
         }
1914
-        
1913
+
1915 1914
         return implode(' ', array_map(array($this, 'walkArithmeticTerm'), $simpleArithmeticExpr->arithmeticTerms));
1916 1915
     }
1917 1916
 
@@ -1926,10 +1925,10 @@ class SqlWalker implements TreeWalker
1926 1925
         if (is_string($term)) {
1927 1926
             if (isset($this->_queryComponents[$term])) {
1928 1927
                 $columnName = $this->_queryComponents[$term]['token']['value'];
1929
-                
1928
+
1930 1929
                 return $this->_scalarResultAliasMap[$columnName];
1931 1930
             }
1932
-            
1931
+
1933 1932
             return $term;
1934 1933
         }
1935 1934
 
@@ -1938,7 +1937,7 @@ class SqlWalker implements TreeWalker
1938 1937
         if ( ! ($term instanceof AST\ArithmeticTerm)) {
1939 1938
             return $this->walkArithmeticFactor($term);
1940 1939
         }
1941
-        
1940
+
1942 1941
         return implode(' ', array_map(array($this, 'walkArithmeticFactor'), $term->arithmeticFactors));
1943 1942
     }
1944 1943
 
@@ -1953,15 +1952,15 @@ class SqlWalker implements TreeWalker
1953 1952
         if (is_string($factor)) {
1954 1953
             return $factor;
1955 1954
         }
1956
-        
1955
+
1957 1956
         // Phase 2 AST optimization: Skip processment of ArithmeticFactor
1958 1957
         // if only one ArithmeticPrimary is defined
1959 1958
         if ( ! ($factor instanceof AST\ArithmeticFactor)) {
1960 1959
             return $this->walkArithmeticPrimary($factor);
1961 1960
         }
1962
-        
1961
+
1963 1962
         $sign = $factor->isNegativeSigned() ? '-' : ($factor->isPositiveSigned() ? '+' : '');
1964
-        
1963
+
1965 1964
         return $sign . $this->walkArithmeticPrimary($factor->arithmeticPrimary);
1966 1965
     }
1967 1966
 
@@ -1975,8 +1974,8 @@ class SqlWalker implements TreeWalker
1975 1974
     {
1976 1975
         if ($primary instanceof AST\SimpleArithmeticExpression) {
1977 1976
             return '(' . $this->walkSimpleArithmeticExpression($primary) . ')';
1978
-        } 
1979
-        
1977
+        }
1978
+
1980 1979
         if ($primary instanceof AST\Node) {
1981 1980
             return $primary->dispatch($this);
1982 1981
         }

+ 9 - 1
vendor/doctrine/lib/Doctrine/ORM/Tools/EntityGenerator.php ファイルの表示

@@ -751,7 +751,7 @@ public function <methodName>()
751 751
         $this->_staticReflection[$metadata->name]['methods'][] = $methodName;
752 752
 
753 753
         $replacements = array(
754
-            '<name>'        => $this->_annotationsPrefix . $name,
754
+            '<name>'        => $this->_annotationsPrefix . ucfirst($name),
755 755
             '<methodName>'  => $methodName,
756 756
         );
757 757
 
@@ -807,6 +807,14 @@ public function <methodName>()
807 807
 
808 808
         if ($this->_generateAnnotations) {
809 809
             $lines[] = $this->_spaces . ' *';
810
+            
811
+            if (isset($associationMapping['id']) && $associationMapping['id']) {
812
+                $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'Id';
813
+            
814
+                if ($generatorType = $this->_getIdGeneratorTypeString($metadata->generatorType)) {
815
+                    $lines[] = $this->_spaces . ' * @' . $this->_annotationsPrefix . 'GeneratedValue(strategy="' . $generatorType . '")';
816
+                }
817
+            }
810 818
 
811 819
             $type = null;
812 820
             switch ($associationMapping['type']) {

+ 7 - 1
vendor/doctrine/lib/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php ファイルの表示

@@ -166,7 +166,13 @@ class YamlExporter extends AbstractExporter
166 166
                 );
167 167
 
168 168
                 $associationMappingArray = array_merge($associationMappingArray, $oneToOneMappingArray);
169
-                $array['oneToOne'][$name] = $associationMappingArray;
169
+
170
+                if ($associationMapping['type'] & ClassMetadataInfo::ONE_TO_ONE) {
171
+                    $array['oneToOne'][$name] = $associationMappingArray;
172
+                } else {
173
+                    $array['manyToOne'][$name] = $associationMappingArray;
174
+                }
175
+
170 176
             } else if ($associationMapping['type'] == ClassMetadataInfo::ONE_TO_MANY) {
171 177
                 $oneToManyMappingArray = array(
172 178
                     'mappedBy'      => $associationMapping['mappedBy'],

+ 29 - 5
vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php ファイルの表示

@@ -492,6 +492,23 @@ class UnitOfWork implements PropertyChangedListener
492 492
                             $this->collectionDeletions[] = $orgValue;
493 493
                             $changeSet[$propName] = $orgValue; // Signal changeset, to-many assocs will be ignored.
494 494
                         }
495
+
496
+                        // Persistent collection was exchanged with the "originally"
497
+                        // created one. This can only mean it was cloned and replaced
498
+                        // on another entity.
499
+                        if ($actualValue instanceof PersistentCollection) {
500
+                            $owner = $actualValue->getOwner();
501
+                            if ($owner === null) { // cloned
502
+                                $actualValue->setOwner($entity, $assoc);
503
+                            } else if ($owner !== $entity) { // no clone, we have to fix
504
+                                if (!$actualValue->isInitialized()) {
505
+                                    $actualValue->initialize(); // we have to do this otherwise the cols share state
506
+                                }
507
+                                $newValue = clone $actualValue;
508
+                                $newValue->setOwner($entity, $assoc);
509
+                                $class->reflFields[$propName]->setValue($entity, $newValue);
510
+                            }
511
+                        }
495 512
                     }
496 513
                 } else if ($isChangeTrackingNotify) {
497 514
                     continue;
@@ -511,6 +528,15 @@ class UnitOfWork implements PropertyChangedListener
511 528
             $val = $class->reflFields[$field]->getValue($entity);
512 529
             if ($val !== null) {
513 530
                 $this->computeAssociationChanges($assoc, $val);
531
+                if (!isset($this->entityChangeSets[$oid]) &&
532
+                    $assoc['isOwningSide'] &&
533
+                    $assoc['type'] == ClassMetadata::MANY_TO_MANY &&
534
+                    $val instanceof PersistentCollection &&
535
+                    $val->isDirty()) {
536
+                    $this->entityChangeSets[$oid]   = array();
537
+                    $this->originalEntityData[$oid] = $actualData;
538
+                    $this->entityUpdates[$oid]      = $entity;
539
+                }
514 540
             }
515 541
         }
516 542
     }
@@ -1170,6 +1196,8 @@ class UnitOfWork implements PropertyChangedListener
1170 1196
         $className = $classMetadata->rootEntityName;
1171 1197
         if (isset($this->identityMap[$className][$idHash])) {
1172 1198
             unset($this->identityMap[$className][$idHash]);
1199
+            unset($this->readOnlyObjects[$oid]);
1200
+
1173 1201
             //$this->entityStates[$oid] = self::STATE_DETACHED;
1174 1202
             return true;
1175 1203
         }
@@ -1453,11 +1481,6 @@ class UnitOfWork implements PropertyChangedListener
1453 1481
                     } else {
1454 1482
                         throw new EntityNotFoundException;
1455 1483
                     }
1456
-
1457
-                    $managedCopy = $this->newInstance($class);
1458
-                    $class->setIdentifierValues($managedCopy, $id);
1459
-
1460
-                    $this->persistNew($class, $managedCopy);
1461 1484
                 } else {
1462 1485
                     if ($managedCopy instanceof Proxy && ! $managedCopy->__isInitialized__) {
1463 1486
                         $managedCopy->__load();
@@ -1872,6 +1895,7 @@ class UnitOfWork implements PropertyChangedListener
1872 1895
         $this->collectionDeletions =
1873 1896
         $this->collectionUpdates =
1874 1897
         $this->extraUpdates =
1898
+        $this->readOnlyObjects =
1875 1899
         $this->orphanRemovals = array();
1876 1900
         if ($this->commitOrderCalculator !== null) {
1877 1901
             $this->commitOrderCalculator->clear();

+ 1 - 1
vendor/doctrine/lib/Doctrine/ORM/Version.php ファイルの表示

@@ -36,7 +36,7 @@ class Version
36 36
     /**
37 37
      * Current Doctrine Version
38 38
      */
39
-    const VERSION = '2.1.6';
39
+    const VERSION = '2.1.7';
40 40
 
41 41
     /**
42 42
      * Compares a Doctrine version with the current one.

+ 77 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/ManyToManyEventTest.php ファイルの表示

@@ -0,0 +1,77 @@
1
+<?php
2
+namespace Doctrine\Tests\ORM\Functional;
3
+use Doctrine\Tests\Models\CMS\CmsUser;
4
+use Doctrine\Tests\Models\CMS\CmsGroup;
5
+use Doctrine\ORM\Events;
6
+require_once __DIR__ . '/../../TestInit.php';
7
+
8
+/**
9
+ * ManyToManyEventTest
10
+ *
11
+ * @author Francisco Facioni <fran6co@gmail.com>
12
+ */
13
+class ManyToManyEventTest extends \Doctrine\Tests\OrmFunctionalTestCase
14
+{
15
+    /**
16
+     * @var PostUpdateListener
17
+     */
18
+    private $listener;
19
+
20
+    protected function setUp()
21
+    {
22
+        $this->useModelSet('cms');
23
+        parent::setUp();
24
+        $this->listener = new PostUpdateListener();
25
+        $evm = $this->_em->getEventManager();
26
+        $evm->addEventListener(Events::postUpdate, $this->listener);
27
+    }
28
+
29
+    public function testListenerShouldBeNotifiedOnlyWhenUpdating()
30
+    {
31
+        $user = $this->createNewValidUser();
32
+        $this->_em->persist($user);
33
+        $this->_em->flush();
34
+        $this->assertFalse($this->listener->wasNotified);
35
+
36
+        $group = new CmsGroup();
37
+        $group->name = "admins";
38
+        $user->addGroup($group);
39
+        $this->_em->persist($user);
40
+        $this->_em->flush();
41
+
42
+        $this->assertTrue($this->listener->wasNotified);
43
+    }
44
+
45
+    /**
46
+     * @return CmsUser
47
+     */
48
+    private function createNewValidUser()
49
+    {
50
+        $user = new CmsUser();
51
+        $user->username = 'fran6co';
52
+        $user->name = 'Francisco Facioni';
53
+        $user->status = 'foo';
54
+        $group = new CmsGroup();
55
+        $group->name = "users";
56
+        $user->addGroup($group);
57
+        return $user;
58
+    }
59
+}
60
+
61
+class PostUpdateListener
62
+{
63
+    /**
64
+     * @var bool
65
+     */
66
+    public $wasNotified = false;
67
+
68
+    /**
69
+     * @param $args
70
+     */
71
+    public function postUpdate($args)
72
+    {
73
+        $this->wasNotified = true;
74
+    }
75
+}
76
+
77
+

+ 97 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/PersistentCollectionTest.php ファイルの表示

@@ -0,0 +1,97 @@
1
+<?php
2
+
3
+namespace Doctrine\Tests\ORM\Functional;
4
+
5
+use Doctrine\Common\Persistence\PersistentObject;
6
+
7
+/**
8
+ */
9
+class PersistentCollectionTest extends \Doctrine\Tests\OrmFunctionalTestCase
10
+{
11
+    protected function setUp()
12
+    {
13
+        parent::setUp();
14
+        try {
15
+            $this->_schemaTool->createSchema(array(
16
+                $this->_em->getClassMetadata(__NAMESPACE__ . '\PersistentCollectionHolder'),
17
+                $this->_em->getClassMetadata(__NAMESPACE__ . '\PersistentCollectionContent'),
18
+            ));
19
+        } catch (\Exception $e) {
20
+        }
21
+    }
22
+
23
+    public function testPersist()
24
+    {
25
+        $collectionHolder = new PersistentCollectionHolder();
26
+        $content = new PersistentCollectionContent('first element');
27
+        $collectionHolder->addElement($content);
28
+
29
+        $this->_em->persist($collectionHolder);
30
+        $this->_em->flush();
31
+        $this->_em->clear();
32
+
33
+        $collectionHolder = $this->_em->find(__NAMESPACE__ . '\PersistentCollectionHolder', $collectionHolder->id);
34
+        $collectionHolder->getCollection();
35
+
36
+        $content = new PersistentCollectionContent('second element');
37
+        $collectionHolder->addElement($content);
38
+
39
+        $this->assertEquals(2, $collectionHolder->getCollection()->count());
40
+    }
41
+
42
+}
43
+
44
+/**
45
+ * @Entity
46
+ */
47
+class PersistentCollectionHolder
48
+{
49
+    /**
50
+     * @Id @Column(type="integer") @GeneratedValue
51
+     * @var int
52
+     */
53
+    public $id;
54
+
55
+    /**
56
+     * @var \Doctrine\Common\Collections\Collection
57
+     * @ManyToMany(targetEntity="PersistentCollectionContent", cascade={"all"})
58
+     * @JoinTable(name="pcholder_content_mm")
59
+     */
60
+    public $collection;
61
+
62
+    public function __construct()
63
+    {
64
+        $this->collection = new \Doctrine\Common\Collections\ArrayCollection();
65
+    }
66
+
67
+    /**
68
+     * @param PersistentCollectionContent $element
69
+     */
70
+    public function addElement(PersistentCollectionContent $element)
71
+    {
72
+        $this->collection->add($element);
73
+    }
74
+
75
+    /**
76
+     * @return \Doctrine\Common\Collections\Collection
77
+     */
78
+    public function getCollection()
79
+    {
80
+        return clone $this->collection;
81
+    }
82
+
83
+}
84
+
85
+/**
86
+ * @Entity
87
+ */
88
+class PersistentCollectionContent
89
+{
90
+
91
+    /**
92
+     * @Id @Column(type="integer") @GeneratedValue
93
+     * @var int
94
+     */
95
+    public $id;
96
+
97
+}

+ 23 - 5
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/ReadOnlyTest.php ファイルの表示

@@ -15,9 +15,12 @@ class ReadOnlyTest extends \Doctrine\Tests\OrmFunctionalTestCase
15 15
     {
16 16
         parent::setUp();
17 17
 
18
-        $this->_schemaTool->createSchema(array(
19
-            $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\ReadOnlyEntity'),
20
-        ));
18
+        try {
19
+            $this->_schemaTool->createSchema(array(
20
+                $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\ReadOnlyEntity'),
21
+            ));
22
+        } catch(\Exception $e) {
23
+        }
21 24
     }
22 25
 
23 26
     public function testReadOnlyEntityNeverChangeTracked()
@@ -36,6 +39,21 @@ class ReadOnlyTest extends \Doctrine\Tests\OrmFunctionalTestCase
36 39
         $this->assertEquals("Test1", $dbReadOnly->name);
37 40
         $this->assertEquals(1234, $dbReadOnly->number);
38 41
     }
42
+
43
+    /**
44
+     * @group DDC-1659
45
+     */
46
+    public function testClearReadOnly()
47
+    {
48
+        $readOnly = new ReadOnlyEntity("Test1", 1234);
49
+        $this->_em->persist($readOnly);
50
+        $this->_em->flush();
51
+        $this->_em->getUnitOfWork()->markReadOnly($readOnly);
52
+
53
+        $this->_em->clear();
54
+
55
+        $this->assertFalse($this->_em->getUnitOfWork()->isReadOnly($readOnly));
56
+    }
39 57
 }
40 58
 
41 59
 /**
@@ -50,7 +68,7 @@ class ReadOnlyEntity
50 68
     public $id;
51 69
     /** @column(type="string") */
52 70
     public $name;
53
-    /** @Column(type="integer") */
71
+    /** @Column(type="integer", name="number_col") */
54 72
     public $number;
55 73
 
56 74
     public function __construct($name, $number)
@@ -58,4 +76,4 @@ class ReadOnlyEntity
58 76
         $this->name = $name;
59 77
         $this->number = $number;
60 78
     }
61
-}
79
+}

+ 9 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php ファイルの表示

@@ -367,4 +367,13 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase
367 367
 
368 368
         $this->assertNotInstanceOf('Doctrine\ORM\Proxy\Proxy', $contract->getSalesPerson());
369 369
     }
370
+
371
+    /**
372
+     * @group DDC-1770
373
+     */
374
+    public function testTwoSingleTableInheritanceInFromClause()
375
+    {
376
+        $dql = 'SELECT f1,f2 FROM Doctrine\Tests\Models\Company\CompanyFixContract f1, Doctrine\Tests\Models\Company\CompanyFixContract f2';
377
+        $result = $this->_em->createQuery($dql)->getResult();
378
+    }
370 379
 }

+ 3 - 5
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1040Test.php ファイルの表示

@@ -44,11 +44,10 @@ class DDC1040Test extends \Doctrine\Tests\OrmFunctionalTestCase
44 44
                   ->setParameter('author', $user)
45 45
                   ->getResult();
46 46
 
47
-        $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author  AND a.text = :text";
47
+        $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = :topic AND a.user = :author AND a.user = :author";
48 48
         $farticle = $this->_em->createQuery($dql)
49 49
                   ->setParameter('author', $user)
50 50
                   ->setParameter('topic', 'This is John Galt speaking!')
51
-                  ->setParameter('text', 'Yadda Yadda!')
52 51
                   ->getSingleResult();
53 52
 
54 53
         $this->assertSame($article, $farticle);
@@ -70,14 +69,13 @@ class DDC1040Test extends \Doctrine\Tests\OrmFunctionalTestCase
70 69
         $this->_em->persist($article);
71 70
         $this->_em->flush();
72 71
 
73
-        $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3 AND a.text = ?4";
72
+        $dql = "SELECT a FROM Doctrine\Tests\Models\CMS\CmsArticle a WHERE a.topic = ?1 AND a.user = ?2 AND a.user = ?3";
74 73
         $farticle = $this->_em->createQuery($dql)
75 74
                   ->setParameter(1, 'This is John Galt speaking!')
76 75
                   ->setParameter(2, $user)
77 76
                   ->setParameter(3, $user)
78
-                  ->setParameter(4, 'Yadda Yadda!')
79 77
                   ->getSingleResult();
80 78
 
81 79
         $this->assertSame($article, $farticle);
82 80
     }
83
-}
81
+}

+ 2 - 2
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1209Test.php ファイルの表示

@@ -106,7 +106,7 @@ class DDC1209_3
106 106
 {
107 107
     /**
108 108
      * @Id
109
-     * @Column(type="datetime")
109
+     * @Column(type="datetime", name="ddc1203_date")
110 110
      */
111 111
     private $date;
112 112
 
@@ -122,4 +122,4 @@ class DateTime2 extends \DateTime
122 122
     {
123 123
         return $this->format('Y');
124 124
     }
125
-}
125
+}

+ 23 - 21
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1228Test.php ファイルの表示

@@ -21,58 +21,60 @@ class DDC1228Test extends \Doctrine\Tests\OrmFunctionalTestCase
21 21
                 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1228User'),
22 22
                 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1228Profile'),
23 23
             ));
24
-        } catch(\PDOException $e) {
25
-            
24
+        } catch(\Exception $e) {
25
+
26 26
         }
27 27
     }
28
-    
28
+
29 29
     public function testOneToOnePersist()
30 30
     {
31 31
         $user = new DDC1228User;
32
+        $user->name = "Foo";
32 33
         $profile = new DDC1228Profile();
33 34
         $profile->name = "Foo";
34 35
         $user->profile = $profile;
35
-        
36
+
36 37
         $this->_em->persist($user);
37 38
         $this->_em->persist($profile);
38 39
         $this->_em->flush();
39 40
         $this->_em->clear();
40
-        
41
+
41 42
         $user = $this->_em->find(__NAMESPACE__ . '\\DDC1228User', $user->id);
42
-        
43
+
43 44
         $this->assertFalse($user->getProfile()->__isInitialized__, "Proxy is not initialized");
44 45
         $user->getProfile()->setName("Bar");
45 46
         $this->assertTrue($user->getProfile()->__isInitialized__, "Proxy is not initialized");
46
-        
47
+
47 48
         $this->assertEquals("Bar", $user->getProfile()->getName());
48 49
         $this->assertEquals(array("id" => 1, "name" => "Foo"), $this->_em->getUnitOfWork()->getOriginalEntityData($user->getProfile()));
49
-        
50
+
50 51
         $this->_em->flush();
51 52
         $this->_em->clear();
52
-        
53
+
53 54
         $user = $this->_em->find(__NAMESPACE__ . '\\DDC1228User', $user->id);
54 55
         $this->assertEquals("Bar", $user->getProfile()->getName());
55 56
     }
56
-    
57
+
57 58
     public function testRefresh()
58 59
     {
59 60
         $user = new DDC1228User;
61
+        $user->name = "Foo";
60 62
         $profile = new DDC1228Profile();
61 63
         $profile->name = "Foo";
62 64
         $user->profile = $profile;
63
-        
65
+
64 66
         $this->_em->persist($user);
65 67
         $this->_em->persist($profile);
66 68
         $this->_em->flush();
67 69
         $this->_em->clear();
68
-        
70
+
69 71
         $user = $this->_em->getReference(__NAMESPACE__ . '\\DDC1228User', $user->id);
70
-        
72
+
71 73
         $this->_em->refresh($user);
72 74
         $user->name = "Baz";
73 75
         $this->_em->flush();
74 76
         $this->_em->clear();
75
-        
77
+
76 78
         $user = $this->_em->find(__NAMESPACE__ . '\\DDC1228User', $user->id);
77 79
         $this->assertEquals("Baz", $user->name);
78 80
     }
@@ -88,20 +90,20 @@ class DDC1228User
88 90
      * @var int
89 91
      */
90 92
     public $id;
91
-    
93
+
92 94
     /**
93 95
      * @column(type="string")
94 96
      * @var string
95 97
      */
96 98
     public $name = '';
97
-    
99
+
98 100
     /**
99 101
      * @OneToOne(targetEntity="DDC1228Profile")
100 102
      * @var Profile
101 103
      */
102 104
     public $profile;
103
-    
104
-    public function getProfile()   
105
+
106
+    public function getProfile()
105 107
     {
106 108
         return $this->profile;
107 109
     }
@@ -117,13 +119,13 @@ class DDC1228Profile
117 119
      * @var int
118 120
      */
119 121
     public $id;
120
-    
122
+
121 123
     /**
122 124
      * @column(type="string")
123 125
      * @var string
124 126
      */
125 127
     public $name;
126
-    
128
+
127 129
     public function getName()
128 130
     {
129 131
         return $this->name;
@@ -133,4 +135,4 @@ class DDC1228Profile
133 135
     {
134 136
         $this->name = $name;
135 137
     }
136
-}
138
+}

+ 16 - 16
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1238Test.php ファイルの表示

@@ -19,47 +19,47 @@ class DDC1238Test extends \Doctrine\Tests\OrmFunctionalTestCase
19 19
             $this->_schemaTool->createSchema(array(
20 20
                 $this->_em->getClassMetadata(__NAMESPACE__ . '\\DDC1238User'),
21 21
             ));
22
-        } catch(\PDOException $e) {
23
-            
22
+        } catch(\Exception $e) {
23
+
24 24
         }
25 25
     }
26
-    
26
+
27 27
     public function testIssue()
28 28
     {
29 29
         $user = new DDC1238User;
30 30
         $user->setName("test");
31
-        
31
+
32 32
         $this->_em->persist($user);
33 33
         $this->_em->flush();
34 34
         $this->_em->clear();
35
-        
35
+
36 36
         $userId = $user->getId();
37 37
         $this->_em->clear();
38
-        
38
+
39 39
         $user = $this->_em->getReference(__NAMESPACE__ . '\\DDC1238User', $userId);
40 40
         $this->_em->clear();
41
-        
41
+
42 42
         $userId2 = $user->getId();
43 43
         $this->assertEquals($userId, $userId2, "This proxy can still be initialized.");
44 44
     }
45
-    
45
+
46 46
     public function testIssueProxyClear()
47 47
     {
48 48
         $user = new DDC1238User;
49 49
         $user->setName("test");
50
-        
50
+
51 51
         $this->_em->persist($user);
52 52
         $this->_em->flush();
53 53
         $this->_em->clear();
54
-        
54
+
55 55
         $userId = $user->getId();
56 56
         $this->_em->clear();
57
-        
57
+
58 58
         $user = $this->_em->getReference(__NAMESPACE__ . '\\DDC1238User', $userId);
59 59
         $this->_em->clear();
60
-        
60
+
61 61
         $user2 = $this->_em->getReference(__NAMESPACE__ . '\\DDC1238User', $userId);
62
-        
62
+
63 63
         $this->assertNull($user->getId(), "Now this is null, we already have a user instance of that type");
64 64
     }
65 65
 }
@@ -71,18 +71,18 @@ class DDC1238User
71 71
 {
72 72
     /** @Id @GeneratedValue @Column(type="integer") */
73 73
     private $id;
74
-    
74
+
75 75
     /**
76 76
      * @Column
77 77
      * @var string
78 78
      */
79 79
     private $name;
80
-    
80
+
81 81
     public function getId()
82 82
     {
83 83
         return $this->id;
84 84
     }
85
-    
85
+
86 86
     public function getName()
87 87
     {
88 88
         return $this->name;

+ 3 - 1
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1514Test.php ファイルの表示

@@ -57,6 +57,8 @@ class DDC1514Test extends \Doctrine\Tests\OrmFunctionalTestCase
57 57
         $dql = "SELECT a, b, ba, c FROM " . __NAMESPACE__ . "\DDC1514EntityA AS a LEFT JOIN a.entitiesB AS b LEFT JOIN b.entityATo AS ba LEFT JOIN a.entityC AS c";
58 58
         $results = $this->_em->createQuery($dql)->getResult();
59 59
 
60
+        $this->assertInstanceOf(__NAMESPACE__ . "\DDC1514EntityA", $results[1]);
61
+        $this->assertInstanceOf(__NAMESPACE__ . "\DDC1514EntityC", $results[1]->entityC);
60 62
         $this->assertEquals($c->title, $results[1]->entityC->title);
61 63
     }
62 64
 }
@@ -74,7 +76,7 @@ class DDC1514EntityA
74 76
     public $entitiesB;
75 77
     /** @ManyToOne(targetEntity="DDC1514EntityC") */
76 78
     public $entityC;
77
-    
79
+
78 80
     public function __construct()
79 81
     {
80 82
         $this->entitiesB = new ArrayCollection();

+ 121 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1643Test.php ファイルの表示

@@ -0,0 +1,121 @@
1
+<?php
2
+namespace Doctrine\Tests\ORM\Functional\Ticket;
3
+
4
+use Doctrine\Tests\Models\CMS\CmsUser;
5
+use Doctrine\Tests\Models\CMS\CmsGroup;
6
+
7
+/**
8
+ * @group DDC-1643
9
+ */
10
+class DDC1643Test extends \Doctrine\Tests\OrmFunctionalTestCase
11
+{
12
+    private $user1;
13
+    private $user2;
14
+
15
+    public function setUp()
16
+    {
17
+        $this->useModelSet('cms');
18
+        parent::setUp();
19
+
20
+        $user1 = new CmsUser();
21
+        $user1->username = "beberlei";
22
+        $user1->name = "Benjamin";
23
+        $user1->status = "active";
24
+        $group1 = new CmsGroup();
25
+        $group1->name = "test";
26
+        $group2 = new CmsGroup();
27
+        $group2->name = "test";
28
+        $user1->addGroup($group1);
29
+        $user1->addGroup($group2);
30
+        $user2 = new CmsUser();
31
+        $user2->username = "romanb";
32
+        $user2->name = "Roman";
33
+        $user2->status = "active";
34
+
35
+        $this->_em->persist($user1);
36
+        $this->_em->persist($user2);
37
+        $this->_em->persist($group1);
38
+        $this->_em->persist($group2);
39
+        $this->_em->flush();
40
+        $this->_em->clear();
41
+
42
+        $this->user1 = $this->_em->find(get_class($user1), $user1->id);
43
+        $this->user2 = $this->_em->find(get_class($user1), $user2->id);
44
+    }
45
+
46
+    public function testClonePersistentCollectionAndReuse()
47
+    {
48
+        $user1 = $this->user1;
49
+
50
+        $user1->groups = clone $user1->groups;
51
+
52
+        $this->_em->flush();
53
+        $this->_em->clear();
54
+
55
+        $user1 = $this->_em->find(get_class($user1), $user1->id);
56
+
57
+        $this->assertEquals(2, count($user1->groups));
58
+    }
59
+
60
+    public function testClonePersistentCollectionAndShare()
61
+    {
62
+        $user1 = $this->user1;
63
+        $user2 = $this->user2;
64
+
65
+        $user2->groups = clone $user1->groups;
66
+
67
+        $this->_em->flush();
68
+        $this->_em->clear();
69
+
70
+        $user1 = $this->_em->find(get_class($user1), $user1->id);
71
+        $user2 = $this->_em->find(get_class($user1), $user2->id);
72
+
73
+        $this->assertEquals(2, count($user1->groups));
74
+        $this->assertEquals(2, count($user2->groups));
75
+    }
76
+
77
+    public function testCloneThenDirtyPersistentCollection()
78
+    {
79
+        $user1 = $this->user1;
80
+        $user2 = $this->user2;
81
+
82
+        $group3 = new CmsGroup();
83
+        $group3->name = "test";
84
+        $user2->groups = clone $user1->groups;
85
+        $user2->groups->add($group3);
86
+
87
+        $this->_em->persist($group3);
88
+        $this->_em->flush();
89
+        $this->_em->clear();
90
+
91
+        $user1 = $this->_em->find(get_class($user1), $user1->id);
92
+        $user2 = $this->_em->find(get_class($user1), $user2->id);
93
+
94
+        $this->assertEquals(3, count($user2->groups));
95
+        $this->assertEquals(2, count($user1->groups));
96
+    }
97
+
98
+    public function testNotCloneAndPassAroundFlush()
99
+    {
100
+        $user1 = $this->user1;
101
+        $user2 = $this->user2;
102
+
103
+        $group3 = new CmsGroup();
104
+        $group3->name = "test";
105
+        $user2->groups = $user1->groups;
106
+        $user2->groups->add($group3);
107
+
108
+        $this->assertEQuals(1, count($user1->groups->getInsertDiff()));
109
+
110
+        $this->_em->persist($group3);
111
+        $this->_em->flush();
112
+        $this->_em->clear();
113
+
114
+        $user1 = $this->_em->find(get_class($user1), $user1->id);
115
+        $user2 = $this->_em->find(get_class($user1), $user2->id);
116
+
117
+        $this->assertEquals(3, count($user2->groups));
118
+        $this->assertEquals(3, count($user1->groups));
119
+    }
120
+}
121
+

+ 158 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC1695Test.php ファイルの表示

@@ -0,0 +1,158 @@
1
+<?php
2
+
3
+namespace Doctrine\Tests\ORM\Functional\Ticket;
4
+
5
+/**
6
+ * @group DDC-1695
7
+ */
8
+class DDC1695Test extends \Doctrine\Tests\OrmFunctionalTestCase
9
+{
10
+    public function testIssue()
11
+    {
12
+        if ($this->_em->getConnection()->getDatabasePlatform()->getName() != "sqlite") {
13
+            $this->markTestSkipped("Only with sqlite");
14
+        }
15
+        $dql = "SELECT n.smallText, n.publishDate FROM " . __NAMESPACE__ . "\\DDC1695News n";
16
+        $sql = $this->_em->createQuery($dql)->getSQL();
17
+
18
+        $this->assertEquals(
19
+            'SELECT d0_."SmallText" AS SmallText0, d0_."PublishDate" AS PublishDate1 FROM "DDC1695News" d0_',
20
+            $sql
21
+        );
22
+    }
23
+}
24
+
25
+/**
26
+ * @Table(name="`DDC1695News`")
27
+ * @Entity
28
+ */
29
+class DDC1695News
30
+{
31
+    /**
32
+     * @var integer $idNews
33
+     *
34
+     * @Column(name="`IdNews`", type="integer", nullable=false)
35
+     * @Id
36
+     * @GeneratedValue
37
+     */
38
+    private $idNews;
39
+
40
+    /**
41
+     * @var bigint $iduser
42
+     *
43
+     * @Column(name="`IdUser`", type="bigint", nullable=false)
44
+     */
45
+    private $idUser;
46
+
47
+    /**
48
+     * @var integer $idLanguage
49
+     *
50
+     * @Column(name="`IdLanguage`", type="integer", nullable=false)
51
+     */
52
+    private $idLanguage;
53
+
54
+    /**
55
+     * @var integer $idCondition
56
+     *
57
+     * @Column(name="`IdCondition`", type="integer", nullable=true)
58
+     */
59
+    private $idCondition;
60
+
61
+    /**
62
+     * @var integer $idHealthProvider
63
+     *
64
+     * @Column(name="`IdHealthProvider`", type="integer", nullable=true)
65
+     */
66
+    private $idHealthProvider;
67
+
68
+    /**
69
+     * @var integer $idSpeciality
70
+     *
71
+     * @Column(name="`IdSpeciality`", type="integer", nullable=true)
72
+     */
73
+    private $idSpeciality;
74
+
75
+    /**
76
+     * @var integer $idMedicineType
77
+     *
78
+     * @Column(name="`IdMedicineType`", type="integer", nullable=true)
79
+     */
80
+    private $idMedicineType;
81
+
82
+    /**
83
+     * @var integer $idTreatment
84
+     *
85
+     * @Column(name="`IdTreatment`", type="integer", nullable=true)
86
+     */
87
+    private $idTreatment;
88
+
89
+    /**
90
+     * @var string $title
91
+     *
92
+     * @Column(name="`Title`", type="string", nullable=true)
93
+     */
94
+    private $title;
95
+
96
+    /**
97
+     * @var string $smallText
98
+     *
99
+     * @Column(name="`SmallText`", type="string", nullable=true)
100
+     */
101
+    private $smallText;
102
+
103
+    /**
104
+     * @var string $longText
105
+     *
106
+     * @Column(name="`LongText`", type="string", nullable=true)
107
+     */
108
+    private $longText;
109
+
110
+    /**
111
+     * @var datetimetz $publishDate
112
+     *
113
+     * @Column(name="`PublishDate`", type="datetimetz", nullable=true)
114
+     */
115
+    private $publishDate;
116
+
117
+    /**
118
+     * @var tsvector $idxNews
119
+     *
120
+     * @Column(name="`IdxNews`", type="tsvector", nullable=true)
121
+     */
122
+    private $idxNews;
123
+
124
+    /**
125
+     * @var boolean $highlight
126
+     *
127
+     * @Column(name="`Highlight`", type="boolean", nullable=false)
128
+     */
129
+    private $highlight;
130
+
131
+    /**
132
+     * @var integer $order
133
+     *
134
+     * @Column(name="`Order`", type="integer", nullable=false)
135
+     */
136
+    private $order;
137
+
138
+    /**
139
+     * @var boolean $deleted
140
+     *
141
+     * @Column(name="`Deleted`", type="boolean", nullable=false)
142
+     */
143
+    private $deleted;
144
+
145
+    /**
146
+     * @var boolean $active
147
+     *
148
+     * @Column(name="`Active`", type="boolean", nullable=false)
149
+     */
150
+    private $active;
151
+
152
+    /**
153
+     * @var boolean $updateToHighlighted
154
+     *
155
+     * @Column(name="`UpdateToHighlighted`", type="boolean", nullable=true)
156
+     */
157
+    private $updateToHighlighted;
158
+}

+ 10 - 1
vendor/doctrine/tests/Doctrine/Tests/ORM/Query/ExprTest.php ファイルの表示

@@ -336,4 +336,13 @@ class ExprTest extends \Doctrine\Tests\OrmTestCase
336 336
         $orExpr = $this->_expr->orx();
337 337
         $orExpr->add($this->_expr->quot(5, 2));
338 338
     }
339
-}
339
+
340
+    /**
341
+     * @group DDC-1683
342
+     */
343
+    public function testBooleanLiteral()
344
+    {
345
+        $this->assertEquals('true', $this->_expr->literal(true));
346
+        $this->assertEquals('false', $this->_expr->literal(false));
347
+    }
348
+}

+ 15 - 7
vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php ファイルの表示

@@ -68,10 +68,10 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
68 68
     protected function _createMetadataDriver($type, $path)
69 69
     {
70 70
         $mappingDriver = array(
71
-            'php' => 'PHPDriver',
71
+            'php'        => 'PHPDriver',
72 72
             'annotation' => 'AnnotationDriver',
73
-            'xml' => 'XmlDriver',
74
-            'yaml' => 'YamlDriver',
73
+            'xml'        => 'XmlDriver',
74
+            'yaml'       => 'YamlDriver',
75 75
         );
76 76
         $this->assertArrayHasKey($type, $mappingDriver, "There is no metadata driver for the type '" . $type . "'.");
77 77
         $driverName = $mappingDriver[$type];
@@ -185,7 +185,7 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
185 185
      * @depends testIdentifierIsExported
186 186
      * @param ClassMetadataInfo $class
187 187
      */
188
-    public function testFieldsAreExpored($class)
188
+    public function testFieldsAreExported($class)
189 189
     {
190 190
         $this->assertTrue(isset($class->fieldMappings['id']['id']) && $class->fieldMappings['id']['id'] === true);
191 191
         $this->assertEquals('id', $class->fieldMappings['id']['fieldName']);
@@ -206,13 +206,12 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
206 206
     }
207 207
 
208 208
     /**
209
-     * @depends testFieldsAreExpored
209
+     * @depends testFieldsAreExported
210 210
      * @param ClassMetadataInfo $class
211 211
      */
212 212
     public function testOneToOneAssociationsAreExported($class)
213 213
     {
214 214
         $this->assertTrue(isset($class->associationMappings['address']));
215
-        //$this->assertTrue($class->associationMappings['address'] instanceof \Doctrine\ORM\Mapping\OneToOneMapping);
216 215
         $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Address', $class->associationMappings['address']['targetEntity']);
217 216
         $this->assertEquals('address_id', $class->associationMappings['address']['joinColumns'][0]['name']);
218 217
         $this->assertEquals('id', $class->associationMappings['address']['joinColumns'][0]['referencedColumnName']);
@@ -229,6 +228,15 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
229 228
     }
230 229
 
231 230
     /**
231
+     * @depends testFieldsAreExported
232
+     */
233
+    public function testManyToOneAssociationsAreExported($class)
234
+    {
235
+        $this->assertTrue(isset($class->associationMappings['mainGroup']));
236
+        $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Group', $class->associationMappings['mainGroup']['targetEntity']);
237
+    }
238
+
239
+    /**
232 240
      * @depends testOneToOneAssociationsAreExported
233 241
      * @param ClassMetadataInfo $class
234 242
      */
@@ -338,4 +346,4 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest
338 346
             return rmdir($path);
339 347
         }
340 348
     }
341
-}
349
+}

+ 5 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/annotation/Doctrine.Tests.ORM.Tools.Export.User.php ファイルの表示

@@ -29,6 +29,11 @@ class User
29 29
     public $address;
30 30
 
31 31
     /**
32
+     * @ManyToOne(targetEntity="Doctrine\Tests\ORM\Tools\Export\Group")
33
+     */
34
+    public $mainGroup;
35
+
36
+    /**
32 37
      *
33 38
      * @OneToMany(targetEntity="Doctrine\Tests\ORM\Tools\Export\Phonenumber", mappedBy="user", cascade={"persist", "merge"}, orphanRemoval=true)
34 39
      * @OrderBy({"number"="ASC"})

+ 5 - 1
vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/php/Doctrine.Tests.ORM.Tools.Export.User.php ファイルの表示

@@ -31,6 +31,10 @@ $metadata->mapField(array(
31 31
    'columnDefinition' => 'CHAR(32) NOT NULL',
32 32
   ));
33 33
 $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO);
34
+$metadata->mapManyToOne(array(
35
+    'fieldName' => 'mainGroup',
36
+    'targetEntity' => 'Doctrine\\Tests\\ORM\Tools\\Export\\Group',
37
+));
34 38
 $metadata->mapOneToOne(array(
35 39
    'fieldName' => 'address',
36 40
    'targetEntity' => 'Doctrine\\Tests\\ORM\\Tools\\Export\\Address',
@@ -103,4 +107,4 @@ $metadata->mapManyToMany(array(
103 107
    ),
104 108
    ),
105 109
    'orderBy' => NULL,
106
-  ));
110
+  ));

+ 19 - 7
vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/xml/Doctrine.Tests.ORM.Tools.Export.User.dcm.xml ファイルの表示

@@ -4,9 +4,9 @@
4 4
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 5
       xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
6 6
                           http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
7
-                              
7
+
8 8
     <entity name="Doctrine\Tests\ORM\Tools\Export\User" table="cms_users">
9
-        
9
+
10 10
         <lifecycle-callbacks>
11 11
             <lifecycle-callback type="prePersist" method="doStuffOnPrePersist"/>
12 12
             <lifecycle-callback type="prePersist" method="doOtherStuffOnPrePersistToo"/>
@@ -16,15 +16,17 @@
16 16
         <id name="id" type="integer" column="id">
17 17
             <generator strategy="AUTO"/>
18 18
         </id>
19
-        
19
+
20 20
         <field name="name" column="name" type="string" length="50" nullable="true" unique="true" />
21 21
         <field name="email" column="user_email" type="string" column-definition="CHAR(32) NOT NULL" />
22
-        
22
+
23 23
         <one-to-one field="address" target-entity="Doctrine\Tests\ORM\Tools\Export\Address" inversed-by="user" orphan-removal="true">
24 24
             <cascade><cascade-persist /></cascade>
25 25
             <join-column name="address_id" referenced-column-name="id" on-delete="CASCADE" on-update="CASCADE"/>
26 26
         </one-to-one>
27
-        
27
+
28
+        <many-to-one field="mainGroup" target-entity="Doctrine\Tests\ORM\Tools\Export\Group" />
29
+
28 30
         <one-to-many field="phonenumbers" target-entity="Doctrine\Tests\ORM\Tools\Export\Phonenumber" mapped-by="user" orphan-removal="true">
29 31
             <cascade>
30 32
                 <cascade-persist/>
@@ -34,7 +36,17 @@
34 36
                 <order-by-field name="number" direction="ASC" />
35 37
             </order-by>
36 38
         </one-to-many>
37
-        
39
+
40
+        <one-to-many field="interests" target-entity="Doctrine\Tests\ORM\Tools\Export\Interests" mapped-by="user" orphan-removal="true">
41
+            <cascade>
42
+                <cascade-refresh/>
43
+                <cascade-persist/>
44
+                <cascade-merge/>
45
+                <cascade-detach/>
46
+                <cascade-remove/>
47
+            </cascade>
48
+        </one-to-many>
49
+
38 50
         <many-to-many field="groups" target-entity="Doctrine\Tests\ORM\Tools\Export\Group">
39 51
             <cascade>
40 52
                 <cascade-all/>
@@ -48,7 +60,7 @@
48 60
                 </inverse-join-columns>
49 61
             </join-table>
50 62
         </many-to-many>
51
-        
63
+
52 64
     </entity>
53 65
 
54 66
 </doctrine-mapping>

+ 3 - 0
vendor/doctrine/tests/Doctrine/Tests/ORM/Tools/Export/yaml/Doctrine.Tests.ORM.Tools.Export.User.dcm.yml ファイルの表示

@@ -27,6 +27,9 @@ Doctrine\Tests\ORM\Tools\Export\User:
27 27
       cascade: [ remove, persist ]
28 28
       inversedBy: user
29 29
       orphanRemoval: true
30
+  manyToOne:
31
+    mainGroup:
32
+      targetEntity: Doctrine\Tests\ORM\Tools\Export\Group
30 33
   oneToMany:
31 34
     phonenumbers:
32 35
       targetEntity: Doctrine\Tests\ORM\Tools\Export\Phonenumber

+ 14 - 14
vendor/doctrine/tests/Doctrine/Tests/OrmFunctionalTestCase.php ファイルの表示

@@ -16,7 +16,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
16 16
 
17 17
     /* Shared connection when a TestCase is run alone (outside of it's functional suite) */
18 18
     protected static $_sharedConn;
19
-    
19
+
20 20
     /**
21 21
      * @var \Doctrine\ORM\EntityManager
22 22
      */
@@ -117,7 +117,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
117 117
     {
118 118
         $this->_usedModelSets[$setName] = true;
119 119
     }
120
-    
120
+
121 121
     /**
122 122
      * Sweeps the database tables and clears the EntityManager.
123 123
      */
@@ -228,10 +228,10 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
228 228
     protected function setUp()
229 229
     {
230 230
         $forceCreateTables = false;
231
-        
231
+
232 232
         if ( ! isset(static::$_sharedConn)) {
233 233
             static::$_sharedConn = TestUtil::getConnection();
234
-            
234
+
235 235
             if (static::$_sharedConn->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) {
236 236
                 $forceCreateTables = true;
237 237
             }
@@ -244,24 +244,24 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
244 244
                 static::$_sharedConn->executeQuery('SELECT 1 /*' . get_class($this) . '*/ FROM dual');
245 245
             }
246 246
         }
247
-        
247
+
248 248
         if ( ! $this->_em) {
249 249
             $this->_em = $this->_getEntityManager();
250 250
             $this->_schemaTool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
251 251
         }
252 252
 
253 253
         $classes = array();
254
-        
254
+
255 255
         foreach ($this->_usedModelSets as $setName => $bool) {
256 256
             if ( ! isset(static::$_tablesCreated[$setName])/* || $forceCreateTables*/) {
257 257
                 foreach (static::$_modelSets[$setName] as $className) {
258 258
                     $classes[] = $this->_em->getClassMetadata($className);
259 259
                 }
260
-                
260
+
261 261
                 static::$_tablesCreated[$setName] = true;
262 262
             }
263 263
         }
264
-        
264
+
265 265
         if ($classes) {
266 266
             $this->_schemaTool->createSchema($classes);
267 267
         }
@@ -290,7 +290,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
290 290
 
291 291
         $this->_sqlLoggerStack = new \Doctrine\DBAL\Logging\DebugStack();
292 292
         $this->_sqlLoggerStack->enabled = false;
293
-        
293
+
294 294
         //FIXME: two different configs! $conn and the created entity manager have
295 295
         // different configs.
296 296
         $config = new \Doctrine\ORM\Configuration();
@@ -300,7 +300,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
300 300
         $config->setProxyNamespace('Doctrine\Tests\Proxies');
301 301
 
302 302
         $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver());
303
-        
303
+
304 304
         $conn = static::$_sharedConn;
305 305
         $conn->getConfiguration()->setSQLLogger($this->_sqlLoggerStack);
306 306
 
@@ -311,14 +311,14 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
311 311
                 $evm->removeEventListener(array($event), $listener);
312 312
             }
313 313
         }
314
-        
314
+
315 315
         if (isset($GLOBALS['db_event_subscribers'])) {
316 316
             foreach (explode(",", $GLOBALS['db_event_subscribers']) AS $subscriberClass) {
317 317
                 $subscriberInstance = new $subscriberClass();
318 318
                 $evm->addEventSubscriber($subscriberInstance);
319 319
             }
320 320
         }
321
-        
321
+
322 322
         return \Doctrine\ORM\EntityManager::create($conn, $config);
323 323
     }
324 324
 
@@ -335,7 +335,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
335 335
                 $params = array_map(function($p) { if (is_object($p)) return get_class($p); else return "'".$p."'"; }, $query['params'] ?: array());
336 336
                 $queries .= ($i+1).". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL;
337 337
             }
338
-            
338
+
339 339
             $trace = $e->getTrace();
340 340
             $traceMsg = "";
341 341
             foreach($trace AS $part) {
@@ -358,7 +358,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase
358 358
 
359 359
     /**
360 360
      * Using the SQL Logger Stack this method retrieves the current query count executed in this test.
361
-     * 
361
+     *
362 362
      * @return int
363 363
      */
364 364
     protected function getCurrentQueryCount()

+ 26 - 1
vendor/swiftmailer/CHANGES ファイルの表示

@@ -1,6 +1,31 @@
1
-Changelog since Version 4.1.x
1
+Changelog since Version 4.x.x
2 2
 =============================
3 3
 
4
+4.2.1 (2012-07-13)
5
+------------------
6
+
7
+ * changed the coding standards to PSR-1/2
8
+ * fixed issue with autoloading
9
+ * added NativeQpContentEncoder to enhance performance (for PHP 5.3+)
10
+
11
+4.2.0 (2012-06-29)
12
+------------------
13
+
14
+ * added documentation about how to use the Japanese support introduced in 4.1.8
15
+ * added a way to override the default configuration in a lazy way
16
+ * changed the PEAR init script to lazy-load the initialization
17
+ * fixed a bug when calling Swift_Preferences before anything else (regression introduced in 4.1.8)
18
+
19
+4.1.8 (2012-06-17)
20
+------------------
21
+
22
+ * added Japanese iso-2022-jp support
23
+ * changed the init script to lazy-load the initialization
24
+ * fixed docblocks (@id) which caused some problems with libraries parsing the dobclocks
25
+ * fixed Swift_Mime_Headers_IdentificationHeader::setId() when passed an array of ids
26
+ * fixed encoding of email addresses in headers
27
+ * added replacements setter to the Decorator plugin
28
+
4 29
 4.1.7 (2012-04-26)
5 30
 ------------------
6 31
 

+ 0 - 0
vendor/swiftmailer/README ファイルの表示


Some files were not shown because too many files changed in this diff