Browse Source

uppgrade to dev version (2013-02-18) and add admin generator bundl

Sevajol Bastien 11 years ago
parent
commit
042ee0f750
100 changed files with 10390 additions and 1480 deletions
  1. 49 34
      app/SymfonyRequirements.php
  2. 8 6
      app/bootstrap.php.cache
  3. 4 2
      composer.json
  4. 404 81
      composer.lock
  5. 1 1
      vendor/autoload.php
  6. 1 0
      vendor/cedriclombardot/admingenerator-generator-bundle/Admingenerator/GeneratorBundle
  7. 1 0
      vendor/cedriclombardot/twig-generator
  8. 6 0
      vendor/composer/autoload_namespaces.php
  9. 3 3
      vendor/composer/autoload_real.php
  10. 1118 784
      vendor/composer/installed.json
  11. 1 1
      vendor/doctrine/common/lib/Doctrine/Common/Version.php
  12. 1 1
      vendor/doctrine/dbal/composer.json
  13. 2 2
      vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php
  14. 35 18
      vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php
  15. 1 1
      vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php
  16. 1 1
      vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php
  17. 8 0
      vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php
  18. 5 1
      vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/.travis.yml
  19. 1 1
      vendor/doctrine/orm/composer.json
  20. 66 0
      vendor/doctrine/orm/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php
  21. 9 5
      vendor/doctrine/orm/lib/Doctrine/ORM/Id/IdentityGenerator.php
  22. 18 12
      vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php
  23. 40 17
      vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php
  24. 1 1
      vendor/doctrine/orm/lib/Doctrine/ORM/Version.php
  25. 18 0
      vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php
  26. 71 0
      vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php
  27. 10 12
      vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php
  28. 69 0
      vendor/gedmo/doctrine-extensions/doc/blameable.md
  29. 141 0
      vendor/gedmo/doctrine-extensions/doc/reference_integrity.md
  30. 1 1
      vendor/gedmo/doctrine-extensions/lib/Gedmo/DoctrineExtensions.php
  31. 17 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Exception/ReferenceIntegrityStrictException.php
  32. 19 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceIntegrity.php
  33. 80 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Driver/Annotation.php
  34. 85 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Driver/Yaml.php
  35. 38 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Validator.php
  36. 50 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/ReferenceIntegrity.php
  37. 133 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/ReferenceIntegrityListener.php
  38. 2 2
      vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableDocument.php
  39. 2 2
      vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableEntity.php
  40. 1 1
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php
  41. 1 1
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/Mapping/Driver/Annotation.php
  42. 2 2
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/Traits/TimestampableEntity.php
  43. 67 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Article.php
  44. 100 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php
  45. 67 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Article.php
  46. 100 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php
  47. 67 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Article.php
  48. 90 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php
  49. 67 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Article.php
  50. 90 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php
  51. 195 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/ReferenceIntegrityDocumentTest.php
  52. 1 0
      vendor/gedmo/doctrine-extensions/tests/bootstrap.php
  53. 3 0
      vendor/gedmo/doctrine-extensions/tests/phpunit.xml.dist
  54. 86 14
      vendor/jdorn/sql-formatter/README.md
  55. BIN
      vendor/jdorn/sql-formatter/examples/SqlFormatterExample.png
  56. 14 0
      vendor/jdorn/sql-formatter/examples/examples.php
  57. 403 321
      vendor/jdorn/sql-formatter/lib/SqlFormatter.php
  58. 4365 0
      vendor/jdorn/sql-formatter/tests/expected.html
  59. 19 19
      vendor/jdorn/sql-formatter/tests/performance.php
  60. 23 0
      vendor/jdorn/sql-formatter/tests/regression.php
  61. 1783 61
      vendor/jdorn/sql-formatter/tests/sql.sql
  62. 1 1
      vendor/jms/security-extra-bundle/JMS/SecurityExtraBundle/JMSSecurityExtraBundle.php
  63. 1 0
      vendor/knplabs/knp-menu
  64. 1 0
      vendor/knplabs/knp-menu-bundle/Knp/Bundle/MenuBundle
  65. 1 0
      vendor/pagerfanta/pagerfanta
  66. 2 2
      vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/DoctrineStep.php
  67. 1 1
      vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/SecretStep.php
  68. 7 7
      vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/StepInterface.php
  69. 0 1
      vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/config/webconfigurator.xml
  70. 49 34
      vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php
  71. 1 1
      vendor/symfony/monolog-bundle/Symfony/Bundle/MonologBundle/composer.json
  72. 3 0
      vendor/symfony/symfony/README.md
  73. 1 1
      vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php
  74. 3 1
      vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php
  75. 0 3
      vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php
  76. 4 0
      vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php
  77. 4 2
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php
  78. 6 3
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php
  79. 23 2
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php
  80. 6 4
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
  81. 11 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
  82. 32 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php
  83. 14 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php
  84. 16 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php
  85. 11 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php
  86. 10 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot
  87. 7 0
      vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot
  88. 1 1
      vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php
  89. 23 0
      vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
  90. 1 1
      vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php
  91. 8 0
      vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php
  92. 2 2
      vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php
  93. 12 0
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
  94. 4 4
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php
  95. 1 1
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php
  96. 41 0
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
  97. 7 0
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php
  98. 8 0
      vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php
  99. 3 0
      vendor/symfony/symfony/src/Symfony/Component/Process/Process.php
  100. 0 0
      vendor/symfony/symfony/src/Symfony/Component/Security/Core/AuthenticationEvents.php

+ 49 - 34
app/SymfonyRequirements.php View File

@@ -41,11 +41,11 @@ class Requirement
41 41
     /**
42 42
      * Constructor that initializes the requirement.
43 43
      *
44
-     * @param Boolean      $fulfilled     Whether the requirement is fulfilled
45
-     * @param string       $testMessage   The message for testing the requirement
46
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
47
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
48
-     * @param Boolean      $optional      Whether this is only an optional recommendation not a mandatory requirement
44
+     * @param Boolean     $fulfilled   Whether the requirement is fulfilled
45
+     * @param string      $testMessage The message for testing the requirement
46
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
47
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
48
+     * @param Boolean     $optional    Whether this is only an optional recommendation not a mandatory requirement
49 49
      */
50 50
     public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
51 51
     {
@@ -117,16 +117,16 @@ class PhpIniRequirement extends Requirement
117 117
     /**
118 118
      * Constructor that initializes the requirement.
119 119
      *
120
-     * @param string            $cfgName            The configuration name used for ini_get()
121
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
120
+     * @param string           $cfgName    The configuration name used for ini_get()
121
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
122 122
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
123
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124 124
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125 125
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126
-     * @param string|null       $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127
-     * @param string|null       $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129
-     * @param Boolean           $optional           Whether this is only an optional recommendation not a mandatory requirement
126
+     * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127
+     * @param string|null $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129
+     * @param Boolean     $optional    Whether this is only an optional recommendation not a mandatory requirement
130 130
      */
131 131
     public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
132 132
     {
@@ -193,10 +193,10 @@ class RequirementCollection implements IteratorAggregate
193 193
     /**
194 194
      * Adds a mandatory requirement.
195 195
      *
196
-     * @param Boolean      $fulfilled     Whether the requirement is fulfilled
197
-     * @param string       $testMessage   The message for testing the requirement
198
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
199
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
196
+     * @param Boolean     $fulfilled   Whether the requirement is fulfilled
197
+     * @param string      $testMessage The message for testing the requirement
198
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
199
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
200 200
      */
201 201
     public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null)
202 202
     {
@@ -206,10 +206,10 @@ class RequirementCollection implements IteratorAggregate
206 206
     /**
207 207
      * Adds an optional recommendation.
208 208
      *
209
-     * @param Boolean      $fulfilled     Whether the recommendation is fulfilled
210
-     * @param string       $testMessage   The message for testing the recommendation
211
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
212
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
209
+     * @param Boolean     $fulfilled   Whether the recommendation is fulfilled
210
+     * @param string      $testMessage The message for testing the recommendation
211
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
212
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
213 213
      */
214 214
     public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null)
215 215
     {
@@ -219,15 +219,15 @@ class RequirementCollection implements IteratorAggregate
219 219
     /**
220 220
      * Adds a mandatory requirement in form of a php.ini configuration.
221 221
      *
222
-     * @param string            $cfgName            The configuration name used for ini_get()
223
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
222
+     * @param string           $cfgName    The configuration name used for ini_get()
223
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
224 224
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
225
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226 226
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227 227
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228
-     * @param string            $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229
-     * @param string            $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
228
+     * @param string      $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
231 231
      */
232 232
     public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
233 233
     {
@@ -237,15 +237,15 @@ class RequirementCollection implements IteratorAggregate
237 237
     /**
238 238
      * Adds an optional recommendation in form of a php.ini configuration.
239 239
      *
240
-     * @param string            $cfgName            The configuration name used for ini_get()
241
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
240
+     * @param string           $cfgName    The configuration name used for ini_get()
241
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
242 242
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
243
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244 244
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245 245
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246
-     * @param string            $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247
-     * @param string            $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
246
+     * @param string      $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
249 249
      */
250 250
     public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
251 251
     {
@@ -430,8 +430,15 @@ class SymfonyRequirements extends RequirementCollection
430 430
         );
431 431
 
432 432
         if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
433
+            $timezones = array();
434
+            foreach (DateTimeZone::listAbbreviations() as $abbreviations) {
435
+                foreach ($abbreviations as $abbreviation) {
436
+                    $timezones[$abbreviation['timezone_id']] = true;
437
+                }
438
+            }
439
+
433 440
             $this->addRequirement(
434
-                (in_array(date_default_timezone_get(), DateTimeZone::listIdentifiers())),
441
+                isset($timezones[date_default_timezone_get()]),
435 442
                 sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()),
436 443
                 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.'
437 444
             );
@@ -495,6 +502,14 @@ class SymfonyRequirements extends RequirementCollection
495 502
             $this->addPhpIniRequirement(
496 503
                 'xdebug.scream', false, true
497 504
             );
505
+
506
+            $this->addPhpIniRecommendation(
507
+                'xdebug.max_nesting_level',
508
+                create_function('$cfgValue', 'return $cfgValue > 100;'),
509
+                true,
510
+                'xdebug.max_nesting_level should be above 100 in php.ini',
511
+                'Set "<strong>xdebug.max_nesting_level</strong>" to e.g. "<strong>250</strong>" in php.ini<a href="#phpini">*</a> to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.'
512
+            );
498 513
         }
499 514
 
500 515
         $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;
@@ -518,7 +533,7 @@ class SymfonyRequirements extends RequirementCollection
518 533
             'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions',
519 534
             'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.'
520 535
         );
521
-        
536
+
522 537
         $this->addRecommendation(
523 538
             version_compare($installedPhpVersion, '5.3.8', '>='),
524 539
             'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156',

+ 8 - 6
app/bootstrap.php.cache View File

@@ -265,8 +265,10 @@ class Container implements IntrospectableContainerInterface
265 265
             unset($this->scopedServices[$name]);
266 266
 
267 267
             foreach ($this->scopeChildren[$name] as $child) {
268
-                $services[$child] = $this->scopedServices[$child];
269
-                unset($this->scopedServices[$child]);
268
+                if (isset($this->scopedServices[$child])) {
269
+                    $services[$child] = $this->scopedServices[$child];
270
+                    unset($this->scopedServices[$child]);
271
+                }
270 272
             }
271 273
 
272 274
                         $this->services = call_user_func_array('array_diff_key', $services);
@@ -509,12 +511,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface
509 511
     protected $classes;
510 512
     protected $errorReportingLevel;
511 513
 
512
-    const VERSION         = '2.1.7';
513
-    const VERSION_ID      = '20107';
514
+    const VERSION         = '2.1.8-DEV';
515
+    const VERSION_ID      = '20108';
514 516
     const MAJOR_VERSION   = '2';
515 517
     const MINOR_VERSION   = '1';
516
-    const RELEASE_VERSION = '7';
517
-    const EXTRA_VERSION   = '';
518
+    const RELEASE_VERSION = '8';
519
+    const EXTRA_VERSION   = 'DEV';
518 520
 
519 521
     
520 522
     public function __construct($environment, $debug)

+ 4 - 2
composer.json View File

@@ -1,4 +1,5 @@
1 1
 {
2
+    "minimum-stability": "dev",
2 3
     "name": "symfony/framework-standard-edition",
3 4
     "description": "The \"Symfony Standard Edition\" distribution",
4 5
     "autoload": {
@@ -20,11 +21,12 @@
20 21
         "jms/di-extra-bundle": "1.1.*",
21 22
         "kriswallsmith/assetic": "1.1.*@dev",
22 23
         
23
-        "friendsofsymfony/user-bundle": "*",
24
+        "friendsofsymfony/user-bundle": "v1.3.1",
24 25
         "doctrine/data-fixtures" : "dev-master",
25 26
         "doctrine/doctrine-fixtures-bundle": "dev-master",
26 27
         "stof/doctrine-extensions-bundle": "dev-master",
27
-        "gregwar/image-bundle": "dev-master"
28
+        "gregwar/image-bundle": "dev-master",
29
+        "cedriclombardot/admingenerator-generator-bundle": "dev-master"
28 30
     },
29 31
     "scripts": {
30 32
         "post-install-cmd": [

+ 404 - 81
composer.lock View File

@@ -1,24 +1,134 @@
1 1
 {
2
-    "hash": "dbeb4a140c307cd5c7e1e896ef9fa0aa",
2
+    "hash": "cfa67943fb19431c371d189811089b42",
3 3
     "packages": [
4 4
         {
5
+            "name": "cedriclombardot/admingenerator-generator-bundle",
6
+            "version": "dev-master",
7
+            "target-dir": "Admingenerator/GeneratorBundle",
8
+            "source": {
9
+                "type": "git",
10
+                "url": "https://github.com/symfony2admingenerator/AdmingeneratorGeneratorBundle.git",
11
+                "reference": "d50c391562cae6560e8d8003d3bd3a855d467490"
12
+            },
13
+            "dist": {
14
+                "type": "zip",
15
+                "url": "https://api.github.com/repos/symfony2admingenerator/AdmingeneratorGeneratorBundle/zipball/d50c391562cae6560e8d8003d3bd3a855d467490",
16
+                "reference": "d50c391562cae6560e8d8003d3bd3a855d467490",
17
+                "shasum": ""
18
+            },
19
+            "require": {
20
+                "cedriclombardot/twig-generator": "dev-master",
21
+                "knplabs/knp-menu-bundle": ">1.0,<2.1",
22
+                "symfony/symfony": "2.1.*",
23
+                "twig/extensions": "dev-master",
24
+                "twig/twig": ">= 1.9.0",
25
+                "white-october/pagerfanta-bundle": "dev-master"
26
+            },
27
+            "require-dev": {
28
+                "doctrine/common": "2.3.*",
29
+                "doctrine/dbal": "2.3.*",
30
+                "doctrine/orm": "2.3.*"
31
+            },
32
+            "suggest": {
33
+                "cedriclombardot/admingenerator-user-bundle": "Help you to overwrite the base layout of FOSUserBundle or others giving a parameter key of the container"
34
+            },
35
+            "time": "2013-02-17 18:17:44",
36
+            "type": "symfony-bundle",
37
+            "extra": {
38
+                "branch-alias": {
39
+                    "dev-master": "1.0-dev"
40
+                }
41
+            },
42
+            "autoload": {
43
+                "psr-0": {
44
+                    "Admingenerator\\GeneratorBundle": ""
45
+                }
46
+            },
47
+            "notification-url": "https://packagist.org/downloads/",
48
+            "license": [
49
+                "MIT"
50
+            ],
51
+            "authors": [
52
+                {
53
+                    "name": "Cedric LOMBARDOT",
54
+                    "email": "cedric.lombardot@gmail.com"
55
+                },
56
+                {
57
+                    "name": "Symfony Community",
58
+                    "homepage": "http://github.com/cedriclombardot/AdmingeneratorGeneratorBundle/contributors"
59
+                }
60
+            ],
61
+            "description": "Admingenerator for Symfony2 based on YAML configuration and Twig templating",
62
+            "homepage": "http://symfony2admingenerator.org/",
63
+            "keywords": [
64
+                "admin",
65
+                "generator",
66
+                "yaml"
67
+            ]
68
+        },
69
+        {
70
+            "name": "cedriclombardot/twig-generator",
71
+            "version": "dev-master",
72
+            "source": {
73
+                "type": "git",
74
+                "url": "git://github.com/cedriclombardot/TwigGenerator.git",
75
+                "reference": "b4a846956d330ed464070f6276801d16c92ae5c5"
76
+            },
77
+            "dist": {
78
+                "type": "zip",
79
+                "url": "https://api.github.com/repos/cedriclombardot/TwigGenerator/zipball/b4a846956d330ed464070f6276801d16c92ae5c5",
80
+                "reference": "b4a846956d330ed464070f6276801d16c92ae5c5",
81
+                "shasum": ""
82
+            },
83
+            "require": {
84
+                "php": ">=5.3.0",
85
+                "twig/twig": ">=1.1, <2.0-dev"
86
+            },
87
+            "time": "2012-11-09 23:18:09",
88
+            "type": "library",
89
+            "autoload": {
90
+                "psr-0": {
91
+                    "TwigGenerator": "src/"
92
+                }
93
+            },
94
+            "notification-url": "https://packagist.org/downloads/",
95
+            "license": [
96
+                "MIT"
97
+            ],
98
+            "authors": [
99
+                {
100
+                    "name": "Cédric Lombardot",
101
+                    "email": "cedric.lombardot@gmail.com"
102
+                },
103
+                {
104
+                    "name": "François Zaninotto"
105
+                }
106
+            ],
107
+            "description": "A generator for PHP code based on Twig template engine",
108
+            "keywords": [
109
+                "code generation",
110
+                "generator",
111
+                "twig"
112
+            ]
113
+        },
114
+        {
5 115
             "name": "doctrine/common",
6
-            "version": "2.3.0",
116
+            "version": "2.3.x-dev",
7 117
             "source": {
8 118
                 "type": "git",
9
-                "url": "https://github.com/doctrine/common",
10
-                "reference": "2.3.0"
119
+                "url": "https://github.com/doctrine/common.git",
120
+                "reference": "bb0aebbf234db52df476a2b473d434745b34221c"
11 121
             },
12 122
             "dist": {
13 123
                 "type": "zip",
14
-                "url": "https://github.com/doctrine/common/zipball/2.3.0",
15
-                "reference": "2.3.0",
124
+                "url": "https://api.github.com/repos/doctrine/common/zipball/bb0aebbf234db52df476a2b473d434745b34221c",
125
+                "reference": "bb0aebbf234db52df476a2b473d434745b34221c",
16 126
                 "shasum": ""
17 127
             },
18 128
             "require": {
19 129
                 "php": ">=5.3.2"
20 130
             },
21
-            "time": "2012-09-19 22:55:18",
131
+            "time": "2012-09-20 05:55:18",
22 132
             "type": "library",
23 133
             "extra": {
24 134
                 "branch-alias": {
@@ -127,23 +237,23 @@
127 237
         },
128 238
         {
129 239
             "name": "doctrine/dbal",
130
-            "version": "2.3.2",
240
+            "version": "2.3.x-dev",
131 241
             "source": {
132 242
                 "type": "git",
133
-                "url": "https://github.com/doctrine/dbal",
134
-                "reference": "2.3.2"
243
+                "url": "https://github.com/doctrine/dbal.git",
244
+                "reference": "fd45c6f6baa618d871f3201fabe76df5043abb1e"
135 245
             },
136 246
             "dist": {
137 247
                 "type": "zip",
138
-                "url": "https://github.com/doctrine/dbal/archive/2.3.2.zip",
139
-                "reference": "2.3.2",
248
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/fd45c6f6baa618d871f3201fabe76df5043abb1e",
249
+                "reference": "fd45c6f6baa618d871f3201fabe76df5043abb1e",
140 250
                 "shasum": ""
141 251
             },
142 252
             "require": {
143 253
                 "doctrine/common": "2.3.*",
144 254
                 "php": ">=5.3.2"
145 255
             },
146
-            "time": "2013-01-07 20:03:43",
256
+            "time": "2013-01-20 11:50:36",
147 257
             "type": "library",
148 258
             "extra": {
149 259
                 "branch-alias": {
@@ -190,17 +300,17 @@
190 300
         },
191 301
         {
192 302
             "name": "doctrine/doctrine-bundle",
193
-            "version": "v1.1.0",
303
+            "version": "1.1.x-dev",
194 304
             "target-dir": "Doctrine/Bundle/DoctrineBundle",
195 305
             "source": {
196 306
                 "type": "git",
197 307
                 "url": "git://github.com/doctrine/DoctrineBundle.git",
198
-                "reference": "v1.1.0"
308
+                "reference": "78b3680da8ae38f87df83a100e2e3a6820dd6177"
199 309
             },
200 310
             "dist": {
201 311
                 "type": "zip",
202
-                "url": "https://github.com/doctrine/DoctrineBundle/archive/v1.1.0.zip",
203
-                "reference": "v1.1.0",
312
+                "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/78b3680da8ae38f87df83a100e2e3a6820dd6177",
313
+                "reference": "78b3680da8ae38f87df83a100e2e3a6820dd6177",
204 314
                 "shasum": ""
205 315
             },
206 316
             "require": {
@@ -218,7 +328,7 @@
218 328
             "suggest": {
219 329
                 "doctrine/orm": "The Doctrine ORM integration is optional in the bundle."
220 330
             },
221
-            "time": "2013-01-12 13:20:23",
331
+            "time": "2013-01-12 14:40:52",
222 332
             "type": "symfony-bundle",
223 333
             "extra": {
224 334
                 "branch-alias": {
@@ -317,16 +427,16 @@
317 427
         },
318 428
         {
319 429
             "name": "doctrine/orm",
320
-            "version": "2.3.2",
430
+            "version": "2.3.x-dev",
321 431
             "source": {
322 432
                 "type": "git",
323
-                "url": "git://github.com/doctrine/doctrine2.git",
324
-                "reference": "2.3.2"
433
+                "url": "https://github.com/doctrine/doctrine2.git",
434
+                "reference": "fdd0af34e6fced967b8751bc3e4792c11ef86d57"
325 435
             },
326 436
             "dist": {
327 437
                 "type": "zip",
328
-                "url": "https://github.com/doctrine/doctrine2/archive/2.3.2.zip",
329
-                "reference": "2.3.2",
438
+                "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/fdd0af34e6fced967b8751bc3e4792c11ef86d57",
439
+                "reference": "fdd0af34e6fced967b8751bc3e4792c11ef86d57",
330 440
                 "shasum": ""
331 441
             },
332 442
             "require": {
@@ -338,7 +448,7 @@
338 448
             "suggest": {
339 449
                 "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
340 450
             },
341
-            "time": "2013-01-07 20:05:04",
451
+            "time": "2013-01-20 19:35:21",
342 452
             "bin": [
343 453
                 "bin/doctrine",
344 454
                 "bin/doctrine.php"
@@ -452,16 +562,16 @@
452 562
         },
453 563
         {
454 564
             "name": "gedmo/doctrine-extensions",
455
-            "version": "v2.3.4",
565
+            "version": "dev-master",
456 566
             "source": {
457 567
                 "type": "git",
458 568
                 "url": "git://github.com/l3pp4rd/DoctrineExtensions.git",
459
-                "reference": "v2.3.4"
569
+                "reference": "b2806e409f21132e814203e36810b7112453a858"
460 570
             },
461 571
             "dist": {
462 572
                 "type": "zip",
463
-                "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/v2.3.4",
464
-                "reference": "v2.3.4",
573
+                "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/b2806e409f21132e814203e36810b7112453a858",
574
+                "reference": "b2806e409f21132e814203e36810b7112453a858",
465 575
                 "shasum": ""
466 576
             },
467 577
             "require": {
@@ -481,7 +591,7 @@
481 591
                 "doctrine/mongodb-odm": ">=1.0.0-BETA7",
482 592
                 "doctrine/orm": ">=2.3.2"
483 593
             },
484
-            "time": "2013-02-05 13:39:54",
594
+            "time": "2013-02-13 19:35:33",
485 595
             "type": "library",
486 596
             "extra": {
487 597
                 "branch-alias": {
@@ -575,22 +685,22 @@
575 685
         },
576 686
         {
577 687
             "name": "jdorn/sql-formatter",
578
-            "version": "v1.2.0",
688
+            "version": "dev-master",
579 689
             "source": {
580 690
                 "type": "git",
581 691
                 "url": "git://github.com/jdorn/sql-formatter.git",
582
-                "reference": "v1.2.0"
692
+                "reference": "7a92826fe2734518e9cd6ebcf1ba052e58351c34"
583 693
             },
584 694
             "dist": {
585 695
                 "type": "zip",
586
-                "url": "https://github.com/jdorn/sql-formatter/archive/v1.2.0.zip",
587
-                "reference": "v1.2.0",
696
+                "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/7a92826fe2734518e9cd6ebcf1ba052e58351c34",
697
+                "reference": "7a92826fe2734518e9cd6ebcf1ba052e58351c34",
588 698
                 "shasum": ""
589 699
             },
590 700
             "require": {
591 701
                 "php": ">=5.2.4"
592 702
             },
593
-            "time": "2012-12-22 21:46:50",
703
+            "time": "2013-02-11 00:21:20",
594 704
             "type": "library",
595 705
             "extra": {
596 706
                 "branch-alias": {
@@ -707,7 +817,7 @@
707 817
         },
708 818
         {
709 819
             "name": "jms/di-extra-bundle",
710
-            "version": "1.1.1",
820
+            "version": "1.1.x-dev",
711 821
             "target-dir": "JMS/DiExtraBundle",
712 822
             "source": {
713 823
                 "type": "git",
@@ -716,7 +826,7 @@
716 826
             },
717 827
             "dist": {
718 828
                 "type": "zip",
719
-                "url": "https://github.com/schmittjoh/JMSDiExtraBundle/archive/1.1.1.zip",
829
+                "url": "https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/zipball/1.1.1",
720 830
                 "reference": "1.1.1",
721 831
                 "shasum": ""
722 832
             },
@@ -740,7 +850,7 @@
740 850
                 "symfony/validator": "*",
741 851
                 "symfony/yaml": "*"
742 852
             },
743
-            "time": "2012-09-21 01:56:32",
853
+            "time": "2012-09-21 08:56:32",
744 854
             "type": "symfony-bundle",
745 855
             "autoload": {
746 856
                 "psr-0": {
@@ -812,17 +922,17 @@
812 922
         },
813 923
         {
814 924
             "name": "jms/security-extra-bundle",
815
-            "version": "1.2.0",
925
+            "version": "1.2.x-dev",
816 926
             "target-dir": "JMS/SecurityExtraBundle",
817 927
             "source": {
818 928
                 "type": "git",
819
-                "url": "https://github.com/schmittjoh/JMSSecurityExtraBundle",
820
-                "reference": "1.2.0"
929
+                "url": "https://github.com/schmittjoh/JMSSecurityExtraBundle.git",
930
+                "reference": "9ab6aceda50fc7a2b07d741ba4b3f0695508afcb"
821 931
             },
822 932
             "dist": {
823 933
                 "type": "zip",
824
-                "url": "https://github.com/schmittjoh/JMSSecurityExtraBundle/zipball/1.2.0",
825
-                "reference": "1.2.0",
934
+                "url": "https://api.github.com/repos/schmittjoh/JMSSecurityExtraBundle/zipball/9ab6aceda50fc7a2b07d741ba4b3f0695508afcb",
935
+                "reference": "9ab6aceda50fc7a2b07d741ba4b3f0695508afcb",
826 936
                 "shasum": ""
827 937
             },
828 938
             "require": {
@@ -846,7 +956,7 @@
846 956
                 "symfony/validator": "*",
847 957
                 "symfony/yaml": "*"
848 958
             },
849
-            "time": "2012-09-06 09:12:03",
959
+            "time": "2012-09-06 16:12:23",
850 960
             "type": "symfony-bundle",
851 961
             "autoload": {
852 962
                 "psr-0": {
@@ -876,6 +986,124 @@
876 986
             ]
877 987
         },
878 988
         {
989
+            "name": "knplabs/knp-menu",
990
+            "version": "dev-master",
991
+            "source": {
992
+                "type": "git",
993
+                "url": "https://github.com/KnpLabs/KnpMenu.git",
994
+                "reference": "730bc37232f5f813822acf80edfbd89381ea5971"
995
+            },
996
+            "dist": {
997
+                "type": "zip",
998
+                "url": "https://api.github.com/repos/KnpLabs/KnpMenu/zipball/730bc37232f5f813822acf80edfbd89381ea5971",
999
+                "reference": "730bc37232f5f813822acf80edfbd89381ea5971",
1000
+                "shasum": ""
1001
+            },
1002
+            "require": {
1003
+                "php": ">=5.3.0"
1004
+            },
1005
+            "require-dev": {
1006
+                "pimple/pimple": "1.0.*",
1007
+                "silex/silex": "1.0.*",
1008
+                "twig/twig": ">=1.2,<2.0-dev"
1009
+            },
1010
+            "suggest": {
1011
+                "pimple/pimple": "for the built-in implementations of the menu provider and renderer provider",
1012
+                "silex/silex": "for the integration with your silex application",
1013
+                "twig/twig": "for the TwigRenderer and the integration with your templates"
1014
+            },
1015
+            "time": "2012-12-27 13:04:16",
1016
+            "type": "library",
1017
+            "extra": {
1018
+                "branch-alias": {
1019
+                    "dev-master": "2.0.x-dev"
1020
+                }
1021
+            },
1022
+            "autoload": {
1023
+                "psr-0": {
1024
+                    "Knp\\Menu\\": "src/"
1025
+                }
1026
+            },
1027
+            "notification-url": "https://packagist.org/downloads/",
1028
+            "license": [
1029
+                "MIT"
1030
+            ],
1031
+            "authors": [
1032
+                {
1033
+                    "name": "Christophe Coevoet",
1034
+                    "email": "stof@notk.org"
1035
+                },
1036
+                {
1037
+                    "name": "KnpLabs",
1038
+                    "homepage": "http://knplabs.com"
1039
+                },
1040
+                {
1041
+                    "name": "Symfony Community",
1042
+                    "homepage": "https://github.com/KnpLabs/KnpMenu/contributors"
1043
+                }
1044
+            ],
1045
+            "description": "An object oriented menu library",
1046
+            "homepage": "http://knplabs.com",
1047
+            "keywords": [
1048
+                "menu",
1049
+                "tree"
1050
+            ]
1051
+        },
1052
+        {
1053
+            "name": "knplabs/knp-menu-bundle",
1054
+            "version": "dev-master",
1055
+            "target-dir": "Knp/Bundle/MenuBundle",
1056
+            "source": {
1057
+                "type": "git",
1058
+                "url": "https://github.com/KnpLabs/KnpMenuBundle.git",
1059
+                "reference": "bfaa9f1a74ee590c5e6460a3139b268fce1f1885"
1060
+            },
1061
+            "dist": {
1062
+                "type": "zip",
1063
+                "url": "https://api.github.com/repos/KnpLabs/KnpMenuBundle/zipball/bfaa9f1a74ee590c5e6460a3139b268fce1f1885",
1064
+                "reference": "bfaa9f1a74ee590c5e6460a3139b268fce1f1885",
1065
+                "shasum": ""
1066
+            },
1067
+            "require": {
1068
+                "knplabs/knp-menu": "2.0.*",
1069
+                "symfony/framework-bundle": ">=2.0,<2.3-dev"
1070
+            },
1071
+            "time": "2012-12-29 08:47:58",
1072
+            "type": "symfony-bundle",
1073
+            "extra": {
1074
+                "branch-alias": {
1075
+                    "dev-master": "2.0.x-dev"
1076
+                }
1077
+            },
1078
+            "autoload": {
1079
+                "psr-0": {
1080
+                    "Knp\\Bundle\\MenuBundle": ""
1081
+                }
1082
+            },
1083
+            "notification-url": "https://packagist.org/downloads/",
1084
+            "license": [
1085
+                "MIT"
1086
+            ],
1087
+            "authors": [
1088
+                {
1089
+                    "name": "Christophe Coevoet",
1090
+                    "email": "stof@notk.org"
1091
+                },
1092
+                {
1093
+                    "name": "Knplabs",
1094
+                    "homepage": "http://knplabs.com"
1095
+                },
1096
+                {
1097
+                    "name": "Symfony Community",
1098
+                    "homepage": "https://github.com/KnpLabs/KnpMenuBundle/contributors"
1099
+                }
1100
+            ],
1101
+            "description": "This bundle provides an integration of the KnpMenu library",
1102
+            "keywords": [
1103
+                "menu"
1104
+            ]
1105
+        },
1106
+        {
879 1107
             "name": "kriswallsmith/assetic",
880 1108
             "version": "dev-master",
881 1109
             "source": {
@@ -1003,24 +1231,75 @@
1003 1231
             ]
1004 1232
         },
1005 1233
         {
1234
+            "name": "pagerfanta/pagerfanta",
1235
+            "version": "dev-master",
1236
+            "source": {
1237
+                "type": "git",
1238
+                "url": "https://github.com/whiteoctober/Pagerfanta.git",
1239
+                "reference": "2608116b1d0908c07f6590bc10addab37fd4a49f"
1240
+            },
1241
+            "dist": {
1242
+                "type": "zip",
1243
+                "url": "https://api.github.com/repos/whiteoctober/Pagerfanta/zipball/2608116b1d0908c07f6590bc10addab37fd4a49f",
1244
+                "reference": "2608116b1d0908c07f6590bc10addab37fd4a49f",
1245
+                "shasum": ""
1246
+            },
1247
+            "require": {
1248
+                "php": ">=5.3.0"
1249
+            },
1250
+            "suggest": {
1251
+                "doctrine/mongodb-odm": "2.*",
1252
+                "doctrine/orm": "2.*",
1253
+                "solarium/solarium": "2.*"
1254
+            },
1255
+            "time": "2013-02-17 21:13:14",
1256
+            "type": "library",
1257
+            "extra": {
1258
+                "branch-alias": {
1259
+                    "dev-master": "1.0.x-dev"
1260
+                }
1261
+            },
1262
+            "autoload": {
1263
+                "psr-0": {
1264
+                    "Pagerfanta\\": "src/"
1265
+                }
1266
+            },
1267
+            "notification-url": "https://packagist.org/downloads/",
1268
+            "license": [
1269
+                "MIT"
1270
+            ],
1271
+            "authors": [
1272
+                {
1273
+                    "name": "Pablo Díez",
1274
+                    "email": "pablodip@gmail.com",
1275
+                    "homepage": "http://github.com/pablodip"
1276
+                }
1277
+            ],
1278
+            "description": "Pagination for PHP 5.3",
1279
+            "keywords": [
1280
+                "page",
1281
+                "paging"
1282
+            ]
1283
+        },
1284
+        {
1006 1285
             "name": "sensio/distribution-bundle",
1007
-            "version": "v2.1.7",
1286
+            "version": "2.1.x-dev",
1008 1287
             "target-dir": "Sensio/Bundle/DistributionBundle",
1009 1288
             "source": {
1010 1289
                 "type": "git",
1011 1290
                 "url": "https://github.com/sensio/SensioDistributionBundle",
1012
-                "reference": "v2.1.7"
1291
+                "reference": "615f76309dae8c45c72b69578b034713c09767d1"
1013 1292
             },
1014 1293
             "dist": {
1015 1294
                 "type": "zip",
1016
-                "url": "https://github.com/sensio/SensioDistributionBundle/archive/v2.1.7.zip",
1017
-                "reference": "v2.1.7",
1295
+                "url": "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/615f76309dae8c45c72b69578b034713c09767d1",
1296
+                "reference": "615f76309dae8c45c72b69578b034713c09767d1",
1018 1297
                 "shasum": ""
1019 1298
             },
1020 1299
             "require": {
1021 1300
                 "symfony/framework-bundle": "2.1.*"
1022 1301
             },
1023
-            "time": "2013-01-04 17:11:22",
1302
+            "time": "2013-02-04 19:54:42",
1024 1303
             "type": "symfony-bundle",
1025 1304
             "extra": {
1026 1305
                 "branch-alias": {
@@ -1050,7 +1329,7 @@
1050 1329
         },
1051 1330
         {
1052 1331
             "name": "sensio/framework-extra-bundle",
1053
-            "version": "v2.1.7",
1332
+            "version": "2.1.x-dev",
1054 1333
             "target-dir": "Sensio/Bundle/FrameworkExtraBundle",
1055 1334
             "source": {
1056 1335
                 "type": "git",
@@ -1059,7 +1338,7 @@
1059 1338
             },
1060 1339
             "dist": {
1061 1340
                 "type": "zip",
1062
-                "url": "https://github.com/sensio/SensioFrameworkExtraBundle/archive/v2.1.7.zip",
1341
+                "url": "https://api.github.com/repos/sensio/SensioFrameworkExtraBundle/zipball/v2.1.7",
1063 1342
                 "reference": "v2.1.7",
1064 1343
                 "shasum": ""
1065 1344
             },
@@ -1097,7 +1376,7 @@
1097 1376
         },
1098 1377
         {
1099 1378
             "name": "sensio/generator-bundle",
1100
-            "version": "v2.1.7",
1379
+            "version": "2.1.x-dev",
1101 1380
             "target-dir": "Sensio/Bundle/GeneratorBundle",
1102 1381
             "source": {
1103 1382
                 "type": "git",
@@ -1106,7 +1385,7 @@
1106 1385
             },
1107 1386
             "dist": {
1108 1387
                 "type": "zip",
1109
-                "url": "https://github.com/sensio/SensioGeneratorBundle/archive/v2.1.7.zip",
1388
+                "url": "https://api.github.com/repos/sensio/SensioGeneratorBundle/zipball/v2.1.7",
1110 1389
                 "reference": "v2.1.7",
1111 1390
                 "shasum": ""
1112 1391
             },
@@ -1256,17 +1535,17 @@
1256 1535
         },
1257 1536
         {
1258 1537
             "name": "symfony/assetic-bundle",
1259
-            "version": "v2.1.1",
1538
+            "version": "dev-master",
1260 1539
             "target-dir": "Symfony/Bundle/AsseticBundle",
1261 1540
             "source": {
1262 1541
                 "type": "git",
1263
-                "url": "https://github.com/symfony/AsseticBundle",
1264
-                "reference": "v2.1.1"
1542
+                "url": "https://github.com/symfony/AsseticBundle.git",
1543
+                "reference": "16cb279ea283ce3fb30b8284a391a82512263d8b"
1265 1544
             },
1266 1545
             "dist": {
1267 1546
                 "type": "zip",
1268
-                "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/v2.1.1",
1269
-                "reference": "v2.1.1",
1547
+                "url": "https://api.github.com/repos/symfony/AsseticBundle/zipball/16cb279ea283ce3fb30b8284a391a82512263d8b",
1548
+                "reference": "16cb279ea283ce3fb30b8284a391a82512263d8b",
1270 1549
                 "shasum": ""
1271 1550
             },
1272 1551
             "require": {
@@ -1286,7 +1565,7 @@
1286 1565
             "suggest": {
1287 1566
                 "symfony/twig-bundle": ">=2.1.0,<2.3-dev"
1288 1567
             },
1289
-            "time": "2013-01-31 17:56:17",
1568
+            "time": "2013-02-17 21:36:13",
1290 1569
             "type": "symfony-bundle",
1291 1570
             "extra": {
1292 1571
                 "branch-alias": {
@@ -1319,17 +1598,17 @@
1319 1598
         },
1320 1599
         {
1321 1600
             "name": "symfony/monolog-bundle",
1322
-            "version": "v2.1.7",
1601
+            "version": "2.1.x-dev",
1323 1602
             "target-dir": "Symfony/Bundle/MonologBundle",
1324 1603
             "source": {
1325 1604
                 "type": "git",
1326 1605
                 "url": "https://github.com/symfony/MonologBundle",
1327
-                "reference": "v2.1.7"
1606
+                "reference": "253fcda1128a0301aa68d040302cade65095f2c6"
1328 1607
             },
1329 1608
             "dist": {
1330 1609
                 "type": "zip",
1331
-                "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/v2.1.7",
1332
-                "reference": "v2.1.7",
1610
+                "url": "https://api.github.com/repos/symfony/MonologBundle/zipball/253fcda1128a0301aa68d040302cade65095f2c6",
1611
+                "reference": "253fcda1128a0301aa68d040302cade65095f2c6",
1333 1612
                 "shasum": ""
1334 1613
             },
1335 1614
             "require": {
@@ -1337,13 +1616,13 @@
1337 1616
                 "php": ">=5.3.2",
1338 1617
                 "symfony/config": ">=2.1.0,<2.3-dev",
1339 1618
                 "symfony/dependency-injection": ">=2.1.0,<2.3-dev",
1340
-                "symfony/monolog-bridge": ">=2.1.0,<2.3-dev"
1619
+                "symfony/monolog-bridge": "2.1.*"
1341 1620
             },
1342 1621
             "require-dev": {
1343 1622
                 "symfony/config": ">=2.1.0,<2.3-dev",
1344 1623
                 "symfony/yaml": ">=2.1.0,<2.3-dev"
1345 1624
             },
1346
-            "time": "2013-01-07 10:57:41",
1625
+            "time": "2013-01-28 10:06:42",
1347 1626
             "type": "symfony-bundle",
1348 1627
             "extra": {
1349 1628
                 "branch-alias": {
@@ -1378,16 +1657,16 @@
1378 1657
         },
1379 1658
         {
1380 1659
             "name": "symfony/swiftmailer-bundle",
1381
-            "version": "v2.1.7",
1660
+            "version": "2.1.x-dev",
1382 1661
             "target-dir": "Symfony/Bundle/SwiftmailerBundle",
1383 1662
             "source": {
1384 1663
                 "type": "git",
1385
-                "url": "https://github.com/symfony/SwiftmailerBundle",
1664
+                "url": "https://github.com/symfony/SwiftmailerBundle.git",
1386 1665
                 "reference": "v2.1.7"
1387 1666
             },
1388 1667
             "dist": {
1389 1668
                 "type": "zip",
1390
-                "url": "https://github.com/symfony/SwiftmailerBundle/archive/v2.1.7.zip",
1669
+                "url": "https://api.github.com/repos/symfony/SwiftmailerBundle/zipball/v2.1.7",
1391 1670
                 "reference": "v2.1.7",
1392 1671
                 "shasum": ""
1393 1672
             },
@@ -1433,16 +1712,16 @@
1433 1712
         },
1434 1713
         {
1435 1714
             "name": "symfony/symfony",
1436
-            "version": "v2.1.7",
1715
+            "version": "2.1.x-dev",
1437 1716
             "source": {
1438 1717
                 "type": "git",
1439
-                "url": "git://github.com/symfony/symfony.git",
1440
-                "reference": "v2.1.7"
1718
+                "url": "https://github.com/symfony/symfony.git",
1719
+                "reference": "75c61944a3e43b9efb5a195fd79416ff43ca09e7"
1441 1720
             },
1442 1721
             "dist": {
1443 1722
                 "type": "zip",
1444
-                "url": "https://github.com/symfony/symfony/archive/v2.1.7.zip",
1445
-                "reference": "v2.1.7",
1723
+                "url": "https://api.github.com/repos/symfony/symfony/zipball/75c61944a3e43b9efb5a195fd79416ff43ca09e7",
1724
+                "reference": "75c61944a3e43b9efb5a195fd79416ff43ca09e7",
1446 1725
                 "shasum": ""
1447 1726
             },
1448 1727
             "require": {
@@ -1491,7 +1770,7 @@
1491 1770
                 "monolog/monolog": ">=1.0,<1.3-dev",
1492 1771
                 "propel/propel1": "dev-master"
1493 1772
             },
1494
-            "time": "2013-01-17 21:21:51",
1773
+            "time": "2013-02-17 12:59:26",
1495 1774
             "type": "library",
1496 1775
             "autoload": {
1497 1776
                 "psr-0": {
@@ -1568,22 +1847,22 @@
1568 1847
         },
1569 1848
         {
1570 1849
             "name": "twig/twig",
1571
-            "version": "v1.12.2",
1850
+            "version": "dev-master",
1572 1851
             "source": {
1573 1852
                 "type": "git",
1574
-                "url": "git://github.com/fabpot/Twig.git",
1575
-                "reference": "v1.12.2"
1853
+                "url": "https://github.com/fabpot/Twig.git",
1854
+                "reference": "ac86c6368c8b1ed27adb436af54d0398b64cab1f"
1576 1855
             },
1577 1856
             "dist": {
1578 1857
                 "type": "zip",
1579
-                "url": "https://api.github.com/repos/fabpot/Twig/zipball/v1.12.2",
1580
-                "reference": "v1.12.2",
1858
+                "url": "https://api.github.com/repos/fabpot/Twig/zipball/ac86c6368c8b1ed27adb436af54d0398b64cab1f",
1859
+                "reference": "ac86c6368c8b1ed27adb436af54d0398b64cab1f",
1581 1860
                 "shasum": ""
1582 1861
             },
1583 1862
             "require": {
1584 1863
                 "php": ">=5.2.4"
1585 1864
             },
1586
-            "time": "2013-02-09 18:21:53",
1865
+            "time": "2013-02-17 19:51:08",
1587 1866
             "type": "library",
1588 1867
             "extra": {
1589 1868
                 "branch-alias": {
@@ -1614,19 +1893,63 @@
1614 1893
             "keywords": [
1615 1894
                 "templating"
1616 1895
             ]
1896
+        },
1897
+        {
1898
+            "name": "white-october/pagerfanta-bundle",
1899
+            "version": "dev-master",
1900
+            "target-dir": "WhiteOctober/PagerfantaBundle",
1901
+            "source": {
1902
+                "type": "git",
1903
+                "url": "git://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git",
1904
+                "reference": "38e317a3ecd5a68e2322024ea8fe57632d4ddd68"
1905
+            },
1906
+            "dist": {
1907
+                "type": "zip",
1908
+                "url": "https://api.github.com/repos/whiteoctober/WhiteOctoberPagerfantaBundle/zipball/38e317a3ecd5a68e2322024ea8fe57632d4ddd68",
1909
+                "reference": "38e317a3ecd5a68e2322024ea8fe57632d4ddd68",
1910
+                "shasum": ""
1911
+            },
1912
+            "require": {
1913
+                "pagerfanta/pagerfanta": "dev-master",
1914
+                "symfony/framework-bundle": "2.*"
1915
+            },
1916
+            "time": "2012-07-24 12:48:41",
1917
+            "type": "symfony-bundle",
1918
+            "autoload": {
1919
+                "psr-0": {
1920
+                    "WhiteOctober\\PagerfantaBundle": ""
1921
+                }
1922
+            },
1923
+            "notification-url": "https://packagist.org/downloads/",
1924
+            "license": [
1925
+                "MIT"
1926
+            ],
1927
+            "authors": [
1928
+                {
1929
+                    "name": "Pablo Díez",
1930
+                    "email": "pablodip@gmail.com",
1931
+                    "homepage": "http://github.com/pablodip"
1932
+                }
1933
+            ],
1934
+            "description": "Bundle to use Pagerfanta with Symfony2",
1935
+            "keywords": [
1936
+                "page",
1937
+                "paging"
1938
+            ]
1617 1939
         }
1618 1940
     ],
1619 1941
     "packages-dev": null,
1620 1942
     "aliases": [
1621 1943
 
1622 1944
     ],
1623
-    "minimum-stability": "stable",
1945
+    "minimum-stability": "dev",
1624 1946
     "stability-flags": {
1625 1947
         "twig/extensions": 20,
1626 1948
         "kriswallsmith/assetic": 20,
1627 1949
         "doctrine/data-fixtures": 20,
1628 1950
         "doctrine/doctrine-fixtures-bundle": 20,
1629 1951
         "stof/doctrine-extensions-bundle": 20,
1630
-        "gregwar/image-bundle": 20
1952
+        "gregwar/image-bundle": 20,
1953
+        "cedriclombardot/admingenerator-generator-bundle": 20
1631 1954
     }
1632 1955
 }

+ 1 - 1
vendor/autoload.php View File

@@ -4,4 +4,4 @@
4 4
 
5 5
 require_once __DIR__ . '/composer' . '/autoload_real.php';
6 6
 
7
-return ComposerAutoloaderInitcbc4880fba271850d5ce0e391e330698::getLoader();
7
+return ComposerAutoloaderInit518f1eb7577bcf5e84791f76034137cd::getLoader();

+ 1 - 0
vendor/cedriclombardot/admingenerator-generator-bundle/Admingenerator/GeneratorBundle

@@ -0,0 +1 @@
1
+Subproject commit d50c391562cae6560e8d8003d3bd3a855d467490

+ 1 - 0
vendor/cedriclombardot/twig-generator

@@ -0,0 +1 @@
1
+Subproject commit b4a846956d330ed464070f6276801d16c92ae5c5

+ 6 - 0
vendor/composer/autoload_namespaces.php View File

@@ -6,8 +6,10 @@ $vendorDir = dirname(__DIR__);
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
+    'WhiteOctober\\PagerfantaBundle' => $vendorDir . '/white-october/pagerfanta-bundle/',
9 10
     'Twig_Extensions_' => $vendorDir . '/twig/extensions/lib/',
10 11
     'Twig_' => $vendorDir . '/twig/twig/lib/',
12
+    'TwigGenerator' => $vendorDir . '/cedriclombardot/twig-generator/src/',
11 13
     'Symfony\\Bundle\\SwiftmailerBundle' => $vendorDir . '/symfony/swiftmailer-bundle/',
12 14
     'Symfony\\Bundle\\MonologBundle' => $vendorDir . '/symfony/monolog-bundle/',
13 15
     'Symfony\\Bundle\\AsseticBundle' => $vendorDir . '/symfony/assetic-bundle/',
@@ -17,8 +19,11 @@ return array(
17 19
     'Sensio\\Bundle\\GeneratorBundle' => $vendorDir . '/sensio/generator-bundle/',
18 20
     'Sensio\\Bundle\\FrameworkExtraBundle' => $vendorDir . '/sensio/framework-extra-bundle/',
19 21
     'Sensio\\Bundle\\DistributionBundle' => $vendorDir . '/sensio/distribution-bundle/',
22
+    'Pagerfanta\\' => $vendorDir . '/pagerfanta/pagerfanta/src/',
20 23
     'Monolog' => $vendorDir . '/monolog/monolog/src/',
21 24
     'Metadata\\' => $vendorDir . '/jms/metadata/src/',
25
+    'Knp\\Menu\\' => $vendorDir . '/knplabs/knp-menu/src/',
26
+    'Knp\\Bundle\\MenuBundle' => $vendorDir . '/knplabs/knp-menu-bundle/',
22 27
     'JMS\\SecurityExtraBundle' => $vendorDir . '/jms/security-extra-bundle/',
23 28
     'JMS\\DiExtraBundle' => $vendorDir . '/jms/di-extra-bundle/',
24 29
     'JMS\\AopBundle' => $vendorDir . '/jms/aop-bundle/',
@@ -33,5 +38,6 @@ return array(
33 38
     'Doctrine\\Bundle\\DoctrineBundle' => $vendorDir . '/doctrine/doctrine-bundle/',
34 39
     'CG\\' => $vendorDir . '/jms/cg/src/',
35 40
     'Assetic' => $vendorDir . '/kriswallsmith/assetic/src/',
41
+    'Admingenerator\\GeneratorBundle' => $vendorDir . '/cedriclombardot/admingenerator-generator-bundle/',
36 42
     '' => $baseDir . '/src/',
37 43
 );

+ 3 - 3
vendor/composer/autoload_real.php View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 // autoload_real.php generated by Composer
4 4
 
5
-class ComposerAutoloaderInitcbc4880fba271850d5ce0e391e330698
5
+class ComposerAutoloaderInit518f1eb7577bcf5e84791f76034137cd
6 6
 {
7 7
     private static $loader;
8 8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitcbc4880fba271850d5ce0e391e330698
19 19
             return self::$loader;
20 20
         }
21 21
 
22
-        spl_autoload_register(array('ComposerAutoloaderInitcbc4880fba271850d5ce0e391e330698', 'loadClassLoader'));
22
+        spl_autoload_register(array('ComposerAutoloaderInit518f1eb7577bcf5e84791f76034137cd', 'loadClassLoader'));
23 23
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
-        spl_autoload_unregister(array('ComposerAutoloaderInitcbc4880fba271850d5ce0e391e330698', 'loadClassLoader'));
24
+        spl_autoload_unregister(array('ComposerAutoloaderInit518f1eb7577bcf5e84791f76034137cd', 'loadClassLoader'));
25 25
 
26 26
         $vendorDir = dirname(__DIR__);
27 27
         $baseDir = dirname($vendorDir);

File diff suppressed because it is too large
+ 1118 - 784
vendor/composer/installed.json


+ 1 - 1
vendor/doctrine/common/lib/Doctrine/Common/Version.php View File

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

+ 1 - 1
vendor/doctrine/dbal/composer.json View File

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

+ 2 - 2
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php View File

@@ -687,12 +687,12 @@ class SQLServerPlatform extends AbstractPlatform
687 687
 
688 688
                 // Remove ORDER BY clause from $query
689 689
                 $query = preg_replace('/\s+ORDER BY(.*)/', '', $query);
690
-                $query = preg_replace('/^SELECT\s/', '', $query);
690
+                $query = preg_replace('/\sFROM/i', ", ROW_NUMBER() OVER ($over) AS doctrine_rownum FROM", $query);
691 691
 
692 692
                 $start = $offset + 1;
693 693
                 $end = $offset + $limit;
694 694
 
695
-                $query = "SELECT * FROM (SELECT ROW_NUMBER() OVER ($over) AS doctrine_rownum, $query) AS doctrine_tbl WHERE doctrine_rownum BETWEEN $start AND $end";
695
+                $query = "SELECT * FROM ($query) AS doctrine_tbl WHERE doctrine_rownum BETWEEN $start AND $end";
696 696
             }
697 697
         }
698 698
 

+ 35 - 18
vendor/doctrine/dbal/lib/Doctrine/DBAL/SQLParserUtils.php View File

@@ -32,6 +32,13 @@ use Doctrine\DBAL\Connection;
32 32
  */
33 33
 class SQLParserUtils
34 34
 {
35
+    const POSITIONAL_TOKEN = '\?';
36
+    const NAMED_TOKEN      = ':[a-zA-Z_][a-zA-Z0-9_]*';
37
+
38
+    // Quote characters within string literals can be preceded by a backslash.
39
+    const ESCAPED_SINGLE_QUOTED_TEXT = "'(?:[^'\\\\]|\\\\'|\\\\\\\\)*'";
40
+    const ESCAPED_DOUBLE_QUOTED_TEXT = '"(?:[^"\\\\]|\\\\"|\\\\\\\\)*"';
41
+
35 42
     /**
36 43
      * Get an array of the placeholders in an sql statements as keys and their positions in the query string.
37 44
      *
@@ -49,27 +56,18 @@ class SQLParserUtils
49 56
             return array();
50 57
         }
51 58
 
52
-        $count = 0;
53
-        $inLiteral = false; // a valid query never starts with quotes
54
-        $stmtLen = strlen($statement);
59
+        $token = ($isPositional) ? self::POSITIONAL_TOKEN : self::NAMED_TOKEN;
55 60
         $paramMap = array();
56
-        for ($i = 0; $i < $stmtLen; $i++) {
57
-            if ($statement[$i] == $match && !$inLiteral && ($isPositional || $statement[$i+1] != '=')) {
58
-                // real positional parameter detected
61
+
62
+        foreach (self::getUnquotedStatementFragments($statement) as $fragment) {
63
+            preg_match_all("/$token/", $fragment[0], $matches, PREG_OFFSET_CAPTURE);
64
+            foreach ($matches[0] as $placeholder) {
59 65
                 if ($isPositional) {
60
-                    $paramMap[$count] = $i;
66
+                    $paramMap[] = $placeholder[1] + $fragment[1];
61 67
                 } else {
62
-                    $name = "";
63
-                    // TODO: Something faster/better to match this than regex?
64
-                    for ($j = $i + 1; ($j < $stmtLen && preg_match('(([a-zA-Z0-9_]{1}))', $statement[$j])); $j++) {
65
-                        $name .= $statement[$j];
66
-                    }
67
-                    $paramMap[$i] = $name; // named parameters can be duplicated!
68
-                    $i = $j;
68
+                    $pos = $placeholder[1] + $fragment[1];
69
+                    $paramMap[$pos] = substr($placeholder[0], 1, strlen($placeholder[0]));
69 70
                 }
70
-                ++$count;
71
-            } else if ($statement[$i] == "'" || $statement[$i] == '"') {
72
-                $inLiteral = ! $inLiteral; // switch state!
73 71
             }
74 72
         }
75 73
 
@@ -180,4 +178,23 @@ class SQLParserUtils
180 178
 
181 179
         return array($query, $paramsOrd, $typesOrd);
182 180
     }
183
-}
181
+
182
+    /**
183
+     * Slice the SQL statement around pairs of quotes and
184
+     * return string fragments of SQL outside of quoted literals.
185
+     * Each fragment is captured as a 2-element array:
186
+     *
187
+     * 0 => matched fragment string,
188
+     * 1 => offset of fragment in $statement
189
+     *
190
+     * @param string $statement
191
+     * @return array
192
+     */
193
+    static private function getUnquotedStatementFragments($statement)
194
+    {
195
+        $literal = self::ESCAPED_SINGLE_QUOTED_TEXT . '|' . self::ESCAPED_DOUBLE_QUOTED_TEXT;
196
+        preg_match_all("/([^'\"]+)(?:$literal)?/s", $statement, $fragments, PREG_OFFSET_CAPTURE);
197
+
198
+        return $fragments[1];
199
+    }
200
+}

+ 1 - 1
vendor/doctrine/dbal/lib/Doctrine/DBAL/Version.php View File

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

+ 1 - 1
vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php View File

@@ -154,7 +154,7 @@ class SQLServerPlatformTest extends AbstractPlatformTestCase
154 154
     public function testModifyLimitQueryWithOffset()
155 155
     {
156 156
         $sql = $this->_platform->modifyLimitQuery('SELECT * FROM user ORDER BY username DESC', 10, 5);
157
-        $this->assertEquals('SELECT * FROM (SELECT ROW_NUMBER() OVER (ORDER BY username DESC) AS doctrine_rownum, * FROM user) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 6 AND 15', $sql);
157
+        $this->assertEquals('SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY username DESC) AS doctrine_rownum FROM user) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 6 AND 15', $sql);
158 158
     }
159 159
 
160 160
     public function testModifyLimitQueryWithAscOrderBy()

+ 8 - 0
vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/SQLParserUtilsTest.php View File

@@ -28,6 +28,13 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
28 28
             array("SELECT '?' FROM foo", true, array()),
29 29
             array('SELECT "?" FROM foo WHERE bar = ?', true, array(32)),
30 30
             array("SELECT '?' FROM foo WHERE bar = ?", true, array(32)),
31
+            array(
32
+<<<'SQLDATA'
33
+SELECT * FROM foo WHERE bar = 'it\'s a trap? \\' OR bar = ?
34
+AND baz = "\"quote\" me on it? \\" OR baz = ?
35
+SQLDATA
36
+                , true, array(58, 104)
37
+            ),
31 38
 
32 39
             // named
33 40
             array('SELECT :foo FROM :bar', false, array(7 => 'foo', 17 => 'bar')),
@@ -37,6 +44,7 @@ class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
37 44
             array('SELECT :foo_id', false, array(7 => 'foo_id')), // Ticket DBAL-231
38 45
             array('SELECT @rank := 1', false, array()), // Ticket DBAL-398
39 46
             array('SELECT @rank := 1 AS rank, :foo AS foo FROM :bar', false, array(27 => 'foo', 44 => 'bar')), // Ticket DBAL-398
47
+            array('SELECT * FROM Foo WHERE bar > :start_date AND baz > :start_date', false, array(30 => 'start_date', 52 =>  'start_date')) // Ticket GH-113
40 48
         );
41 49
     }
42 50
 

+ 5 - 1
vendor/doctrine/doctrine-bundle/Doctrine/Bundle/DoctrineBundle/.travis.yml View File

@@ -3,6 +3,10 @@ language: php
3 3
 php:
4 4
   - 5.3
5 5
   - 5.4
6
+  - 5.5
6 7
 
7
-before_script: composer install --dev
8
+matrix:
9
+  allow_failures:
10
+    - php: 5.5
8 11
 
12
+before_script: composer install --dev --prefer-source

+ 1 - 1
vendor/doctrine/orm/composer.json View File

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

+ 66 - 0
vendor/doctrine/orm/lib/Doctrine/ORM/Id/BigIntegerIdentityGenerator.php View File

@@ -0,0 +1,66 @@
1
+<?php
2
+/*
3
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
+ *
15
+ * This software consists of voluntary contributions made by many individuals
16
+ * and is licensed under the MIT license. For more information, see
17
+ * <http://www.doctrine-project.org>.
18
+ */
19
+
20
+namespace Doctrine\ORM\Id;
21
+
22
+use Doctrine\ORM\EntityManager;
23
+
24
+/**
25
+ * Id generator that obtains IDs from special "identity" columns. These are columns
26
+ * that automatically get a database-generated, auto-incremented identifier on INSERT.
27
+ * This generator obtains the last insert id after such an insert.
28
+ */
29
+class BigIntegerIdentityGenerator extends AbstractIdGenerator
30
+{
31
+    /**
32
+     * The name of the sequence to pass to lastInsertId(), if any.
33
+     *
34
+     * @var string
35
+     */
36
+    private $sequenceName;
37
+
38
+    /**
39
+     * Constructor.
40
+     *
41
+     * @param string|null $seqName The name of the sequence to pass to lastInsertId()
42
+     *                             to obtain the last generated identifier within the current
43
+     *                             database session/connection, if any.
44
+     */
45
+    public function __construct($sequenceName = null)
46
+    {
47
+        $this->sequenceName = $sequenceName;
48
+    }
49
+
50
+    /**
51
+     * {@inheritdoc}
52
+     */
53
+    public function generate(EntityManager $em, $entity)
54
+    {
55
+        return (string)$em->getConnection()->lastInsertId($this->sequenceName);
56
+    }
57
+
58
+    /**
59
+     * {@inheritdoc}
60
+     */
61
+    public function isPostInsertGenerator()
62
+    {
63
+        return true;
64
+    }
65
+}
66
+

+ 9 - 5
vendor/doctrine/orm/lib/Doctrine/ORM/Id/IdentityGenerator.php View File

@@ -28,17 +28,21 @@ use Doctrine\ORM\EntityManager;
28 28
  */
29 29
 class IdentityGenerator extends AbstractIdGenerator
30 30
 {
31
-    /** @var string The name of the sequence to pass to lastInsertId(), if any. */
32
-    private $_seqName;
31
+    /**
32
+     * The name of the sequence to pass to lastInsertId(), if any.
33
+     *
34
+     * @var string
35
+     */
36
+    private $sequenceName;
33 37
 
34 38
     /**
35 39
      * @param string $seqName The name of the sequence to pass to lastInsertId()
36 40
      *                        to obtain the last generated identifier within the current
37 41
      *                        database session/connection, if any.
38 42
      */
39
-    public function __construct($seqName = null)
43
+    public function __construct($sequenceName = null)
40 44
     {
41
-        $this->_seqName = $seqName;
45
+        $this->sequenceName = $sequenceName;
42 46
     }
43 47
 
44 48
     /**
@@ -46,7 +50,7 @@ class IdentityGenerator extends AbstractIdGenerator
46 50
      */
47 51
     public function generate(EntityManager $em, $entity)
48 52
     {
49
-        return (int)$em->getConnection()->lastInsertId($this->_seqName);
53
+        return (int)$em->getConnection()->lastInsertId($this->sequenceName);
50 54
     }
51 55
 
52 56
     /**

+ 18 - 12
vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php View File

@@ -19,16 +19,17 @@
19 19
 
20 20
 namespace Doctrine\ORM\Mapping;
21 21
 
22
-use ReflectionException,
23
-    Doctrine\ORM\ORMException,
24
-    Doctrine\ORM\EntityManager,
25
-    Doctrine\DBAL\Platforms,
26
-    Doctrine\ORM\Events,
27
-    Doctrine\Common\Persistence\Mapping\ReflectionService,
28
-    Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface,
29
-    Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory,
30
-    Doctrine\ORM\Id\IdentityGenerator,
31
-    Doctrine\ORM\Event\LoadClassMetadataEventArgs;
22
+use ReflectionException;
23
+use Doctrine\ORM\ORMException;
24
+use Doctrine\ORM\EntityManager;
25
+use Doctrine\DBAL\Platforms;
26
+use Doctrine\ORM\Events;
27
+use Doctrine\Common\Persistence\Mapping\ReflectionService;
28
+use Doctrine\Common\Persistence\Mapping\ClassMetadata as ClassMetadataInterface;
29
+use Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory;
30
+use Doctrine\ORM\Id\IdentityGenerator;
31
+use Doctrine\ORM\Id\BigIntegerIdentityGenerator;
32
+use Doctrine\ORM\Event\LoadClassMetadataEventArgs;
32 33
 
33 34
 /**
34 35
  * The ClassMetadataFactory is used to create ClassMetadata objects that contain all the
@@ -418,9 +419,9 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
418 419
                 // <table>_<column>_seq in PostgreSQL for SERIAL columns.
419 420
                 // Not pretty but necessary and the simplest solution that currently works.
420 421
                 $sequenceName = null;
422
+                $fieldName    = $class->identifier ? $class->getSingleIdentifierFieldName() : null;
421 423
 
422 424
                 if ($this->targetPlatform instanceof Platforms\PostgreSQLPlatform) {
423
-                    $fieldName      = $class->getSingleIdentifierFieldName();
424 425
                     $columnName     = $class->getSingleIdentifierColumnName();
425 426
                     $quoted         = isset($class->fieldMappings[$fieldName]['quoted']) || isset($class->table['quoted']);
426 427
                     $sequenceName   = $class->getTableName() . '_' . $columnName . '_seq';
@@ -435,7 +436,12 @@ class ClassMetadataFactory extends AbstractClassMetadataFactory
435 436
                     $sequenceName = $this->em->getConfiguration()->getQuoteStrategy()->getSequenceName($definition, $class, $this->targetPlatform);
436 437
                 }
437 438
 
438
-                $class->setIdGenerator(new \Doctrine\ORM\Id\IdentityGenerator($sequenceName));
439
+                $generator = ($fieldName && $class->fieldMappings[$fieldName]['type'] === "bigint")
440
+                    ? new BigIntegerIdentityGenerator($sequenceName)
441
+                    : new IdentityGenerator($sequenceName);
442
+
443
+                $class->setIdGenerator($generator);
444
+
439 445
                 break;
440 446
 
441 447
             case ClassMetadata::GENERATOR_TYPE_SEQUENCE:

+ 40 - 17
vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php View File

@@ -1376,6 +1376,10 @@ class UnitOfWork implements PropertyChangedListener
1376 1376
             return self::STATE_NEW;
1377 1377
         }
1378 1378
 
1379
+        if ($class->containsForeignIdentifier) {
1380
+            $id = $this->flattenIdentifier($class, $id);
1381
+        }
1382
+
1379 1383
         switch (true) {
1380 1384
             case ($class->isIdentifierNatural());
1381 1385
                 // Check for a version field, if available, to avoid a db lookup.
@@ -1689,6 +1693,29 @@ class UnitOfWork implements PropertyChangedListener
1689 1693
     }
1690 1694
 
1691 1695
     /**
1696
+     * convert foreign identifiers into scalar foreign key values to avoid object to string conversion failures.
1697
+     *
1698
+     * @param ClassMetadata $class
1699
+     * @param array $id
1700
+     * @return array
1701
+     */
1702
+    private function flattenIdentifier($class, $id)
1703
+    {
1704
+        $flatId = array();
1705
+
1706
+        foreach ($id as $idField => $idValue) {
1707
+            if (isset($class->associationMappings[$idField])) {
1708
+                $targetClassMetadata = $this->em->getClassMetadata($class->associationMappings[$idField]['targetEntity']);
1709
+                $associatedId        = $this->getEntityIdentifier($idValue);
1710
+
1711
+                $flatId[$idField] = $associatedId[$targetClassMetadata->identifier[0]];
1712
+            }
1713
+        }
1714
+
1715
+        return $flatId;
1716
+    }
1717
+
1718
+    /**
1692 1719
      * Executes a merge operation on an entity.
1693 1720
      *
1694 1721
      * @param object $entity
@@ -1735,19 +1762,9 @@ class UnitOfWork implements PropertyChangedListener
1735 1762
 
1736 1763
                 $this->persistNew($class, $managedCopy);
1737 1764
             } else {
1738
-                $flatId = $id;
1739
-                if ($class->containsForeignIdentifier) {
1740
-                    // convert foreign identifiers into scalar foreign key
1741
-                    // values to avoid object to string conversion failures.
1742
-                    foreach ($id as $idField => $idValue) {
1743
-                        if (isset($class->associationMappings[$idField])) {
1744
-                            $targetClassMetadata = $this->em->getClassMetadata($class->associationMappings[$idField]['targetEntity']);
1745
-                            $associatedId        = $this->getEntityIdentifier($idValue);
1746
-
1747
-                            $flatId[$idField] = $associatedId[$targetClassMetadata->identifier[0]];
1748
-                        }
1749
-                    }
1750
-                }
1765
+                $flatId = ($class->containsForeignIdentifier)
1766
+                    ? $this->flattenIdentifier($class, $id)
1767
+                    : $id;
1751 1768
 
1752 1769
                 $managedCopy = $this->tryGetById($flatId, $class->rootEntityName);
1753 1770
 
@@ -2415,17 +2432,23 @@ class UnitOfWork implements PropertyChangedListener
2415 2432
                 if ($entity instanceof NotifyPropertyChanged) {
2416 2433
                     $entity->addPropertyChangedListener($this);
2417 2434
                 }
2435
+
2436
+                // inject ObjectManager into just loaded proxies.
2437
+                if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
2438
+                    $entity->injectObjectManager($this->em, $class);
2439
+                }
2440
+
2418 2441
             } else {
2419 2442
                 $overrideLocalValues = isset($hints[Query::HINT_REFRESH]);
2420 2443
 
2421 2444
                 // If only a specific entity is set to refresh, check that it's the one
2422 2445
                 if(isset($hints[Query::HINT_REFRESH_ENTITY])) {
2423 2446
                     $overrideLocalValues = $hints[Query::HINT_REFRESH_ENTITY] === $entity;
2447
+                }
2424 2448
 
2425
-                    // inject ObjectManager into just loaded proxies.
2426
-                    if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
2427
-                        $entity->injectObjectManager($this->em, $class);
2428
-                    }
2449
+                // inject ObjectManager upon refresh.
2450
+                if ($overrideLocalValues && $entity instanceof ObjectManagerAware) {
2451
+                    $entity->injectObjectManager($this->em, $class);
2429 2452
                 }
2430 2453
             }
2431 2454
 

+ 1 - 1
vendor/doctrine/orm/lib/Doctrine/ORM/Version.php View File

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

+ 18 - 0
vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC117Test.php View File

@@ -461,4 +461,22 @@ class DDC117Test extends \Doctrine\Tests\OrmFunctionalTestCase
461 461
 
462 462
         $this->assertEquals($before + 3, count($data));
463 463
     }
464
+
465
+    /**
466
+     * @group DDC-2246
467
+     */
468
+    public function testGetEntityState()
469
+    {
470
+        $this->article1 = $this->_em->find("Doctrine\Tests\Models\DDC117\DDC117Article", $this->article1->id());
471
+        $this->article2 = $this->_em->find("Doctrine\Tests\Models\DDC117\DDC117Article", $this->article2->id());
472
+
473
+        $this->reference = new DDC117Reference($this->article2, $this->article1, "Test-Description");
474
+
475
+        $this->assertEquals(\Doctrine\ORM\UnitOfWork::STATE_NEW, $this->_em->getUnitOfWork()->getEntityState($this->reference));
476
+
477
+        $idCriteria = array('source' => $this->article1->id(), 'target' => $this->article2->id());
478
+        $reference = $this->_em->find("Doctrine\Tests\Models\DDC117\DDC117Reference", $idCriteria);
479
+
480
+        $this->assertEquals(\Doctrine\ORM\UnitOfWork::STATE_MANAGED, $this->_em->getUnitOfWork()->getEntityState($reference));
481
+    }
464 482
 }

+ 71 - 0
vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC2231Test.php View File

@@ -0,0 +1,71 @@
1
+<?php
2
+
3
+namespace Doctrine\Tests\ORM\Functional\Ticket;
4
+
5
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
6
+
7
+use Doctrine\Common\Persistence\ObjectManager;
8
+
9
+use Doctrine\Common\Persistence\ObjectManagerAware;
10
+
11
+require_once __DIR__ . '/../../../TestInit.php';
12
+
13
+/**
14
+ * @group DDC-2231
15
+ */
16
+class DDC2231Test extends \Doctrine\Tests\OrmFunctionalTestCase
17
+{
18
+    protected function setUp()
19
+    {
20
+        parent::setUp();
21
+        $this->_schemaTool->createSchema(array(
22
+            $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC2231EntityY'),
23
+        ));
24
+    }
25
+
26
+    public function testInjectObjectManagerInProxyIfInitializedInUow()
27
+    {
28
+        $y1 = new DDC2231EntityY;
29
+
30
+        $this->_em->persist($y1);
31
+
32
+        $this->_em->flush();
33
+        $this->_em->clear();
34
+
35
+        $y1ref = $this->_em->getReference(get_class($y1), $y1->id);
36
+
37
+        $this->assertInstanceOf('Doctrine\ORM\Proxy\Proxy', $y1ref);
38
+        $this->assertFalse($y1ref->__isInitialized__);
39
+
40
+        $id = $y1ref->doSomething();
41
+
42
+        $this->assertTrue($y1ref->__isInitialized__);
43
+        $this->assertEquals($this->_em, $y1ref->om);
44
+    }
45
+}
46
+
47
+
48
+/** @Entity @Table(name="ddc2231_y") */
49
+class DDC2231EntityY implements ObjectManagerAware
50
+{
51
+    /**
52
+     * @Id @Column(type="integer") @GeneratedValue
53
+     */
54
+    public $id;
55
+
56
+    public $om;
57
+
58
+    public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata)
59
+    {
60
+        $this->om = $objectManager;
61
+    }
62
+
63
+    public function getId()
64
+    {
65
+        return $this->id;
66
+    }
67
+
68
+    public function doSomething()
69
+    {
70
+    }
71
+}

+ 10 - 12
vendor/doctrine/orm/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php View File

@@ -475,24 +475,22 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
475 475
 
476 476
     /**
477 477
      * @group DDC-889
478
-     * @expectedException Doctrine\ORM\Mapping\MappingException
479
-     * @expectedExceptionMessage Class "Doctrine\Tests\Models\DDC889\DDC889Class" sub class of "Doctrine\Tests\Models\DDC889\DDC889SuperClass" is not a valid entity or mapped super class.
480 478
      */
481 479
     public function testInvalidEntityOrMappedSuperClassShouldMentionParentClasses()
482 480
     {
481
+        $this->setExpectedException('Doctrine\ORM\Mapping\MappingException', 'Class "Doctrine\Tests\Models\DDC889\DDC889Class" sub class of "Doctrine\Tests\Models\DDC889\DDC889SuperClass" is not a valid entity or mapped super class.');
482
+
483 483
         $this->createClassMetadata('Doctrine\Tests\Models\DDC889\DDC889Class');
484 484
     }
485 485
 
486 486
     /**
487 487
      * @group DDC-889
488
-     * @expectedException Doctrine\ORM\Mapping\MappingException
489
-     * @expectedExceptionMessage No identifier/primary key specified for Entity "Doctrine\Tests\Models\DDC889\DDC889Entity" sub class of "Doctrine\Tests\Models\DDC889\DDC889SuperClass". Every Entity must have an identifier/primary key.
490 488
      */
491 489
     public function testIdentifierRequiredShouldMentionParentClasses()
492 490
     {
493
-
494 491
         $factory = $this->createClassMetadataFactory();
495
-        
492
+
493
+        $this->setExpectedException('Doctrine\ORM\Mapping\MappingException', 'No identifier/primary key specified for Entity "Doctrine\Tests\Models\DDC889\DDC889Entity" sub class of "Doctrine\Tests\Models\DDC889\DDC889SuperClass". Every Entity must have an identifier/primary key.');
496 494
         $factory->getMetadataFor('Doctrine\Tests\Models\DDC889\DDC889Entity');
497 495
     }
498 496
 
@@ -509,7 +507,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
509 507
      */
510 508
     public function testNamedNativeQuery()
511 509
     {
512
-        
510
+
513 511
         $class = $this->createClassMetadata('Doctrine\Tests\Models\CMS\CmsAddress');
514 512
 
515 513
         //named native query
@@ -538,7 +536,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
538 536
         $this->assertArrayHasKey('mapping-count', $class->sqlResultSetMappings);
539 537
         $this->assertArrayHasKey('mapping-find-all', $class->sqlResultSetMappings);
540 538
         $this->assertArrayHasKey('mapping-without-fields', $class->sqlResultSetMappings);
541
-        
539
+
542 540
         $findAllMapping = $class->getSqlResultSetMapping('mapping-find-all');
543 541
         $this->assertEquals('mapping-find-all', $findAllMapping['name']);
544 542
         $this->assertEquals('Doctrine\Tests\Models\CMS\CmsAddress', $findAllMapping['entities'][0]['entityClass']);
@@ -550,7 +548,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
550 548
         $this->assertEquals('mapping-without-fields', $withoutFieldsMapping['name']);
551 549
         $this->assertEquals('Doctrine\Tests\Models\CMS\CmsAddress', $withoutFieldsMapping['entities'][0]['entityClass']);
552 550
         $this->assertEquals(array(), $withoutFieldsMapping['entities'][0]['fields']);
553
-        
551
+
554 552
         $countMapping = $class->getSqlResultSetMapping('mapping-count');
555 553
         $this->assertEquals('mapping-count', $countMapping['name']);
556 554
         $this->assertEquals(array('name'=>'count'), $countMapping['columns'][0]);
@@ -638,7 +636,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
638 636
         $adminMetadata  = $factory->getMetadataFor('Doctrine\Tests\Models\DDC964\DDC964Admin');
639 637
         $guestMetadata  = $factory->getMetadataFor('Doctrine\Tests\Models\DDC964\DDC964Guest');
640 638
 
641
-        
639
+
642 640
         // assert groups association mappings
643 641
         $this->assertArrayHasKey('groups', $guestMetadata->associationMappings);
644 642
         $this->assertArrayHasKey('groups', $adminMetadata->associationMappings);
@@ -697,7 +695,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase
697 695
         $this->assertEquals($guestAddress['isCascadeRefresh'], $adminAddress['isCascadeRefresh']);
698 696
         $this->assertEquals($guestAddress['isCascadeMerge'], $adminAddress['isCascadeMerge']);
699 697
         $this->assertEquals($guestAddress['isCascadeDetach'], $adminAddress['isCascadeDetach']);
700
-        
698
+
701 699
         // assert override
702 700
         $this->assertEquals('address_id', $guestAddress['joinColumns'][0]['name']);
703 701
         $this->assertEquals(array('address_id'=>'id'), $guestAddress['sourceToTargetKeyColumns']);
@@ -1071,7 +1069,7 @@ class DDC807Entity
1071 1069
      * @GeneratedValue(strategy="NONE")
1072 1070
      **/
1073 1071
    public $id;
1074
-   
1072
+
1075 1073
    public static function loadMetadata(ClassMetadataInfo $metadata)
1076 1074
     {
1077 1075
          $metadata->mapField(array(

+ 69 - 0
vendor/gedmo/doctrine-extensions/doc/blameable.md View File

@@ -71,6 +71,8 @@ then it updates the blame
71 71
 you need to identify entity as being Blameable. The metadata is loaded only once then
72 72
 cache is activated
73 73
 
74
+Column is a string field:
75
+
74 76
 ``` php
75 77
 <?php
76 78
 namespace Entity;
@@ -134,6 +136,73 @@ class Article
134 136
 }
135 137
 ```
136 138
 
139
+Column is an association:
140
+
141
+``` php
142
+<?php
143
+namespace Entity;
144
+
145
+use Gedmo\Mapping\Annotation as Gedmo;
146
+use Doctrine\ORM\Mapping as ORM;
147
+
148
+/**
149
+ * @ORM\Entity
150
+ */
151
+class Article
152
+{
153
+    /** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
154
+    private $id;
155
+
156
+    /**
157
+     * @ORM\Column(type="string", length=128)
158
+     */
159
+    private $title;
160
+
161
+    /**
162
+     * @var string $createdBy
163
+     *
164
+     * @Gedmo\Blameable(on="create")
165
+     * @ORM\ManyToOne(targetEntity="Path\To\Entity\User")
166
+     * @ORM\JoinColumn(name="created_by", referencedColumnName="id")
167
+     */
168
+    private $createdBy;
169
+
170
+    /**
171
+     * @var string $updatedBy
172
+     *
173
+     * @Gedmo\Blameable(on="update")
174
+     * @ORM\ManyToOne(targetEntity="Path\To\Entity\User")
175
+     * @ORM\JoinColumn(name="updated_by", referencedColumnName="id")
176
+     */
177
+    private $updatedBy;
178
+
179
+    public function getId()
180
+    {
181
+        return $this->id;
182
+    }
183
+
184
+    public function setTitle($title)
185
+    {
186
+        $this->title = $title;
187
+    }
188
+
189
+    public function getTitle()
190
+    {
191
+        return $this->title;
192
+    }
193
+
194
+    public function getCreated()
195
+    {
196
+        return $this->created;
197
+    }
198
+
199
+    public function getUpdated()
200
+    {
201
+        return $this->updated;
202
+    }
203
+}
204
+```
205
+
137 206
 <a name="document-mapping"></a>
138 207
 
139 208
 ## Blameable Document example:

+ 141 - 0
vendor/gedmo/doctrine-extensions/doc/reference_integrity.md View File

@@ -0,0 +1,141 @@
1
+# Reference Integrity behavior extension for Doctrine 2
2
+
3
+**ReferenceIntegrity** behavior will automate the reference integrity for referenced documents.
4
+It works through annotations and yaml, and supports 'nullify' and 'restrict' which throws an exception.
5
+
6
+So let's say you have a Type which is referenced to multiple Articles, when deleting the Type, by default the Article
7
+would still have a reference to Type, since Mongo doesn't care. When setting the ReferenceIntegrity to 'nullify' it
8
+would then automatically remove the reference from Article.
9
+
10
+Features:
11
+
12
+- Automatically remove referenced association
13
+- ODM only
14
+- ReferenceOne and ReferenceMany support
15
+- 'nullify' and 'restrict' support
16
+- Annotation and Yaml mapping support for extensions
17
+
18
+
19
+**Symfony:**
20
+
21
+- **ReferenceIntegrity** is available as [Bundle](http://github.com/stof/StofDoctrineExtensionsBundle)
22
+for **Symfony2**, together with all other extensions
23
+
24
+This article will cover the basic installation and functionality of **ReferenceIntegrity** behavior
25
+
26
+Content:
27
+
28
+- [Including](#including-extension) the extension
29
+- Document [example](#document-mapping)
30
+- [Yaml](#yaml-mapping) mapping example
31
+- Usage [examples](#advanced-examples)
32
+
33
+<a name="including-extension"></a>
34
+
35
+## Setup and autoloading
36
+
37
+Read the [documentation](http://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/annotations.md#em-setup)
38
+or check the [example code](http://github.com/l3pp4rd/DoctrineExtensions/tree/master/example)
39
+on how to setup and use the extensions in most optimized way.
40
+
41
+<a name="document-mapping"></a>
42
+
43
+## ReferenceIntegrity Document example:
44
+
45
+``` php
46
+<?php
47
+namespace Document;
48
+
49
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
50
+use Gedmo\Mapping\Annotation as Gedmo;
51
+
52
+/**
53
+ * @ODM\Document(collection="types")
54
+ */
55
+class Type
56
+{
57
+    /**
58
+     * @ODM\Id
59
+     */
60
+    private $id;
61
+
62
+    /**
63
+     * @ODM\String
64
+     */
65
+    private $title;
66
+
67
+    /**
68
+     * @ODM\ReferenceOne(targetDocument="Article", mappedBy="type")
69
+     * @Gedmo\ReferenceIntegrity("nullify")
70
+     * @var Article
71
+     */
72
+    protected $article;
73
+
74
+    // ...
75
+}
76
+```
77
+
78
+It is necessary to have the 'mappedBy' option set, to be able to access the referenced documents.
79
+On removal of Type, on the referenced Article the Type reference will be nullified (removed)
80
+
81
+<a name="yaml-mapping"></a>
82
+
83
+## Yaml mapping example:
84
+
85
+Yaml mapped Article: **/mapping/yaml/Documents.Article.dcm.yml**
86
+
87
+```
88
+---
89
+Document\Type:
90
+  type: document
91
+  collection: types
92
+  fields:
93
+      id:
94
+          id:     true
95
+      title:
96
+          type:   string
97
+      article:
98
+          reference: true
99
+          type: one
100
+          mappedBy: type
101
+          targetDocument: Document\Article
102
+          gedmo:
103
+              referenceIntegrity: nullify   # or restrict
104
+
105
+```
106
+
107
+It is necessary to have the 'mappedBy' option set, to be able to access the referenced documents.
108
+
109
+<a name="advanced-examples"></a>
110
+
111
+## Usage examples:
112
+
113
+Few operations to see it in action:
114
+
115
+``` php
116
+<?php
117
+$article = new Article;
118
+$article->setTitle('My Article');
119
+
120
+$type = new Type;
121
+$type->setTitle('Published');
122
+
123
+$article = $em->getRepository('Entity\Article')->findByTitle('My Article');
124
+$article->setType($type);
125
+
126
+$em->persist($article);
127
+$em->persist($type);
128
+$em->flush();
129
+
130
+$type = $em->getRepository('Entity\Type')->findByTitle('Published');
131
+$em->remove($type);
132
+$em->flush();
133
+
134
+$article = $em->getRepository('Entity\Article')->findByTitle('My Article');
135
+$article->getType(); // won't be referenced to Type anymore
136
+```
137
+
138
+When 'ReferenceIntegrity' is set to 'restrict' a `ReferenceIntegrityStrictException` will be thrown, only when there
139
+is a referenced document.
140
+
141
+Easy like that, any suggestions on improvements are very welcome

+ 1 - 1
vendor/gedmo/doctrine-extensions/lib/Gedmo/DoctrineExtensions.php View File

@@ -29,7 +29,7 @@ final class DoctrineExtensions
29 29
 
30 30
     /**
31 31
      * Flag if annotations were included into registry
32
-     * allready
32
+     * already
33 33
      *
34 34
      * @var boolean
35 35
      */

+ 17 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Exception/ReferenceIntegrityStrictException.php View File

@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+namespace Gedmo\Exception;
4
+
5
+use Gedmo\Exception;
6
+
7
+/**
8
+ * ReferenceIntegrityStrictException
9
+ *
10
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
11
+ * @package Gedmo.Exception
12
+ * @subpackage ReferenceIntegrityStrictException
13
+ * @link http://www.gediminasm.org
14
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
15
+ */
16
+class ReferenceIntegrityStrictException extends RuntimeException
17
+{}

+ 19 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceIntegrity.php View File

@@ -0,0 +1,19 @@
1
+<?php
2
+
3
+namespace Gedmo\Mapping\Annotation;
4
+
5
+use Doctrine\Common\Annotations\Annotation;
6
+
7
+/**
8
+ * ReferenceIntegrity annotation for ReferenceIntegrity behavioral extension
9
+ *
10
+ * @Annotation
11
+ * @Target("PROPERTY")
12
+ *
13
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
14
+ * @package Gedmo.Mapping.Annotation
15
+ * @subpackage ReferenceIntegrity
16
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
17
+ */
18
+final class ReferenceIntegrity extends Annotation
19
+{}

+ 80 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Driver/Annotation.php View File

@@ -0,0 +1,80 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity\Mapping\Driver;
4
+
5
+use Gedmo\Mapping\Driver\AbstractAnnotationDriver;
6
+use Gedmo\Exception\InvalidMappingException;
7
+use Gedmo\Mapping\Annotation\ReferenceIntegrityAction;
8
+use Gedmo\ReferenceIntegrity\Mapping\Validator;
9
+
10
+/**
11
+ * This is an annotation mapping driver for ReferenceIntegrity
12
+ * behavioral extension. Used for extraction of extended
13
+ * metadata from Annotations specifically for ReferenceIntegrity
14
+ * extension.
15
+ *
16
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
17
+ * @package Gedmo.ReferenceIntegrity.Mapping.Driver
18
+ * @subpackage Annotation
19
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20
+ */
21
+class Annotation extends AbstractAnnotationDriver
22
+{
23
+    /**
24
+     * Annotation to identify the fields which manages the reference integrity
25
+     */
26
+    const REFERENCE_INTEGRITY = 'Gedmo\\Mapping\\Annotation\\ReferenceIntegrity';
27
+
28
+    /**
29
+     * ReferenceIntegrityAction extension annotation
30
+     */
31
+    const ACTION = 'Gedmo\\Mapping\\Annotation\\ReferenceIntegrityAction';
32
+
33
+    /**
34
+     * {@inheritDoc}
35
+     */
36
+    public function readExtendedMetadata($meta, array &$config)
37
+    {
38
+        $validator = new Validator();
39
+        $reflClass = $this->getMetaReflectionClass($meta);
40
+
41
+        foreach ($reflClass->getProperties() as $reflProperty) {
42
+            if ($referenceIntegrity = $this->reader->getPropertyAnnotation($reflProperty, self::REFERENCE_INTEGRITY)) {
43
+                $property = $reflProperty->getName();
44
+                if (!$meta->hasField($property)) {
45
+                    throw new InvalidMappingException(
46
+                        sprintf(
47
+                            "Unable to find reference integrity [%s] as mapped property in entity - %s",
48
+                            $property,
49
+                            $meta->name
50
+                        )
51
+                    );
52
+                }
53
+
54
+                $fieldMapping = $meta->getFieldMapping($property);
55
+                if (!isset($fieldMapping['mappedBy'])) {
56
+                    throw new InvalidMappingException(
57
+                        sprintf(
58
+                            "'mappedBy' should be set on '%s' in '%s'",
59
+                            $property,
60
+                            $meta->name
61
+                        )
62
+                    );
63
+                }
64
+
65
+                if (!in_array($referenceIntegrity->value, $validator->getIntegrityActions())) {
66
+                    throw new InvalidMappingException(
67
+                        sprintf(
68
+                            "Field - [%s] does not have a valid integrity option, [%s] in class - %s",
69
+                            $property,
70
+                            implode($validator->getIntegrityActions(), ', '),
71
+                            $meta->name
72
+                        )
73
+                    );
74
+                }
75
+
76
+                $config['referenceIntegrity'][$property] = $referenceIntegrity->value;
77
+            }
78
+        }
79
+    }
80
+}

+ 85 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Driver/Yaml.php View File

@@ -0,0 +1,85 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity\Mapping\Driver;
4
+
5
+use Gedmo\Exception\InvalidMappingException;
6
+use Gedmo\Mapping\Driver\File;
7
+use Gedmo\Mapping\Driver;
8
+use Gedmo\ReferenceIntegrity\Mapping\Validator;
9
+
10
+/**
11
+ * This is a yaml mapping driver for ReferenceIntegrity
12
+ * extension. Used for extraction of extended
13
+ * metadata from yaml specifically for ReferenceIntegrity
14
+ * extension.
15
+ *
16
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
17
+ * @package Gedmo.ReferenceIntegrity.Mapping.Driver
18
+ * @subpackage Yaml
19
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20
+ */
21
+class Yaml extends File implements Driver
22
+{
23
+    /**
24
+     * File extension
25
+     * @var string
26
+     */
27
+    protected $_extension = '.dcm.yml';
28
+
29
+    /**
30
+     * {@inheritDoc}
31
+     */
32
+    public function readExtendedMetadata($meta, array &$config)
33
+    {
34
+        $mapping = $this->_getMapping($meta->name);
35
+        $validator = new Validator();
36
+
37
+        if (isset($mapping['fields'])) {
38
+            foreach ($mapping['fields'] as $property => $fieldMapping) {
39
+                if (isset($fieldMapping['gedmo']['referenceIntegrity'])) {
40
+                    if (!$meta->hasField($property)) {
41
+                        throw new InvalidMappingException(
42
+                            sprintf(
43
+                                "Unable to find reference integrity [%s] as mapped property in entity - %s",
44
+                                $property,
45
+                                $meta->name
46
+                            )
47
+                        );
48
+                    }
49
+
50
+                    if (empty($mapping['fields'][$property]['mappedBy'])) {
51
+                        throw new InvalidMappingException(
52
+                            sprintf(
53
+                                "'mappedBy' should be set on '%s' in '%s'",
54
+                                $property,
55
+                                $meta->name
56
+                            )
57
+                        );
58
+                    }
59
+
60
+                    if (!in_array($fieldMapping['gedmo']['referenceIntegrity'], $validator->getIntegrityActions())) {
61
+                        throw new InvalidMappingException(
62
+                            sprintf(
63
+                                "Field - [%s] does not have a valid integrity option, [%s] in class - %s",
64
+                                $property,
65
+                                implode($validator->getIntegrityActions(), ', '),
66
+                                $meta->name
67
+                            )
68
+                        );
69
+                    }
70
+
71
+                    $config['referenceIntegrities'][$property][$mapping['fields'][$property]['mappedBy']] =
72
+                        $fieldMapping['gedmo']['referenceIntegrity'];
73
+                }
74
+            }
75
+        }
76
+    }
77
+
78
+    /**
79
+     * {@inheritDoc}
80
+     */
81
+    protected function _loadMappingFile($file)
82
+    {
83
+        return \Symfony\Component\Yaml\Yaml::parse($file);
84
+    }
85
+}

+ 38 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/Mapping/Validator.php View File

@@ -0,0 +1,38 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity\Mapping;
4
+
5
+/**
6
+ * This class is used to validate mapping information
7
+ *
8
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
9
+ * @package Gedmo.ReferenceIntegrity.Mapping
10
+ * @subpackage Validator
11
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
12
+ */
13
+
14
+class Validator
15
+{
16
+    const NULLIFY = 'nullify';
17
+    const RESTRICT = 'restrict';
18
+
19
+    /**
20
+     * List of actions which are valid as integrity check
21
+     *
22
+     * @var array
23
+     */
24
+    private $integrityActions = array(
25
+        self::RESTRICT,
26
+        self::NULLIFY
27
+    );
28
+
29
+    /**
30
+     * Returns a list of available integrity actions
31
+     *
32
+     * @return array
33
+     */
34
+    public function getIntegrityActions()
35
+    {
36
+        return $this->integrityActions;
37
+    }
38
+}

+ 50 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/ReferenceIntegrity.php View File

@@ -0,0 +1,50 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity;
4
+
5
+/**
6
+ * This interface is not necessary but can be implemented for
7
+ * Entities which in some cases needs to be identified te have
8
+ * ReferenceIntegrity checks
9
+ *
10
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
11
+ * @package Gedmo.ReferenceIntegrity
12
+ * @subpackage ReferenceIntegrity
13
+ * @link http://www.gediminasm.org
14
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
15
+ */
16
+interface ReferenceIntegrity
17
+{
18
+    /**
19
+     * ReferenceIntegrity expects certain settings to be required
20
+     * in combination with an association
21
+     */
22
+
23
+    /**
24
+     * example
25
+     * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
26
+     * @Gedmo\ReferenceIntegrity("nullify")
27
+     * @var Article
28
+     */
29
+
30
+    /**
31
+     * example
32
+     * @ODM\ReferenceOne(targetDocument="Article", nullable="true", mappedBy="type")
33
+     * @Gedmo\ReferenceIntegrity("restrict")
34
+     * @var Article
35
+     */
36
+
37
+    /**
38
+     * example
39
+     * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
40
+     * @Gedmo\ReferenceIntegrity("nullify")
41
+     * @var Doctrine\Common\Collections\ArrayCollection
42
+     */
43
+
44
+    /**
45
+     * example
46
+     * @ODM\ReferenceMany(targetDocument="Article", nullable="true", mappedBy="type")
47
+     * @Gedmo\ReferenceIntegrity("restrict")
48
+     * @var Doctrine\Common\Collections\ArrayCollection
49
+     */
50
+}

+ 133 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/ReferenceIntegrity/ReferenceIntegrityListener.php View File

@@ -0,0 +1,133 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity;
4
+
5
+use Doctrine\Common\EventArgs;
6
+use Gedmo\Exception\InvalidMappingException;
7
+use Gedmo\Exception\ReferenceIntegrityStrictException;
8
+use Gedmo\Mapping\MappedEventSubscriber;
9
+use Gedmo\ReferenceIntegrity\Mapping\Validator;
10
+
11
+/**
12
+ * The ReferenceIntegrity listener handles the reference integrity on related entities
13
+ *
14
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
15
+ * @package Gedmo.ReferenceIntegrity
16
+ * @subpackage ReferenceIntegrityListener
17
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
18
+ */
19
+class ReferenceIntegrityListener extends MappedEventSubscriber
20
+{
21
+    /**
22
+     * {@inheritDoc}
23
+     */
24
+    public function getSubscribedEvents()
25
+    {
26
+        return array(
27
+            'loadClassMetadata',
28
+            'preRemove'
29
+        );
30
+    }
31
+
32
+    /**
33
+     * Maps additional metadata for the Entity
34
+     *
35
+     * @param  EventArgs $eventArgs
36
+     * @return void
37
+     */
38
+    public function loadClassMetadata(EventArgs $eventArgs)
39
+    {
40
+        $ea = $this->getEventAdapter($eventArgs);
41
+        $this->loadMetadataForObjectClass($ea->getObjectManager(), $eventArgs->getClassMetadata());
42
+    }
43
+
44
+    /**
45
+     * Looks for referenced objects being removed
46
+     * to nullify the relation or throw an exception
47
+     *
48
+     * @param  EventArgs $args
49
+     * @return void
50
+     */
51
+    public function preRemove(EventArgs $args)
52
+    {
53
+        $ea = $this->getEventAdapter($args);
54
+        $om = $ea->getObjectManager();
55
+        $object = $ea->getObject();
56
+        $class = get_class($object);
57
+        $meta = $om->getClassMetadata($class);
58
+
59
+        if ($config = $this->getConfiguration($om, $class)) {
60
+            foreach ($config['referenceIntegrity'] as $property => $action) {
61
+                $reflProp = $meta->getReflectionProperty($property);
62
+                $refDoc = $reflProp->getValue($object);
63
+                $fieldMapping = $meta->getFieldMapping($property);
64
+
65
+                switch ($action) {
66
+                    case Validator::NULLIFY:
67
+                        if (!isset($fieldMapping['mappedBy'])) {
68
+                            throw new InvalidMappingException(
69
+                                sprintf(
70
+                                    "Reference '%s' on '%s' should have 'mappedBy' option defined",
71
+                                    $property,
72
+                                    $meta->name
73
+                                )
74
+                            );
75
+                        }
76
+
77
+                        $subMeta = $om->getClassMetadata($fieldMapping['targetDocument']);
78
+
79
+                        if (!$subMeta->hasField($fieldMapping['mappedBy'])) {
80
+                            throw new InvalidMappingException(
81
+                                sprintf(
82
+                                    "Unable to find reference integrity [%s] as mapped property in entity - %s",
83
+                                    $fieldMapping['mappedBy'],
84
+                                    $fieldMapping['targetDocument']
85
+                                )
86
+                            );
87
+                        }
88
+
89
+                        $refReflProp = $subMeta->getReflectionProperty($fieldMapping['mappedBy']);
90
+
91
+                        if ($meta->isCollectionValuedReference($property)) {
92
+                            foreach ($refDoc as $object) {
93
+                                $refReflProp->setValue($object, null);
94
+                                $om->persist($object);
95
+                            }
96
+                        } else {
97
+                            $refReflProp->setValue($refDoc, null);
98
+                            $om->persist($refDoc);
99
+                        }
100
+
101
+                        break;
102
+                    case Validator::RESTRICT:
103
+                        if ($meta->isCollectionValuedReference($property) && $refDoc->count() > 0) {
104
+                            throw new ReferenceIntegrityStrictException(
105
+                                sprintf(
106
+                                    "The reference integrity for the '%s' collection is restricted",
107
+                                    $fieldMapping['targetDocument']
108
+                                )
109
+                            );
110
+                        }
111
+                        if ($meta->isSingleValuedReference($property) && !is_null($refDoc)) {
112
+                            throw new ReferenceIntegrityStrictException(
113
+                                sprintf(
114
+                                    "The reference integrity for the '%s' document is restricted",
115
+                                    $fieldMapping['targetDocument']
116
+                                )
117
+                            );
118
+                        }
119
+
120
+                        break;
121
+                }
122
+            }
123
+        }
124
+    }
125
+
126
+    /**
127
+     * {@inheritDoc}
128
+     */
129
+    protected function getNamespace()
130
+    {
131
+        return __NAMESPACE__;
132
+    }
133
+}

+ 2 - 2
vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableDocument.php View File

@@ -22,10 +22,10 @@ trait SoftDeleteableDocument
22 22
     /**
23 23
      * Sets deletedAt.
24 24
      *
25
-     * @param  Datetime $deletedAt
25
+     * @param \Datetime|null $deletedAt
26 26
      * @return $this
27 27
      */
28
-    public function setDeletedAt(\DateTime $deletedAt)
28
+    public function setDeletedAt(\DateTime $deletedAt = null)
29 29
     {
30 30
         $this->deletedAt = $deletedAt;
31 31
 

+ 2 - 2
vendor/gedmo/doctrine-extensions/lib/Gedmo/SoftDeleteable/Traits/SoftDeleteableEntity.php View File

@@ -22,10 +22,10 @@ trait SoftDeleteableEntity
22 22
     /**
23 23
      * Sets deletedAt.
24 24
      *
25
-     * @param  Datetime $deletedAt
25
+     * @param \Datetime|null $deletedAt
26 26
      * @return $this
27 27
      */
28
-    public function setDeletedAt(\DateTime $deletedAt)
28
+    public function setDeletedAt(\DateTime $deletedAt = null)
29 29
     {
30 30
         $this->deletedAt = $deletedAt;
31 31
 

+ 1 - 1
vendor/gedmo/doctrine-extensions/lib/Gedmo/Sortable/SortableListener.php View File

@@ -321,7 +321,7 @@ class SortableListener extends MappedEventSubscriber
321 321
                 // now walk through the unit of work in memory objects and sync those
322 322
                 foreach ($em->getUnitOfWork()->getIdentityMap() as $className => $objects) {
323 323
                     // for inheritance mapped classes, only root is always in the identity map
324
-                    if ($className !== $meta->rootEntityName) {
324
+                    if ($className !== $meta->rootEntityName || !$this->getConfiguration($em, $className)) {
325 325
                         continue;
326 326
                     }
327 327
                     foreach ($objects as $object) {

+ 1 - 1
vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/Mapping/Driver/Annotation.php View File

@@ -13,7 +13,7 @@ use Gedmo\Mapping\Driver\AbstractAnnotationDriver,
13 13
  * extension.
14 14
  *
15 15
  * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
16
- * @package Gedmo.Translatable.Mapping.Driver
16
+ * @package Gedmo.Timestampable.Mapping.Driver
17 17
  * @subpackage Annotation
18 18
  * @link http://www.gediminasm.org
19 19
  * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

+ 2 - 2
vendor/gedmo/doctrine-extensions/lib/Gedmo/Timestampable/Traits/TimestampableEntity.php View File

@@ -17,13 +17,13 @@ trait TimestampableEntity
17 17
      * @Gedmo\Timestampable(on="create")
18 18
      * @ORM\Column(type="datetime")
19 19
      */
20
-    private $createdAt;
20
+    protected $createdAt;
21 21
 
22 22
     /**
23 23
      * @Gedmo\Timestampable(on="update")
24 24
      * @ORM\Column(type="datetime")
25 25
      */
26
-    private $updatedAt;
26
+    protected $updatedAt;
27 27
 
28 28
     /**
29 29
      * Sets createdAt.

+ 67 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Article.php View File

@@ -0,0 +1,67 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\ManyNullify;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+
7
+/**
8
+ * @ODM\Document(collection="articles")
9
+ */
10
+class Article
11
+{
12
+    /**
13
+     * @ODM\Id
14
+     */
15
+    private $id;
16
+
17
+    /**
18
+     * @ODM\String
19
+     */
20
+    private $title;
21
+
22
+    /**
23
+     * @ODM\ReferenceOne(targetDocument="Type", simple="true", inversedBy="articles")
24
+     * @var Type
25
+     */
26
+    private $type;
27
+
28
+    /**
29
+     * @return mixed
30
+     */
31
+    public function getId()
32
+    {
33
+        return $this->id;
34
+    }
35
+
36
+    /**
37
+     * @param string $title
38
+     */
39
+    public function setTitle($title)
40
+    {
41
+        $this->title = $title;
42
+    }
43
+
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getTitle()
48
+    {
49
+        return $this->title;
50
+    }
51
+
52
+    /**
53
+     * @param Type $type
54
+     */
55
+    public function setType(Type $type)
56
+    {
57
+        $this->type = $type;
58
+    }
59
+
60
+    /**
61
+     * @return Type
62
+     */
63
+    public function getType()
64
+    {
65
+        return $this->type;
66
+    }
67
+}

+ 100 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyNullify/Type.php View File

@@ -0,0 +1,100 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\ManyNullify;
4
+
5
+use Doctrine\Common\Collections\ArrayCollection;
6
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
7
+use Gedmo\Mapping\Annotation as Gedmo;
8
+
9
+/**
10
+ * @ODM\Document(collection="types")
11
+ */
12
+class Type
13
+{
14
+    /**
15
+     * @ODM\Id
16
+     */
17
+    private $id;
18
+
19
+    /**
20
+     * @ODM\String
21
+     */
22
+    private $title;
23
+
24
+    /**
25
+     * @ODM\String
26
+     */
27
+    private $identifier;
28
+
29
+    /**
30
+     * @ODM\ReferenceMany(targetDocument="Article", mappedBy="type")
31
+     * @Gedmo\ReferenceIntegrity("nullify")
32
+     * @var ArrayCollection
33
+     */
34
+    protected $articles = array();
35
+
36
+    public function __construct()
37
+    {
38
+        $this->articles = new ArrayCollection();
39
+    }
40
+
41
+    /**
42
+     * @return mixed
43
+     */
44
+    public function getId()
45
+    {
46
+        return $this->id;
47
+    }
48
+
49
+    /**
50
+     * @param string $title
51
+     */
52
+    public function setTitle($title)
53
+    {
54
+        $this->title = $title;
55
+    }
56
+
57
+    /**
58
+     * @return string
59
+     */
60
+    public function getTitle()
61
+    {
62
+        return $this->title;
63
+    }
64
+
65
+    /**
66
+     * @param string $identifier
67
+     */
68
+    public function setIdentifier($identifier)
69
+    {
70
+        $this->identifier = $identifier;
71
+    }
72
+
73
+    /**
74
+     * @return string
75
+     */
76
+    public function getIdentifier()
77
+    {
78
+        return $this->identifier;
79
+    }
80
+
81
+    /**
82
+     * Add articles
83
+     *
84
+     * @param Article $article
85
+     */
86
+    public function addArticle(Article $article)
87
+    {
88
+        $this->articles[] = $article;
89
+    }
90
+
91
+    /**
92
+     * Get posts
93
+     *
94
+     * @return ArrayCollection $articles
95
+     */
96
+    public function getArticles()
97
+    {
98
+        return $this->articles;
99
+    }
100
+}

+ 67 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Article.php View File

@@ -0,0 +1,67 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\ManyRestrict;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+
7
+/**
8
+ * @ODM\Document(collection="articles")
9
+ */
10
+class Article
11
+{
12
+    /**
13
+     * @ODM\Id
14
+     */
15
+    private $id;
16
+
17
+    /**
18
+     * @ODM\String
19
+     */
20
+    private $title;
21
+
22
+    /**
23
+     * @ODM\ReferenceOne(targetDocument="Type", simple="true", inversedBy="articles")
24
+     * @var Type
25
+     */
26
+    private $type;
27
+
28
+    /**
29
+     * @return mixed
30
+     */
31
+    public function getId()
32
+    {
33
+        return $this->id;
34
+    }
35
+
36
+    /**
37
+     * @param string $title
38
+     */
39
+    public function setTitle($title)
40
+    {
41
+        $this->title = $title;
42
+    }
43
+
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getTitle()
48
+    {
49
+        return $this->title;
50
+    }
51
+
52
+    /**
53
+     * @param Type $type
54
+     */
55
+    public function setType(Type $type)
56
+    {
57
+        $this->type = $type;
58
+    }
59
+
60
+    /**
61
+     * @return Type
62
+     */
63
+    public function getType()
64
+    {
65
+        return $this->type;
66
+    }
67
+}

+ 100 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/ManyRestrict/Type.php View File

@@ -0,0 +1,100 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\ManyRestrict;
4
+
5
+use Doctrine\Common\Collections\ArrayCollection;
6
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
7
+use Gedmo\Mapping\Annotation as Gedmo;
8
+
9
+/**
10
+ * @ODM\Document(collection="types")
11
+ */
12
+class Type
13
+{
14
+    /**
15
+     * @ODM\Id
16
+     */
17
+    private $id;
18
+
19
+    /**
20
+     * @ODM\String
21
+     */
22
+    private $title;
23
+
24
+    /**
25
+     * @ODM\String
26
+     */
27
+    private $identifier;
28
+
29
+    /**
30
+     * @ODM\ReferenceMany(targetDocument="Article", mappedBy="type")
31
+     * @Gedmo\ReferenceIntegrity("restrict")
32
+     * @var ArrayCollection
33
+     */
34
+    protected $articles = array();
35
+
36
+    public function __construct()
37
+    {
38
+        $this->articles = new ArrayCollection();
39
+    }
40
+
41
+    /**
42
+     * @return mixed
43
+     */
44
+    public function getId()
45
+    {
46
+        return $this->id;
47
+    }
48
+
49
+    /**
50
+     * @param string $title
51
+     */
52
+    public function setTitle($title)
53
+    {
54
+        $this->title = $title;
55
+    }
56
+
57
+    /**
58
+     * @return string
59
+     */
60
+    public function getTitle()
61
+    {
62
+        return $this->title;
63
+    }
64
+
65
+    /**
66
+     * @param string $identifier
67
+     */
68
+    public function setIdentifier($identifier)
69
+    {
70
+        $this->identifier = $identifier;
71
+    }
72
+
73
+    /**
74
+     * @return string
75
+     */
76
+    public function getIdentifier()
77
+    {
78
+        return $this->identifier;
79
+    }
80
+
81
+    /**
82
+     * Add articles
83
+     *
84
+     * @param Article $article
85
+     */
86
+    public function addArticle(Article $article)
87
+    {
88
+        $this->articles[] = $article;
89
+    }
90
+
91
+    /**
92
+     * Get posts
93
+     *
94
+     * @return ArrayCollection $articles
95
+     */
96
+    public function getArticles()
97
+    {
98
+        return $this->articles;
99
+    }
100
+}

+ 67 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Article.php View File

@@ -0,0 +1,67 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\OneNullify;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+
7
+/**
8
+ * @ODM\Document(collection="articles")
9
+ */
10
+class Article
11
+{
12
+    /**
13
+     * @ODM\Id
14
+     */
15
+    private $id;
16
+
17
+    /**
18
+     * @ODM\String
19
+     */
20
+    private $title;
21
+
22
+    /**
23
+     * @ODM\ReferenceOne(targetDocument="Type", simple="true", inversedBy="articles")
24
+     * @var Type
25
+     */
26
+    private $type;
27
+
28
+    /**
29
+     * @return mixed
30
+     */
31
+    public function getId()
32
+    {
33
+        return $this->id;
34
+    }
35
+
36
+    /**
37
+     * @param string $title
38
+     */
39
+    public function setTitle($title)
40
+    {
41
+        $this->title = $title;
42
+    }
43
+
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getTitle()
48
+    {
49
+        return $this->title;
50
+    }
51
+
52
+    /**
53
+     * @param Type $type
54
+     */
55
+    public function setType(Type $type)
56
+    {
57
+        $this->type = $type;
58
+    }
59
+
60
+    /**
61
+     * @return Type
62
+     */
63
+    public function getType()
64
+    {
65
+        return $this->type;
66
+    }
67
+}

+ 90 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneNullify/Type.php View File

@@ -0,0 +1,90 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\OneNullify;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+use Gedmo\Mapping\Annotation as Gedmo;
7
+
8
+/**
9
+ * @ODM\Document(collection="types")
10
+ */
11
+class Type
12
+{
13
+    /**
14
+     * @ODM\Id
15
+     */
16
+    private $id;
17
+
18
+    /**
19
+     * @ODM\String
20
+     */
21
+    private $title;
22
+
23
+    /**
24
+     * @ODM\String
25
+     */
26
+    private $identifier;
27
+
28
+    /**
29
+     * @ODM\ReferenceOne(targetDocument="Article", mappedBy="type")
30
+     * @Gedmo\ReferenceIntegrity("nullify")
31
+     * @var Article
32
+     */
33
+    protected $article;
34
+
35
+    /**
36
+     * @return mixed
37
+     */
38
+    public function getId()
39
+    {
40
+        return $this->id;
41
+    }
42
+
43
+    /**
44
+     * @param string $title
45
+     */
46
+    public function setTitle($title)
47
+    {
48
+        $this->title = $title;
49
+    }
50
+
51
+    /**
52
+     * @return string
53
+     */
54
+    public function getTitle()
55
+    {
56
+        return $this->title;
57
+    }
58
+
59
+    /**
60
+     * @param string $identifier
61
+     */
62
+    public function setIdentifier($identifier)
63
+    {
64
+        $this->identifier = $identifier;
65
+    }
66
+
67
+    /**
68
+     * @return string
69
+     */
70
+    public function getIdentifier()
71
+    {
72
+        return $this->identifier;
73
+    }
74
+
75
+    /**
76
+     * @param Article $article
77
+     */
78
+    public function setArticle(Article $article)
79
+    {
80
+        $this->article = $article;
81
+    }
82
+
83
+    /**
84
+     * @return Article $article
85
+     */
86
+    public function getArticle()
87
+    {
88
+        return $this->article;
89
+    }
90
+}

+ 67 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Article.php View File

@@ -0,0 +1,67 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\OneRestrict;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+
7
+/**
8
+ * @ODM\Document(collection="articles")
9
+ */
10
+class Article
11
+{
12
+    /**
13
+     * @ODM\Id
14
+     */
15
+    private $id;
16
+
17
+    /**
18
+     * @ODM\String
19
+     */
20
+    private $title;
21
+
22
+    /**
23
+     * @ODM\ReferenceOne(targetDocument="Type", simple="true", inversedBy="articles")
24
+     * @var Type
25
+     */
26
+    private $type;
27
+
28
+    /**
29
+     * @return mixed
30
+     */
31
+    public function getId()
32
+    {
33
+        return $this->id;
34
+    }
35
+
36
+    /**
37
+     * @param string $title
38
+     */
39
+    public function setTitle($title)
40
+    {
41
+        $this->title = $title;
42
+    }
43
+
44
+    /**
45
+     * @return string
46
+     */
47
+    public function getTitle()
48
+    {
49
+        return $this->title;
50
+    }
51
+
52
+    /**
53
+     * @param Type $type
54
+     */
55
+    public function setType(Type $type)
56
+    {
57
+        $this->type = $type;
58
+    }
59
+
60
+    /**
61
+     * @return Type
62
+     */
63
+    public function getType()
64
+    {
65
+        return $this->type;
66
+    }
67
+}

+ 90 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/Fixture/Document/OneRestrict/Type.php View File

@@ -0,0 +1,90 @@
1
+<?php
2
+
3
+namespace ReferenceIntegrity\Fixture\Document\OneRestrict;
4
+
5
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
6
+use Gedmo\Mapping\Annotation as Gedmo;
7
+
8
+/**
9
+ * @ODM\Document(collection="types")
10
+ */
11
+class Type
12
+{
13
+    /**
14
+     * @ODM\Id
15
+     */
16
+    private $id;
17
+
18
+    /**
19
+     * @ODM\String
20
+     */
21
+    private $title;
22
+
23
+    /**
24
+     * @ODM\String
25
+     */
26
+    private $identifier;
27
+
28
+    /**
29
+     * @ODM\ReferenceOne(targetDocument="Article", mappedBy="type")
30
+     * @Gedmo\ReferenceIntegrity("restrict")
31
+     * @var Article
32
+     */
33
+    protected $article;
34
+
35
+    /**
36
+     * @return mixed
37
+     */
38
+    public function getId()
39
+    {
40
+        return $this->id;
41
+    }
42
+
43
+    /**
44
+     * @param string $title
45
+     */
46
+    public function setTitle($title)
47
+    {
48
+        $this->title = $title;
49
+    }
50
+
51
+    /**
52
+     * @return string
53
+     */
54
+    public function getTitle()
55
+    {
56
+        return $this->title;
57
+    }
58
+
59
+    /**
60
+     * @param string $identifier
61
+     */
62
+    public function setIdentifier($identifier)
63
+    {
64
+        $this->identifier = $identifier;
65
+    }
66
+
67
+    /**
68
+     * @return string
69
+     */
70
+    public function getIdentifier()
71
+    {
72
+        return $this->identifier;
73
+    }
74
+
75
+    /**
76
+     * @param Article $article
77
+     */
78
+    public function setArticle(Article $article)
79
+    {
80
+        $this->article = $article;
81
+    }
82
+
83
+    /**
84
+     * @return Article $articles
85
+     */
86
+    public function getArticle()
87
+    {
88
+        return $this->article;
89
+    }
90
+}

+ 195 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/ReferenceIntegrity/ReferenceIntegrityDocumentTest.php View File

@@ -0,0 +1,195 @@
1
+<?php
2
+
3
+namespace Gedmo\ReferenceIntegrity;
4
+
5
+use Doctrine\Common\EventManager;
6
+use Gedmo\ReferenceIntegrity\ReferenceIntegrityListener;
7
+use Tool\BaseTestCaseMongoODM;
8
+
9
+/**
10
+ * These are tests for the ReferenceIntegrity extension
11
+ *
12
+ * @author Evert Harmeling <evert.harmeling@freshheads.com>
13
+ * @package Gedmo.ReferenceIntegrity
14
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
15
+ */
16
+class ReferenceIntegrityDocumentTest extends BaseTestCaseMongoODM
17
+{
18
+    const TYPE_ONE_NULLIFY_CLASS = 'ReferenceIntegrity\Fixture\Document\OneNullify\Type';
19
+    const ARTICLE_ONE_NULLIFY_CLASS = 'ReferenceIntegrity\Fixture\Document\OneNullify\Article';
20
+
21
+    const TYPE_MANY_NULLIFY_CLASS = 'ReferenceIntegrity\Fixture\Document\ManyNullify\Type';
22
+    const ARTICLE_MANY_NULLIFY_CLASS = 'ReferenceIntegrity\Fixture\Document\ManyNullify\Article';
23
+
24
+    const TYPE_ONE_RESTRICT_CLASS = 'ReferenceIntegrity\Fixture\Document\OneRestrict\Type';
25
+    const ARTICLE_ONE_RESTRICT_CLASS = 'ReferenceIntegrity\Fixture\Document\OneRestrict\Article';
26
+
27
+    const TYPE_MANY_RESTRICT_CLASS = 'ReferenceIntegrity\Fixture\Document\ManyRestrict\Type';
28
+    const ARTICLE_MANY_RESTRICT_CLASS = 'ReferenceIntegrity\Fixture\Document\ManyRestrict\Article';
29
+
30
+    protected function setUp()
31
+    {
32
+        parent::setUp();
33
+
34
+        $evm = new EventManager();
35
+        $evm->addEventSubscriber(new ReferenceIntegrityListener());
36
+
37
+        $this->dm = $this->getMockDocumentManager($evm, $this->getMockAnnotatedConfig());
38
+
39
+        $this->populateOneNullify();
40
+        $this->populateManyNullify();
41
+
42
+        $this->populateOneRestrict();
43
+        $this->populateManyRestrict();
44
+    }
45
+
46
+    public function testOneNullify()
47
+    {
48
+        $type = $this->dm->getRepository(self::TYPE_ONE_NULLIFY_CLASS)
49
+            ->findOneByTitle('One Nullify Type');
50
+
51
+        $this->assertFalse(is_null($type));
52
+        $this->assertTrue(is_object($type));
53
+
54
+        $this->dm->remove($type);
55
+        $this->dm->flush();
56
+
57
+        $type = $this->dm->getRepository(self::TYPE_ONE_NULLIFY_CLASS)
58
+            ->findOneByTitle('One Nullify Type');
59
+        $this->assertNull($type);
60
+
61
+        $article = $this->dm->getRepository(self::ARTICLE_ONE_NULLIFY_CLASS)
62
+            ->findOneByTitle('One Nullify Article');
63
+
64
+        $this->assertNull($article->getType());
65
+
66
+        $this->dm->clear();
67
+    }
68
+
69
+    public function testManyNullify()
70
+    {
71
+        $type = $this->dm->getRepository(self::TYPE_MANY_NULLIFY_CLASS)
72
+            ->findOneByTitle('Many Nullify Type');
73
+
74
+        $this->assertFalse(is_null($type));
75
+        $this->assertTrue(is_object($type));
76
+
77
+        $this->dm->remove($type);
78
+        $this->dm->flush();
79
+
80
+        $type = $this->dm->getRepository(self::TYPE_MANY_NULLIFY_CLASS)
81
+            ->findOneByTitle('Many Nullify Type');
82
+        $this->assertNull($type);
83
+
84
+        $article = $this->dm->getRepository(self::ARTICLE_MANY_NULLIFY_CLASS)
85
+            ->findOneByTitle('Many Nullify Article');
86
+
87
+        $this->assertNull($article->getType());
88
+
89
+        $this->dm->clear();
90
+    }
91
+
92
+    /**
93
+     * @test
94
+     * @expectedException Gedmo\Exception\ReferenceIntegrityStrictException
95
+     */
96
+    public function testOneRestrict()
97
+    {
98
+        $type = $this->dm->getRepository(self::TYPE_ONE_RESTRICT_CLASS)
99
+            ->findOneByTitle('One Restrict Type');
100
+
101
+        $this->assertFalse(is_null($type));
102
+        $this->assertTrue(is_object($type));
103
+
104
+        $this->dm->remove($type);
105
+        $this->dm->flush();
106
+    }
107
+
108
+    /**
109
+     * @test
110
+     * @expectedException Gedmo\Exception\ReferenceIntegrityStrictException
111
+     */
112
+    public function testManyRestrict()
113
+    {
114
+        $type = $this->dm->getRepository(self::TYPE_MANY_RESTRICT_CLASS)
115
+            ->findOneByTitle('Many Restrict Type');
116
+
117
+        $this->assertFalse(is_null($type));
118
+        $this->assertTrue(is_object($type));
119
+
120
+        $this->dm->remove($type);
121
+        $this->dm->flush();
122
+    }
123
+
124
+    private function populateOneNullify()
125
+    {
126
+        $typeClass = self::TYPE_ONE_NULLIFY_CLASS;
127
+        $type = new $typeClass();
128
+        $type->setTitle('One Nullify Type');
129
+
130
+        $articleClass = self::ARTICLE_ONE_NULLIFY_CLASS;
131
+        $article = new $articleClass();
132
+        $article->setTitle('One Nullify Article');
133
+        $article->setType($type);
134
+
135
+        $this->dm->persist($article);
136
+        $this->dm->persist($type);
137
+
138
+        $this->dm->flush();
139
+        $this->dm->clear();
140
+    }
141
+
142
+    private function populateManyNullify()
143
+    {
144
+        $typeClass = self::TYPE_MANY_NULLIFY_CLASS;
145
+        $type = new $typeClass();
146
+        $type->setTitle('Many Nullify Type');
147
+
148
+        $articleClass = self::ARTICLE_MANY_NULLIFY_CLASS;
149
+        $article = new $articleClass();
150
+        $article->setTitle('Many Nullify Article');
151
+        $article->setType($type);
152
+
153
+        $this->dm->persist($article);
154
+        $this->dm->persist($type);
155
+
156
+        $this->dm->flush();
157
+        $this->dm->clear();
158
+    }
159
+
160
+    private function populateOneRestrict()
161
+    {
162
+        $typeClass = self::TYPE_ONE_RESTRICT_CLASS;
163
+        $type = new $typeClass();
164
+        $type->setTitle('One Restrict Type');
165
+
166
+        $articleClass = self::ARTICLE_ONE_RESTRICT_CLASS;
167
+        $article = new $articleClass();
168
+        $article->setTitle('One Restrict Article');
169
+        $article->setType($type);
170
+
171
+        $this->dm->persist($article);
172
+        $this->dm->persist($type);
173
+
174
+        $this->dm->flush();
175
+        $this->dm->clear();
176
+    }
177
+
178
+    private function populateManyRestrict()
179
+    {
180
+        $typeClass = self::TYPE_MANY_RESTRICT_CLASS;
181
+        $type = new $typeClass();
182
+        $type->setTitle('Many Restrict Type');
183
+
184
+        $articleClass = self::ARTICLE_MANY_RESTRICT_CLASS;
185
+        $article = new $articleClass();
186
+        $article->setTitle('Many Restrict Article');
187
+        $article->setType($type);
188
+
189
+        $this->dm->persist($article);
190
+        $this->dm->persist($type);
191
+
192
+        $this->dm->flush();
193
+        $this->dm->clear();
194
+    }
195
+}

+ 1 - 0
vendor/gedmo/doctrine-extensions/tests/bootstrap.php View File

@@ -49,6 +49,7 @@ $loader->add('Loggable\\Fixture', __DIR__ . '/Gedmo');
49 49
 $loader->add('SoftDeleteable\\Fixture', __DIR__ . '/Gedmo');
50 50
 $loader->add('Uploadable\\Fixture', __DIR__ . '/Gedmo');
51 51
 $loader->add('Wrapper\\Fixture', __DIR__ . '/Gedmo');
52
+$loader->add('ReferenceIntegrity\\Fixture', __DIR__ . '/Gedmo');
52 53
 // stubs
53 54
 $loader->add('Gedmo\\Uploadable\\Stub', __DIR__);
54 55
 

+ 3 - 0
vendor/gedmo/doctrine-extensions/tests/phpunit.xml.dist View File

@@ -50,6 +50,9 @@
50 50
         <testsuite name="Uploadable Extension">
51 51
             <directory suffix="Test.php">./Gedmo/Uploadable/</directory>
52 52
         </testsuite>
53
+        <testsuite name="ReferenceIntegrity Extension">
54
+            <directory suffix="Test.php">./Gedmo/ReferenceIntegrity/</directory>
55
+        </testsuite>
53 56
     </testsuites>
54 57
 
55 58
     <filter>

+ 86 - 14
vendor/jdorn/sql-formatter/README.md View File

@@ -1,8 +1,9 @@
1 1
 SqlFormatter
2 2
 =============
3 3
 
4
-A lightweight php class for formatting sql statements.  Handles automatic
5
-indentation and syntax highlighting.
4
+A lightweight php class for formatting sql statements.
5
+
6
+It can automatically indent and add line breaks in addition to syntax highlighting.
6 7
 
7 8
 History
8 9
 ============
@@ -29,25 +30,77 @@ Sample usage:
29 30
 <?php
30 31
 require_once('SqlFormatter.php');
31 32
 
32
-echo SqlFormatter::format("SELECT * FROM MyTable LIMIT 10");
33
+$query = "SELECT count(*),`Column1`,`Testing`, `Testing Three` FROM `Table1`
34
+    WHERE Column1 = 'testing' AND ( (`Column2` = `Column3` OR Column4 >= NOW()) )
35
+    GROUP BY Column1 ORDER BY Column3 DESC LIMIT 5,10";
36
+
37
+echo SqlFormatter::format($query);
38
+```
39
+
40
+Output:
41
+
42
+![](http://jdorn.github.com/sql-formatter/format-highlight.png)
43
+
44
+Formatting Only
45
+-------------------------
46
+If you don't want syntax highlighting and only want the indentations and 
47
+line breaks, pass in false as the second parameter.
48
+
49
+This is useful for outputting to error logs or other non-html formats.
50
+
51
+```php
52
+<?php
53
+echo SqlFormatter::format($query, false);
33 54
 ```
34 55
 
35
-Sample output:
56
+Output:
36 57
 
37
-![](http://github.com/jdorn/sql-formatter/raw/master/examples/SqlFormatterExample.png)
58
+![](http://jdorn.github.com/sql-formatter/format.png)
38 59
 
39 60
 Syntax Highlighting Only
40 61
 -------------------------
41 62
 
42
-There is also a static method 'highlight' that only does syntax highlighting 
43
-and preserves all original whitespace.
63
+There is a separate method 'highlight' that preserves all original whitespace
64
+and just adds syntax highlighting.
44 65
 
45 66
 This is useful for sql that is already well formatted and just needs to be a little
46 67
 easier to read.
47 68
 
48 69
 ```php
49 70
 <?php
50
-echo SqlFormatter::highlight("SELECT * FROM MyTable LIMIT 10");
71
+echo SqlFormatter::highlight($query);
72
+```
73
+
74
+Output:
75
+
76
+![](http://jdorn.github.com/sql-formatter/highlight.png)
77
+
78
+Remove Comments
79
+------------------------
80
+
81
+There is a removeComments method that, you guessed it, removes all comments from a query.
82
+
83
+```
84
+-- This is a comment
85
+    SELECT
86
+    /* This is another comment
87
+    On more than one line */
88
+    Id #This is one final comment
89
+    as temp, DateCreated as Created FROM MyTable;
90
+```
91
+
92
+```php
93
+<?php
94
+echo SqlFormatter::removeComments($query);
95
+```
96
+
97
+Output:
98
+```
99
+
100
+    SELECT
101
+    
102
+    Id 
103
+    as temp, DateCreated as Created FROM MyTable;
51 104
 ```
52 105
 
53 106
 Split SQL String into Queries
@@ -67,14 +120,24 @@ SELECT * FROM MyTable;
67 120
 ```
68 121
 
69 122
 ```php
123
+<?php
70 124
 $queries = SqlFormatter::splitQuery($sql);
71 125
 ```
72
-$queries is now an array of the 4 queries without trailing semicolons.
73 126
 
74
-Why not just use explode(';',$sql) or regular expressions?  The following example sql and others like it
75
-are impossible to split correctly using regular expressions.
127
+Result:
76 128
 
77
-```sql
129
+1.    `DROP TABLE IF EXISTS MyTable`;
130
+2.    `CREATE TABLE MyTable ( id int )`;
131
+3.    `INSERT INTO MyTable (id) VALUES (1),(2),(3),(4)`;
132
+4.    `SELECT * FROM MyTable`;
133
+
134
+### Why Not Regular Expressions?
135
+
136
+Why not just use `explode(';', $sql)` or a regular expression?
137
+
138
+The following example sql and others like it are _impossible_ to split correctly using regular expressions, no matter how complex.  
139
+
140
+```
78 141
 SELECT ";"; SELECT ";\"; a;";
79 142
 SELECT ";
80 143
     abc";
@@ -82,6 +145,15 @@ SELECT a,b #comment;
82 145
 FROM test;
83 146
 ```
84 147
 
85
-The splitQuery method will still fail in the following cases:
148
+SqlFormatter breaks the string into tokens instead of using regular expressions and will correctly produce:
149
+
150
+1.    `SELECT ";"`;
151
+2.    `SELECT ";\"; a;"`;
152
+3.    `SELECT "; abc"`;
153
+4.    `SELECT a,b #comment;
154
+FROM test`;
155
+
156
+Please note, the splitQuery method will still fail in the following cases:
86 157
 *    The DELIMITER command can be used to change the delimiter from the default ';' to something else.  
87
-*    The CREATE PROCEDURE command
158
+*    The CREATE PROCEDURE command has a ';' in the middle of it
159
+*    The USE command is not terminated with a ';'

BIN
vendor/jdorn/sql-formatter/examples/SqlFormatterExample.png View File


+ 14 - 0
vendor/jdorn/sql-formatter/examples/examples.php View File

@@ -74,6 +74,20 @@ $split_statements = array(
74 74
         abc\";
75 75
     SELECT a,b #comment;
76 76
     FROM test;",
77
+    
78
+    "
79
+    -- Drop the table first if it exists
80
+    DROP TABLE IF EXISTS MyTable;
81
+
82
+    -- Create the table
83
+    CREATE TABLE MyTable ( id int );
84
+
85
+    -- Insert values
86
+    INSERT INTO MyTable (id)
87
+        VALUES
88
+        (1),(2),(3),(4);
89
+
90
+    -- Done",
77 91
 );
78 92
 
79 93
 // Example statements for removing comments

File diff suppressed because it is too large
+ 403 - 321
vendor/jdorn/sql-formatter/lib/SqlFormatter.php


File diff suppressed because it is too large
+ 4365 - 0
vendor/jdorn/sql-formatter/tests/expected.html


+ 19 - 19
vendor/jdorn/sql-formatter/tests/performance.php View File

@@ -1,42 +1,42 @@
1 1
 <?php
2 2
 require '../lib/SqlFormatter.php';
3
+
3 4
 //this is the default value
4 5
 //set to '0' to disable caching
5 6
 //a value between 10 and 20 seems to give the best result
6 7
 SqlFormatter::$max_cachekey_size = 15;
7 8
 
8
-$contents = file('sql.sql');
9
+//the sample query file is filled with install scripts for PrestaShop
10
+//and some sample catalog data from Magento
11
+$contents = file_get_contents('sql.sql');
12
+
13
+//queries are separated by 2 new lines
14
+$queries = explode("\n\n",$contents);
9 15
 
10 16
 //track time and memory usage
11 17
 $start = microtime(true);
12 18
 $ustart = memory_get_usage(true);
13 19
 
14 20
 //track number of queries and size of queries
15
-$queries = 0;
16
-$bytes = 0;
17
-
18
-//format each query 3 times
19
-for ($i =0; $i<3; $i++) {
20
-    foreach ($contents as $query) {
21
-		//this tries to mix up the queries so we aren't just running the same thing a bunch of times
22
-        $query = str_replace('tablename', rand(1, 10000), $query);
23
-
24
-		//do formatting and highlighting
25
-        SqlFormatter::format($query);
26
-        
27
-        $queries++;
28
-        $bytes += strlen($query);
29
-    }
21
+$num = 0;
22
+$chars = 0;
23
+
24
+foreach ($queries as $query) {
25
+	//do formatting and highlighting
26
+	SqlFormatter::format($query);
27
+	
28
+	$num++;
29
+	$chars += strlen($query);
30 30
 }
31 31
 
32 32
 $uend = memory_get_usage(true);
33 33
 $end = microtime(true);
34 34
 
35
-echo "<p>Formatted $queries queries.</p>";
35
+echo "<p>Formatted ".$num." queries using a max_cachekey_size of ".SqlFormatter::$max_cachekey_size."</p>";
36 36
 
37
-echo "<p>Average query length of ".number_format($bytes/$queries,5)." characters</p>";
37
+echo "<p>Average query length of ".number_format($chars/$num,5)." characters</p>";
38 38
 
39
-echo "<p>Took ".number_format($end-$start,5)." seconds total, ".number_format(($end-$start)/$queries,5)." seconds per query, ".number_format(1000*($end-$start)/$bytes,5)." seconds per 1000 characters</p>";
39
+echo "<p>Took ".number_format($end-$start,5)." seconds total, ".number_format(($end-$start)/$num,5)." seconds per query, ".number_format(1000*($end-$start)/$chars,5)." seconds per 1000 characters</p>";
40 40
 
41 41
 echo "<p>Used ".number_format($uend-$ustart)." bytes of memory</p>";
42 42
 

+ 23 - 0
vendor/jdorn/sql-formatter/tests/regression.php View File

@@ -0,0 +1,23 @@
1
+<?php
2
+require '../lib/SqlFormatter.php';
3
+
4
+//the sample query file is filled with install scripts for PrestaShop
5
+//and some sample catalog data from Magento
6
+$contents = file_get_contents('sql.sql');
7
+
8
+//queries are separated by 2 new lines
9
+$queries = explode("\n\n",$contents);
10
+
11
+$output = "<ol>\n";
12
+
13
+foreach ($queries as $query) {
14
+	//do formatting and highlighting
15
+	$output .= "<li>".SqlFormatter::format($query)."</li>\n\n";
16
+}
17
+
18
+$output .= "</ol>";
19
+
20
+$expected = file_get_contents('expected.html');
21
+
22
+if($expected === $output) echo "Got expected output.  No changes found.";
23
+else echo $output;

File diff suppressed because it is too large
+ 1783 - 61
vendor/jdorn/sql-formatter/tests/sql.sql


+ 1 - 1
vendor/jms/security-extra-bundle/JMS/SecurityExtraBundle/JMSSecurityExtraBundle.php View File

@@ -35,7 +35,7 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
35 35
  */
36 36
 class JMSSecurityExtraBundle extends Bundle
37 37
 {
38
-    const VERSION = '1.2.0';
38
+    const VERSION = '1.2.1-DEV';
39 39
 
40 40
     public function build(ContainerBuilder $container)
41 41
     {

+ 1 - 0
vendor/knplabs/knp-menu

@@ -0,0 +1 @@
1
+Subproject commit 730bc37232f5f813822acf80edfbd89381ea5971

+ 1 - 0
vendor/knplabs/knp-menu-bundle/Knp/Bundle/MenuBundle

@@ -0,0 +1 @@
1
+Subproject commit bfaa9f1a74ee590c5e6460a3139b268fce1f1885

+ 1 - 0
vendor/pagerfanta/pagerfanta

@@ -0,0 +1 @@
1
+Subproject commit 2608116b1d0908c07f6590bc10addab37fd4a49f

+ 2 - 2
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/DoctrineStep.php View File

@@ -121,7 +121,7 @@ class DoctrineStep implements StepInterface
121 121
     /**
122 122
      * @return array
123 123
      */
124
-    static public function getDriverKeys()
124
+    public static function getDriverKeys()
125 125
     {
126 126
         return array_keys(static::getDrivers());
127 127
     }
@@ -129,7 +129,7 @@ class DoctrineStep implements StepInterface
129 129
     /**
130 130
      * @return array
131 131
      */
132
-    static public function getDrivers()
132
+    public static function getDrivers()
133 133
     {
134 134
         return array(
135 135
             'pdo_mysql'  => 'MySQL (PDO)',

+ 1 - 1
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/SecretStep.php View File

@@ -28,7 +28,7 @@ class SecretStep implements StepInterface
28 28
 
29 29
     public function __construct(array $parameters)
30 30
     {
31
-        if (array_key_exists('secret', $parameters)){
31
+        if (array_key_exists('secret', $parameters)) {
32 32
             $this->secret = $parameters['secret'];
33 33
 
34 34
             if ('ThisTokenIsNotSoSecretChangeIt' == $this->secret) {

+ 7 - 7
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Configurator/Step/StepInterface.php View File

@@ -25,41 +25,41 @@ interface StepInterface
25 25
      *
26 26
      * @param array $parameters
27 27
      */
28
-    function __construct(array $parameters);
28
+    public function __construct(array $parameters);
29 29
 
30 30
     /**
31 31
      * Returns the form used for configuration.
32 32
      *
33 33
      * @return FormTypeInterface
34 34
      */
35
-    function getFormType();
35
+    public function getFormType();
36 36
 
37 37
     /**
38 38
      * Checks for requirements.
39 39
      *
40 40
      * @return array
41 41
      */
42
-    function checkRequirements();
42
+    public function checkRequirements();
43 43
 
44 44
     /**
45 45
      * Checks for optional setting it could be nice to have.
46 46
      *
47 47
      * @return array
48 48
      */
49
-    function checkOptionalSettings();
49
+    public function checkOptionalSettings();
50 50
 
51 51
     /**
52 52
      * Returns the template to be renderer for this step.
53 53
      *
54 54
      * @return string
55 55
      */
56
-    function getTemplate();
56
+    public function getTemplate();
57 57
 
58 58
     /**
59 59
      * Updates form data parameters.
60 60
      *
61
-     * @param array $parameters
61
+     * @param  array $parameters
62 62
      * @return array
63 63
      */
64
-    function update(StepInterface $data);
64
+    public function update(StepInterface $data);
65 65
 }

+ 0 - 1
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/config/webconfigurator.xml View File

@@ -14,4 +14,3 @@
14 14
         </service>
15 15
     </services>
16 16
 </container>
17
-

+ 49 - 34
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/skeleton/app/SymfonyRequirements.php View File

@@ -41,11 +41,11 @@ class Requirement
41 41
     /**
42 42
      * Constructor that initializes the requirement.
43 43
      *
44
-     * @param Boolean      $fulfilled     Whether the requirement is fulfilled
45
-     * @param string       $testMessage   The message for testing the requirement
46
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
47
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
48
-     * @param Boolean      $optional      Whether this is only an optional recommendation not a mandatory requirement
44
+     * @param Boolean     $fulfilled   Whether the requirement is fulfilled
45
+     * @param string      $testMessage The message for testing the requirement
46
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
47
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
48
+     * @param Boolean     $optional    Whether this is only an optional recommendation not a mandatory requirement
49 49
      */
50 50
     public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
51 51
     {
@@ -117,16 +117,16 @@ class PhpIniRequirement extends Requirement
117 117
     /**
118 118
      * Constructor that initializes the requirement.
119 119
      *
120
-     * @param string            $cfgName            The configuration name used for ini_get()
121
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
120
+     * @param string           $cfgName    The configuration name used for ini_get()
121
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
122 122
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
123
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
123
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
124 124
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
125 125
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
126
-     * @param string|null       $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127
-     * @param string|null       $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129
-     * @param Boolean           $optional           Whether this is only an optional recommendation not a mandatory requirement
126
+     * @param string|null $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
127
+     * @param string|null $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
128
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
129
+     * @param Boolean     $optional    Whether this is only an optional recommendation not a mandatory requirement
130 130
      */
131 131
     public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
132 132
     {
@@ -193,10 +193,10 @@ class RequirementCollection implements IteratorAggregate
193 193
     /**
194 194
      * Adds a mandatory requirement.
195 195
      *
196
-     * @param Boolean      $fulfilled     Whether the requirement is fulfilled
197
-     * @param string       $testMessage   The message for testing the requirement
198
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
199
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
196
+     * @param Boolean     $fulfilled   Whether the requirement is fulfilled
197
+     * @param string      $testMessage The message for testing the requirement
198
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
199
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
200 200
      */
201 201
     public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null)
202 202
     {
@@ -206,10 +206,10 @@ class RequirementCollection implements IteratorAggregate
206 206
     /**
207 207
      * Adds an optional recommendation.
208 208
      *
209
-     * @param Boolean      $fulfilled     Whether the recommendation is fulfilled
210
-     * @param string       $testMessage   The message for testing the recommendation
211
-     * @param string       $helpHtml      The help text formatted in HTML for resolving the problem
212
-     * @param string|null  $helpText      The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
209
+     * @param Boolean     $fulfilled   Whether the recommendation is fulfilled
210
+     * @param string      $testMessage The message for testing the recommendation
211
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem
212
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
213 213
      */
214 214
     public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null)
215 215
     {
@@ -219,15 +219,15 @@ class RequirementCollection implements IteratorAggregate
219 219
     /**
220 220
      * Adds a mandatory requirement in form of a php.ini configuration.
221 221
      *
222
-     * @param string            $cfgName            The configuration name used for ini_get()
223
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
222
+     * @param string           $cfgName    The configuration name used for ini_get()
223
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
224 224
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
225
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226 226
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
227 227
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
228
-     * @param string            $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229
-     * @param string            $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
228
+     * @param string      $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
229
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
230
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
231 231
      */
232 232
     public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
233 233
     {
@@ -237,15 +237,15 @@ class RequirementCollection implements IteratorAggregate
237 237
     /**
238 238
      * Adds an optional recommendation in form of a php.ini configuration.
239 239
      *
240
-     * @param string            $cfgName            The configuration name used for ini_get()
241
-     * @param Boolean|callback  $evaluation         Either a Boolean indicating whether the configuration should evaluate to true or false,
240
+     * @param string           $cfgName    The configuration name used for ini_get()
241
+     * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
242 242
                                                     or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243
-     * @param Boolean           $approveCfgAbsence  If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
243
+     * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244 244
                                                     This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
245 245
                                                     Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
246
-     * @param string            $testMessage        The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247
-     * @param string            $helpHtml           The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248
-     * @param string|null       $helpText           The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
246
+     * @param string      $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
247
+     * @param string      $helpHtml    The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
248
+     * @param string|null $helpText    The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
249 249
      */
250 250
     public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
251 251
     {
@@ -430,8 +430,15 @@ class SymfonyRequirements extends RequirementCollection
430 430
         );
431 431
 
432 432
         if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
433
+            $timezones = array();
434
+            foreach (DateTimeZone::listAbbreviations() as $abbreviations) {
435
+                foreach ($abbreviations as $abbreviation) {
436
+                    $timezones[$abbreviation['timezone_id']] = true;
437
+                }
438
+            }
439
+
433 440
             $this->addRequirement(
434
-                (in_array(date_default_timezone_get(), DateTimeZone::listIdentifiers())),
441
+                isset($timezones[date_default_timezone_get()]),
435 442
                 sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()),
436 443
                 'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.'
437 444
             );
@@ -495,6 +502,14 @@ class SymfonyRequirements extends RequirementCollection
495 502
             $this->addPhpIniRequirement(
496 503
                 'xdebug.scream', false, true
497 504
             );
505
+
506
+            $this->addPhpIniRecommendation(
507
+                'xdebug.max_nesting_level',
508
+                create_function('$cfgValue', 'return $cfgValue > 100;'),
509
+                true,
510
+                'xdebug.max_nesting_level should be above 100 in php.ini',
511
+                'Set "<strong>xdebug.max_nesting_level</strong>" to e.g. "<strong>250</strong>" in php.ini<a href="#phpini">*</a> to stop Xdebug\'s infinite recursion protection erroneously throwing a fatal error in your project.'
512
+            );
498 513
         }
499 514
 
500 515
         $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;
@@ -518,7 +533,7 @@ class SymfonyRequirements extends RequirementCollection
518 533
             'You should use at least PHP 5.3.4 due to PHP bug #52083 in earlier versions',
519 534
             'Your project might malfunction randomly due to PHP bug #52083 ("Notice: Trying to get property of non-object"). Install PHP 5.3.4 or newer.'
520 535
         );
521
-        
536
+
522 537
         $this->addRecommendation(
523 538
             version_compare($installedPhpVersion, '5.3.8', '>='),
524 539
             'When using annotations you should have at least PHP 5.3.8 due to PHP bug #55156',

+ 1 - 1
vendor/symfony/monolog-bundle/Symfony/Bundle/MonologBundle/composer.json View File

@@ -17,7 +17,7 @@
17 17
     ],
18 18
     "require": {
19 19
         "php": ">=5.3.2",
20
-        "symfony/monolog-bridge": ">=2.1.0,<2.3-dev",
20
+        "symfony/monolog-bridge": "2.1.*",
21 21
         "symfony/dependency-injection": ">=2.1.0,<2.3-dev",
22 22
         "symfony/config": ">=2.1.0,<2.3-dev",
23 23
         "monolog/monolog": ">=1.0,<1.3-dev"

+ 3 - 0
vendor/symfony/symfony/README.md View File

@@ -27,6 +27,9 @@ work for you:
27 27
  * before PHP 5.3.8, if you get an error involving annotations, you've hit a
28 28
    known PHP bug (see https://bugs.php.net/bug.php?id=55156).
29 29
 
30
+ * PHP 5.3.16 has a major bug in the Reflection subsystem and is not suitable to
31
+   run Symfony2 (https://bugs.php.net/bug.php?id=62715)
32
+
30 33
 Installation
31 34
 ------------
32 35
 

+ 1 - 1
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Client.php View File

@@ -78,7 +78,7 @@ class Client extends BaseClient
78 78
             $this->hasPerformedRequest = true;
79 79
         }
80 80
 
81
-        return $this->kernel->handle($request);
81
+        return parent::doRequest($request);
82 82
     }
83 83
 
84 84
     /**

+ 3 - 1
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php View File

@@ -236,10 +236,12 @@ EOF
236 236
         $default = (string) $default != '' ? ' '.$default : '';
237 237
         $comments = count($comments) ? '# '.implode(', ', $comments) : '';
238 238
 
239
-        $text = sprintf('%-20s %s %s', $node->getName().':', $default, $comments);
239
+        $text = rtrim(sprintf('%-20s %s %s', $node->getName() . ':', $default, $comments), ' ');
240 240
 
241 241
         if ($info = $node->getInfo()) {
242 242
             $this->outputLine('');
243
+            // indenting multi-line info
244
+            $info = str_replace("\n", sprintf("\n%" . $depth * 4 . "s# ", ' '), $info);
243 245
             $this->outputLine('# '.$info, $depth * 4);
244 246
         }
245 247
 

+ 0 - 3
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/EventListener/SessionListener.php View File

@@ -21,9 +21,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
21 21
 /**
22 22
  * Sets the session in the request.
23 23
  *
24
- * This will also start the session if it was already started during a previous
25
- * request.
26
- *
27 24
  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
28 25
  */
29 26
 class SessionListener implements EventSubscriberInterface

+ 4 - 0
vendor/symfony/symfony/src/Symfony/Component/ClassLoader/DebugClassLoader.php View File

@@ -82,6 +82,10 @@ class DebugClassLoader
82 82
             require $file;
83 83
 
84 84
             if (!class_exists($class, false) && !interface_exists($class, false) && (!function_exists('trait_exists') || !trait_exists($class, false))) {
85
+                if (false !== strpos($class, '/')) {
86
+                    throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class));
87
+                }
88
+
85 89
                 throw new \RuntimeException(sprintf('The autoloader expected class "%s" to be defined in file "%s". The file was found but the class was not in it, the class name or namespace probably has a typo.', $class, $file));
86 90
             }
87 91
 

+ 4 - 2
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Container.php View File

@@ -334,8 +334,10 @@ class Container implements IntrospectableContainerInterface
334 334
             unset($this->scopedServices[$name]);
335 335
 
336 336
             foreach ($this->scopeChildren[$name] as $child) {
337
-                $services[$child] = $this->scopedServices[$child];
338
-                unset($this->scopedServices[$child]);
337
+                if (isset($this->scopedServices[$child])) {
338
+                    $services[$child] = $this->scopedServices[$child];
339
+                    unset($this->scopedServices[$child]);
340
+                }
339 341
             }
340 342
 
341 343
             // update global map

+ 6 - 3
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php View File

@@ -734,19 +734,22 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
734 734
      *
735 735
      * @throws RuntimeException When the scope is inactive
736 736
      * @throws RuntimeException When the factory definition is incomplete
737
+     * @throws RuntimeException When the service is a synthetic service
737 738
      * @throws InvalidArgumentException When configure callable is not callable
738 739
      */
739 740
     private function createService(Definition $definition, $id)
740 741
     {
742
+        if ($definition->isSynthetic()) {
743
+            throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
744
+        }
745
+
741 746
         $parameterBag = $this->getParameterBag();
742 747
 
743 748
         if (null !== $definition->getFile()) {
744 749
             require_once $parameterBag->resolveValue($definition->getFile());
745 750
         }
746 751
 
747
-        $arguments = $this->resolveServices(
748
-            $parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments()))
749
-        );
752
+        $arguments = $this->resolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())));
750 753
 
751 754
         if (null !== $definition->getFactoryMethod()) {
752 755
             if (null !== $definition->getFactoryClass()) {

+ 23 - 2
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php View File

@@ -15,6 +15,8 @@ use Symfony\Component\DependencyInjection\Definition;
15 15
 use Symfony\Component\DependencyInjection\Reference;
16 16
 use Symfony\Component\DependencyInjection\Parameter;
17 17
 use Symfony\Component\DependencyInjection\ContainerInterface;
18
+use Symfony\Component\DependencyInjection\ContainerBuilder;
19
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
18 20
 
19 21
 /**
20 22
  * GraphvizDumper dumps a service container as a graphviz file.
@@ -159,7 +161,7 @@ class GraphvizDumper extends Dumper
159 161
     {
160 162
         $nodes = array();
161 163
 
162
-        $container = clone $this->container;
164
+        $container = $this->cloneContainer();
163 165
 
164 166
         foreach ($container->getDefinitions() as $id => $definition) {
165 167
             $nodes[$id] = array('class' => str_replace('\\', '\\\\', $this->container->getParameterBag()->resolveValue($definition->getClass())), 'attributes' => array_merge($this->options['node.definition'], array('style' => ContainerInterface::SCOPE_PROTOTYPE !== $definition->getScope() ? 'filled' : 'dotted')));
@@ -175,13 +177,32 @@ class GraphvizDumper extends Dumper
175 177
             }
176 178
 
177 179
             if (!$container->hasDefinition($id)) {
178
-                $nodes[$id] = array('class' => str_replace('\\', '\\\\', get_class($service)), 'attributes' => $this->options['node.instance']);
180
+                $class = ('service_container' === $id) ? get_class($this->container) : get_class($service);
181
+                $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']);
179 182
             }
180 183
         }
181 184
 
182 185
         return $nodes;
183 186
     }
184 187
 
188
+    private function cloneContainer()
189
+    {
190
+        $parameterBag = new ParameterBag($this->container->getParameterBag()->all());
191
+
192
+        $container = new ContainerBuilder($parameterBag);
193
+        $container->setDefinitions($this->container->getDefinitions());
194
+        $container->setAliases($this->container->getAliases());
195
+        $container->setResources($this->container->getResources());
196
+        foreach ($this->container->getScopes() as $scope) {
197
+            $container->addScope($scope);
198
+        }
199
+        foreach ($this->container->getExtensions() as $extension) {
200
+            $container->registerExtension($extension);
201
+        }
202
+
203
+        return $container;
204
+    }
205
+
185 206
     /**
186 207
      * Returns the start dot.
187 208
      *

+ 6 - 4
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php View File

@@ -955,11 +955,11 @@ EOF;
955 955
      *
956 956
      * @return Boolean
957 957
      */
958
-    private function hasReference($id, array $arguments, $deep = false)
958
+    private function hasReference($id, array $arguments, $deep = false, $visited = array())
959 959
     {
960 960
         foreach ($arguments as $argument) {
961 961
             if (is_array($argument)) {
962
-                if ($this->hasReference($id, $argument, $deep)) {
962
+                if ($this->hasReference($id, $argument, $deep, $visited)) {
963 963
                     return true;
964 964
                 }
965 965
             } elseif ($argument instanceof Reference) {
@@ -967,11 +967,13 @@ EOF;
967 967
                     return true;
968 968
                 }
969 969
 
970
-                if ($deep) {
970
+                if ($deep && !isset($visited[(string) $argument])) {
971
+                    $visited[(string) $argument] = true;
972
+
971 973
                     $service = $this->container->getDefinition((string) $argument);
972 974
                     $arguments = array_merge($service->getMethodCalls(), $service->getArguments(), $service->getProperties());
973 975
 
974
-                    if ($this->hasReference($id, $arguments, $deep)) {
976
+                    if ($this->hasReference($id, $arguments, $deep, $visited)) {
975 977
                         return true;
976 978
                     }
977 979
                 }

+ 11 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php View File

@@ -320,6 +320,17 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
320 320
     }
321 321
 
322 322
     /**
323
+     * @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
324
+     * @expectedException \RuntimeException
325
+     */
326
+    public function testCreateSyntheticService()
327
+    {
328
+        $builder = new ContainerBuilder();
329
+        $builder->register('foo', 'FooClass')->setSynthetic(true);
330
+        $builder->get('foo');
331
+    }
332
+
333
+    /**
323 334
      * @covers Symfony\Component\DependencyInjection\ContainerBuilder::resolveServices
324 335
      */
325 336
     public function testResolveServices()

+ 32 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php View File

@@ -261,6 +261,38 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
261 261
         $this->assertFalse($container->has('a'));
262 262
     }
263 263
 
264
+    public function testEnterScopeRecursivelyWithInactiveChildScopes()
265
+    {
266
+        $container = new Container();
267
+        $container->addScope(new Scope('foo'));
268
+        $container->addScope(new Scope('bar', 'foo'));
269
+
270
+        $this->assertFalse($container->isScopeActive('foo'));
271
+
272
+        $container->enterScope('foo');
273
+
274
+        $this->assertTrue($container->isScopeActive('foo'));
275
+        $this->assertFalse($container->isScopeActive('bar'));
276
+        $this->assertFalse($container->has('a'));
277
+
278
+        $a = new \stdClass();
279
+        $container->set('a', $a, 'foo');
280
+
281
+        $services = $this->getField($container, 'scopedServices');
282
+        $this->assertTrue(isset($services['foo']['a']));
283
+        $this->assertSame($a, $services['foo']['a']);
284
+
285
+        $this->assertTrue($container->has('a'));
286
+        $container->enterScope('foo');
287
+
288
+        $services = $this->getField($container, 'scopedServices');
289
+        $this->assertFalse(isset($services['a']));
290
+
291
+        $this->assertTrue($container->isScopeActive('foo'));
292
+        $this->assertFalse($container->isScopeActive('bar'));
293
+        $this->assertFalse($container->has('a'));
294
+    }
295
+
264 296
     public function testLeaveScopeNotActive()
265 297
     {
266 298
         $container = new Container();

+ 14 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php View File

@@ -55,4 +55,18 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase
55 55
             'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'),
56 56
         )), str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot')), '->dump() dumps services');
57 57
     }
58
+
59
+    public function testDumpWithFrozenContainer()
60
+    {
61
+        $container = include self::$fixturesPath.'/containers/container13.php';
62
+        $dumper = new GraphvizDumper($container);
63
+        $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services13.dot')), $dumper->dump(), '->dump() dumps services');
64
+    }
65
+
66
+    public function testDumpWithFrozenCustomClassContainer()
67
+    {
68
+        $container = include self::$fixturesPath.'/containers/container14.php';
69
+        $dumper = new GraphvizDumper($container);
70
+        $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services14.dot')), $dumper->dump(), '->dump() dumps services');
71
+    }
58 72
 }

+ 16 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container13.php View File

@@ -0,0 +1,16 @@
1
+<?php
2
+
3
+use Symfony\Component\DependencyInjection\ContainerBuilder;
4
+use Symfony\Component\DependencyInjection\Reference;
5
+
6
+$container = new ContainerBuilder();
7
+$container->
8
+    register('foo', 'FooClass')->
9
+    addArgument(new Reference('bar'))
10
+;
11
+$container->
12
+    register('bar', 'BarClass')
13
+;
14
+$container->compile();
15
+
16
+return $container;

+ 11 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/container14.php View File

@@ -0,0 +1,11 @@
1
+<?php
2
+
3
+namespace Container14;
4
+
5
+use Symfony\Component\DependencyInjection\ContainerBuilder;
6
+
7
+class ProjectServiceContainer extends ContainerBuilder
8
+{
9
+}
10
+
11
+return new ProjectServiceContainer();

+ 10 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services13.dot View File

@@ -0,0 +1,10 @@
1
+digraph sc {
2
+  ratio="compress"
3
+  node [fontsize="11" fontname="Arial" shape="record"];
4
+  edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
5
+
6
+  node_foo [label="foo\nFooClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
7
+  node_bar [label="bar\nBarClass\n", shape=record, fillcolor="#eeeeee", style="filled"];
8
+  node_service_container [label="service_container\nSymfony\\Component\\DependencyInjection\\ContainerBuilder\n", shape=record, fillcolor="#9999ff", style="filled"];
9
+  node_foo -> node_bar [label="" style="filled"];
10
+}

+ 7 - 0
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/graphviz/services14.dot View File

@@ -0,0 +1,7 @@
1
+digraph sc {
2
+  ratio="compress"
3
+  node [fontsize="11" fontname="Arial" shape="record"];
4
+  edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"];
5
+
6
+  node_service_container [label="service_container\nContainer14\\ProjectServiceContainer\n", shape=record, fillcolor="#9999ff", style="filled"];
7
+}

+ 1 - 1
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php View File

@@ -106,7 +106,7 @@ class EventDispatcher implements EventDispatcherInterface
106 106
         }
107 107
 
108 108
         foreach ($this->listeners[$eventName] as $priority => $listeners) {
109
-            if (false !== ($key = array_search($listener, $listeners))) {
109
+            if (false !== ($key = array_search($listener, $listeners, true))) {
110 110
                 unset($this->listeners[$eventName][$priority][$key], $this->sorted[$eventName]);
111 111
             }
112 112
         }

+ 23 - 0
vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php View File

@@ -244,6 +244,29 @@ class EventDispatcherTest extends \PHPUnit_Framework_TestCase
244 244
         $this->dispatcher->dispatch('test');
245 245
         $this->assertSame($this->dispatcher, $dispatcher);
246 246
     }
247
+
248
+    /**
249
+     * @see https://bugs.php.net/bug.php?id=62976
250
+     *
251
+     * This bug affects:
252
+     *  - The PHP 5.3 branch for versions < 5.3.18
253
+     *  - The PHP 5.4 branch for versions < 5.4.8
254
+     *  - The PHP 5.5 branch is not affected
255
+     */
256
+    public function testWorkaroundForPhpBug62976()
257
+    {
258
+        $dispatcher = new EventDispatcher();
259
+        $dispatcher->addListener('bug.62976', new CallableClass());
260
+        $dispatcher->removeListener('bug.62976', function() {});
261
+        $this->assertTrue($dispatcher->hasListeners('bug.62976'));
262
+    }
263
+}
264
+
265
+class CallableClass
266
+{
267
+    public function __invoke()
268
+    {
269
+    }
247 270
 }
248 271
 
249 272
 class TestEventListener

+ 1 - 1
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/File/MimeType/FileBinaryMimeTypeGuesser.php View File

@@ -77,7 +77,7 @@ class FileBinaryMimeTypeGuesser implements MimeTypeGuesserInterface
77 77
 
78 78
         $type = trim(ob_get_clean());
79 79
 
80
-        if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-]+)#i', $type, $match)) {
80
+        if (!preg_match('#^([a-z0-9\-]+/[a-z0-9\-\.]+)#i', $type, $match)) {
81 81
             // it's not a type, but an error message
82 82
             return null;
83 83
         }

+ 8 - 0
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Request.php View File

@@ -1427,12 +1427,16 @@ class Request
1427 1427
         if ($this->headers->has('X_ORIGINAL_URL') && false !== stripos(PHP_OS, 'WIN')) {
1428 1428
             // IIS with Microsoft Rewrite Module
1429 1429
             $requestUri = $this->headers->get('X_ORIGINAL_URL');
1430
+            $this->headers->remove('X_ORIGINAL_URL');
1430 1431
         } elseif ($this->headers->has('X_REWRITE_URL') && false !== stripos(PHP_OS, 'WIN')) {
1431 1432
             // IIS with ISAPI_Rewrite
1432 1433
             $requestUri = $this->headers->get('X_REWRITE_URL');
1434
+            $this->headers->remove('X_REWRITE_URL');
1433 1435
         } elseif ($this->server->get('IIS_WasUrlRewritten') == '1' && $this->server->get('UNENCODED_URL') != '') {
1434 1436
             // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
1435 1437
             $requestUri = $this->server->get('UNENCODED_URL');
1438
+            $this->server->remove('UNENCODED_URL');
1439
+            $this->server->remove('IIS_WasUrlRewritten');
1436 1440
         } elseif ($this->server->has('REQUEST_URI')) {
1437 1441
             $requestUri = $this->server->get('REQUEST_URI');
1438 1442
             // HTTP proxy reqs setup request uri with scheme and host [and port] + the url path, only use url path
@@ -1446,8 +1450,12 @@ class Request
1446 1450
             if ('' != $this->server->get('QUERY_STRING')) {
1447 1451
                 $requestUri .= '?'.$this->server->get('QUERY_STRING');
1448 1452
             }
1453
+            $this->server->remove('ORIG_PATH_INFO');
1449 1454
         }
1450 1455
 
1456
+        // normalize the request URI to ease creating sub-requests from this request
1457
+        $this->server->set('REQUEST_URI', $requestUri);
1458
+
1451 1459
         return $requestUri;
1452 1460
     }
1453 1461
 

+ 2 - 2
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php View File

@@ -332,9 +332,9 @@ class NativeSessionStorage implements SessionStorageInterface
332 332
      * Registers save handler as a PHP session handler.
333 333
      *
334 334
      * To use internal PHP session save handlers, override this method using ini_set with
335
-     * session.save_handlers and session.save_path e.g.
335
+     * session.save_handler and session.save_path e.g.
336 336
      *
337
-     *     ini_set('session.save_handlers', 'files');
337
+     *     ini_set('session.save_handler', 'files');
338 338
      *     ini_set('session.save_path', /tmp');
339 339
      *
340 340
      * @see http://php.net/session-set-save-handler

+ 12 - 0
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php View File

@@ -443,6 +443,18 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
443 443
             $this->esi->addSurrogateEsiCapability($request);
444 444
         }
445 445
 
446
+        // modify the X-Forwarded-For header if needed
447
+        $forwardedFor = $request->headers->get('X-Forwarded-For');
448
+        if ($forwardedFor) {
449
+            $request->headers->set('X-Forwarded-For', $forwardedFor.', '.$request->server->get('REMOTE_ADDR'));
450
+        } else {
451
+            $request->headers->set('X-Forwarded-For', $request->server->get('REMOTE_ADDR'));
452
+        }
453
+
454
+        // fix the client IP address by setting it to 127.0.0.1 as HttpCache
455
+        // is always called from the same process as the backend.
456
+        $request->server->set('REMOTE_ADDR', '127.0.0.1');
457
+
446 458
         // always a "master" request (as the real master request can be in cache)
447 459
         $response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $catch);
448 460
         // FIXME: we probably need to also catch exceptions if raw === true

+ 4 - 4
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php View File

@@ -58,12 +58,12 @@ abstract class Kernel implements KernelInterface, TerminableInterface
58 58
     protected $classes;
59 59
     protected $errorReportingLevel;
60 60
 
61
-    const VERSION         = '2.1.7';
62
-    const VERSION_ID      = '20107';
61
+    const VERSION         = '2.1.8-DEV';
62
+    const VERSION_ID      = '20108';
63 63
     const MAJOR_VERSION   = '2';
64 64
     const MINOR_VERSION   = '1';
65
-    const RELEASE_VERSION = '7';
66
-    const EXTRA_VERSION   = '';
65
+    const RELEASE_VERSION = '8';
66
+    const EXTRA_VERSION   = 'DEV';
67 67
 
68 68
     /**
69 69
      * Constructor.

+ 1 - 1
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php View File

@@ -39,7 +39,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
39 39
         $this->folder = substr($dsn, 5);
40 40
 
41 41
         if (!is_dir($this->folder)) {
42
-            mkdir($this->folder);
42
+            mkdir($this->folder, 0777, true);
43 43
         }
44 44
     }
45 45
 

+ 41 - 0
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php View File

@@ -1034,4 +1034,45 @@ class HttpCacheTest extends HttpCacheTestCase
1034 1034
         $this->assertEquals('Hello World!', $this->response->getContent());
1035 1035
         $this->assertEquals(12, $this->response->headers->get('Content-Length'));
1036 1036
     }
1037
+
1038
+    public function testClientIpIsAlwaysLocalhostForForwardedRequests()
1039
+    {
1040
+        $this->setNextResponse();
1041
+        $this->request('GET', '/', array('REMOTE_ADDR' => '10.0.0.1'));
1042
+
1043
+        $this->assertEquals('127.0.0.1', $this->kernel->getBackendRequest()->server->get('REMOTE_ADDR'));
1044
+    }
1045
+
1046
+    /**
1047
+     * @dataProvider getXForwardedForData
1048
+     */
1049
+    public function testXForwarderForHeaderForForwardedRequests($xForwardedFor, $expected)
1050
+    {
1051
+        $this->setNextResponse();
1052
+        $server = array('REMOTE_ADDR' => '10.0.0.1');
1053
+        if (false !== $xForwardedFor) {
1054
+            $server['HTTP_X_FORWARDED_FOR'] = $xForwardedFor;
1055
+        }
1056
+        $this->request('GET', '/', $server);
1057
+
1058
+        $this->assertEquals($expected, $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For'));
1059
+    }
1060
+
1061
+    public function getXForwardedForData()
1062
+    {
1063
+        return array(
1064
+            array(false, '10.0.0.1'),
1065
+            array('10.0.0.2', '10.0.0.2, 10.0.0.1'),
1066
+            array('10.0.0.2, 10.0.0.3', '10.0.0.2, 10.0.0.3, 10.0.0.1'),
1067
+        );
1068
+    }
1069
+
1070
+    public function testXForwarderForHeaderForPassRequests()
1071
+    {
1072
+        $this->setNextResponse();
1073
+        $server = array('REMOTE_ADDR' => '10.0.0.1');
1074
+        $this->request('POST', '/', $server);
1075
+
1076
+        $this->assertEquals('10.0.0.1', $this->kernel->getBackendRequest()->headers->get('X-Forwarded-For'));
1077
+    }
1037 1078
 }

+ 7 - 0
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestHttpKernel.php View File

@@ -26,6 +26,7 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface
26 26
     protected $called;
27 27
     protected $customizer;
28 28
     protected $catch;
29
+    protected $backendRequest;
29 30
 
30 31
     public function __construct($body, $status, $headers, \Closure $customizer = null)
31 32
     {
@@ -39,9 +40,15 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface
39 40
         parent::__construct(new EventDispatcher(), $this);
40 41
     }
41 42
 
43
+    public function getBackendRequest()
44
+    {
45
+        return $this->backendRequest;
46
+    }
47
+
42 48
     public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false)
43 49
     {
44 50
         $this->catch = $catch;
51
+        $this->backendRequest = $request;
45 52
 
46 53
         return parent::handle($request, $type, $catch);
47 54
     }

+ 8 - 0
vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Tests/HttpCache/TestMultipleHttpKernel.php View File

@@ -25,6 +25,7 @@ class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInt
25 25
     protected $headers;
26 26
     protected $catch;
27 27
     protected $call;
28
+    protected $backendRequest;
28 29
 
29 30
     public function __construct($responses)
30 31
     {
@@ -42,8 +43,15 @@ class TestMultipleHttpKernel extends HttpKernel implements ControllerResolverInt
42 43
         parent::__construct(new EventDispatcher(), $this);
43 44
     }
44 45
 
46
+    public function getBackendRequest()
47
+    {
48
+        return $this->backendRequest;
49
+    }
50
+
45 51
     public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false)
46 52
     {
53
+        $this->backendRequest = $request;
54
+
47 55
         return parent::handle($request, $type, $catch);
48 56
     }
49 57
 

+ 3 - 0
vendor/symfony/symfony/src/Symfony/Component/Process/Process.php View File

@@ -213,6 +213,9 @@ class Process
213 213
             $this->fileHandles = array(
214 214
                 self::STDOUT => tmpfile(),
215 215
             );
216
+            if (false === $this->fileHandles[self::STDOUT]) {
217
+                throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
218
+            }
216 219
             $this->readBytes = array(
217 220
                 self::STDOUT => 0,
218 221
             );

+ 0 - 0
vendor/symfony/symfony/src/Symfony/Component/Security/Core/AuthenticationEvents.php View File


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