Browse Source

Updating vendors

Julio Montoya 12 years ago
parent
commit
b0b04e1629
40 changed files with 1464 additions and 157 deletions
  1. 1 1
      vendor/autoload.php
  2. 1 1
      vendor/composer/autoload_classmap.php
  3. 3 3
      vendor/composer/autoload_real.php
  4. 84 84
      vendor/composer/installed.json
  5. 5 2
      vendor/doctrine/dbal/docs/en/reference/configuration.rst
  6. 22 0
      vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
  7. 24 0
      vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php
  8. 2 1
      vendor/doctrine/orm/docs/en/index.rst
  9. 1 5
      vendor/doctrine/orm/docs/en/reference/native-sql.rst
  10. 9 4
      vendor/fzaninotto/faker/src/Faker/Provider/Internet.php
  11. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/Internet.php
  12. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php
  13. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php
  14. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/en_GB/Internet.php
  15. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Internet.php
  16. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php
  17. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Internet.php
  18. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Internet.php
  19. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Internet.php
  20. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Internet.php
  21. 0 1
      vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Internet.php
  22. 2 2
      vendor/gedmo/doctrine-extensions/LICENSE
  23. 7 42
      vendor/gedmo/doctrine-extensions/README.md
  24. 219 0
      vendor/gedmo/doctrine-extensions/doc/references.md
  25. 2 1
      vendor/gedmo/doctrine-extensions/doc/tree.md
  26. 25 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/Reference.php
  27. 21 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceMany.php
  28. 21 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceOne.php
  29. 215 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/LazyCollection.php
  30. 99 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Driver/Annotation.php
  31. 99 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/Adapter/ODM.php
  32. 98 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/Adapter/ORM.php
  33. 50 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/ReferencesAdapter.php
  34. 158 0
      vendor/gedmo/doctrine-extensions/lib/Gedmo/References/ReferencesListener.php
  35. 58 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/References/Fixture/ODM/MongoDB/Product.php
  36. 105 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/References/Fixture/ORM/StockItem.php
  37. 123 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/References/ReferencesListenerTest.php
  38. 6 0
      vendor/gedmo/doctrine-extensions/tests/Gedmo/Tool/BaseTestCaseOM.php
  39. 1 0
      vendor/gedmo/doctrine-extensions/tests/bootstrap.php
  40. 3 0
      vendor/gedmo/doctrine-extensions/tests/phpunit.xml.dist

+ 1 - 1
vendor/autoload.php

@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInitb343d933ddd40380e938248e1d446981::getLoader();
+return ComposerAutoloaderInitb9f8cc78eb61aedad036fc9290633b9f::getLoader();

+ 1 - 1
vendor/composer/autoload_classmap.php

@@ -554,6 +554,7 @@ return array(
     'Javascript' => $baseDir . '/main/inc/lib/javascript.class.php',
     'Javascript_Embedder' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/javascript_embedder.cls.php',
     'KeyAuth' => $baseDir . '/main/auth/key/key_auth.class.php',
+    'LearnpathController' => $baseDir . '/main/newscorm/lp_subscribe_users.php',
     'LearnpathLink' => $baseDir . '/main/gradebook/lib/be/learnpathlink.class.php',
     'LegalManager' => $baseDir . '/main/inc/lib/legal.lib.php',
     'Link' => $baseDir . '/main/inc/lib/link.lib.php',
@@ -802,7 +803,6 @@ return array(
     'Style' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/style.cls.php',
     'Stylesheet' => $baseDir . '/main/inc/lib/phpdocx/pdf/include/stylesheet.cls.php',
     'SubLanguageManager' => $baseDir . '/main/admin/sub_language.class.php',
-    'SubscribeUserToLP' => $baseDir . '/main/newscorm/lp_subscribe_users.php',
     'Survey' => $baseDir . '/main/coursecopy/classes/Survey.class.php',
     'SurveyInvitation' => $baseDir . '/main/coursecopy/classes/SurveyInvitation.class.php',
     'SurveyLink' => $baseDir . '/main/gradebook/lib/be/surveylink.class.php',

+ 3 - 3
vendor/composer/autoload_real.php

@@ -2,7 +2,7 @@
 
 // autoload_real.php generated by Composer
 
-class ComposerAutoloaderInitb343d933ddd40380e938248e1d446981
+class ComposerAutoloaderInitb9f8cc78eb61aedad036fc9290633b9f
 {
     private static $loader;
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitb343d933ddd40380e938248e1d446981
             return self::$loader;
         }
 
-        spl_autoload_register(array('ComposerAutoloaderInitb343d933ddd40380e938248e1d446981', 'loadClassLoader'));
+        spl_autoload_register(array('ComposerAutoloaderInitb9f8cc78eb61aedad036fc9290633b9f', 'loadClassLoader'));
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        spl_autoload_unregister(array('ComposerAutoloaderInitb343d933ddd40380e938248e1d446981', 'loadClassLoader'));
+        spl_autoload_unregister(array('ComposerAutoloaderInitb9f8cc78eb61aedad036fc9290633b9f', 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);

+ 84 - 84
vendor/composer/installed.json

@@ -830,78 +830,6 @@
             "microframework"
         ]
     },
-    {
-        "name": "doctrine/dbal",
-        "version": "dev-master",
-        "version_normalized": "9999999-dev",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/doctrine/dbal.git",
-            "reference": "042cfa61d57bc4686f68a3021cd4a926f8348050"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/doctrine/dbal/zipball/042cfa61d57bc4686f68a3021cd4a926f8348050",
-            "reference": "042cfa61d57bc4686f68a3021cd4a926f8348050",
-            "shasum": ""
-        },
-        "require": {
-            "doctrine/common": "2.4.x-dev",
-            "php": ">=5.3.2"
-        },
-        "require-dev": {
-            "phpunit/phpunit": "3.7.*",
-            "symfony/console": "2.*"
-        },
-        "suggest": {
-            "symfony/console": "For helpful console commands such as SQL execution and import of files."
-        },
-        "time": "2013-02-27 12:20:01",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "2.4.x-dev"
-            }
-        },
-        "installation-source": "source",
-        "autoload": {
-            "psr-0": {
-                "Doctrine\\DBAL\\": "lib/"
-            }
-        },
-        "notification-url": "https://packagist.org/downloads/",
-        "license": [
-            "MIT"
-        ],
-        "authors": [
-            {
-                "name": "Jonathan Wage",
-                "email": "jonwage@gmail.com",
-                "homepage": "http://www.jwage.com/"
-            },
-            {
-                "name": "Guilherme Blanco",
-                "email": "guilhermeblanco@gmail.com",
-                "homepage": "http://www.instaclick.com"
-            },
-            {
-                "name": "Roman Borschel",
-                "email": "roman@code-factory.org"
-            },
-            {
-                "name": "Benjamin Eberlei",
-                "email": "kontakt@beberlei.de"
-            }
-        ],
-        "description": "Database Abstraction Layer",
-        "homepage": "http://www.doctrine-project.org",
-        "keywords": [
-            "database",
-            "dbal",
-            "persistence",
-            "queryobject"
-        ]
-    },
     {
         "name": "doctrine/migrations",
         "version": "dev-master",
@@ -2054,6 +1982,78 @@
             "silex"
         ]
     },
+    {
+        "name": "doctrine/dbal",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/doctrine/dbal.git",
+            "reference": "55128a6549b777ec91d7808989df236dbd508111"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/doctrine/dbal/zipball/55128a6549b777ec91d7808989df236dbd508111",
+            "reference": "55128a6549b777ec91d7808989df236dbd508111",
+            "shasum": ""
+        },
+        "require": {
+            "doctrine/common": "2.4.x-dev",
+            "php": ">=5.3.2"
+        },
+        "require-dev": {
+            "phpunit/phpunit": "3.7.*",
+            "symfony/console": "2.*"
+        },
+        "suggest": {
+            "symfony/console": "For helpful console commands such as SQL execution and import of files."
+        },
+        "time": "2013-03-04 22:33:37",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "2.4.x-dev"
+            }
+        },
+        "installation-source": "source",
+        "autoload": {
+            "psr-0": {
+                "Doctrine\\DBAL\\": "lib/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Jonathan Wage",
+                "email": "jonwage@gmail.com",
+                "homepage": "http://www.jwage.com/"
+            },
+            {
+                "name": "Guilherme Blanco",
+                "email": "guilhermeblanco@gmail.com",
+                "homepage": "http://www.instaclick.com"
+            },
+            {
+                "name": "Roman Borschel",
+                "email": "roman@code-factory.org"
+            },
+            {
+                "name": "Benjamin Eberlei",
+                "email": "kontakt@beberlei.de"
+            }
+        ],
+        "description": "Database Abstraction Layer",
+        "homepage": "http://www.doctrine-project.org",
+        "keywords": [
+            "database",
+            "dbal",
+            "persistence",
+            "queryobject"
+        ]
+    },
     {
         "name": "doctrine/orm",
         "version": "dev-master",
@@ -2061,12 +2061,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/doctrine/doctrine2.git",
-            "reference": "b30d6dfd8e88b67f63f2e154c0828d8e9ab7b8a0"
+            "reference": "399584db4c3db4846dd7038ec0ca5bec8dcafe54"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/b30d6dfd8e88b67f63f2e154c0828d8e9ab7b8a0",
-            "reference": "b30d6dfd8e88b67f63f2e154c0828d8e9ab7b8a0",
+            "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/399584db4c3db4846dd7038ec0ca5bec8dcafe54",
+            "reference": "399584db4c3db4846dd7038ec0ca5bec8dcafe54",
             "shasum": ""
         },
         "require": {
@@ -2078,7 +2078,7 @@
         "suggest": {
             "symfony/yaml": "If you want to use YAML Metadata Mapping Driver"
         },
-        "time": "2013-03-03 17:14:30",
+        "time": "2013-03-04 22:39:01",
         "bin": [
             "bin/doctrine",
             "bin/doctrine.php"
@@ -2133,12 +2133,12 @@
         "source": {
             "type": "git",
             "url": "https://github.com/l3pp4rd/DoctrineExtensions.git",
-            "reference": "80eb92fb80b06425260cb5d3488d852caa38df1f"
+            "reference": "v2.3.5"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/80eb92fb80b06425260cb5d3488d852caa38df1f",
-            "reference": "80eb92fb80b06425260cb5d3488d852caa38df1f",
+            "url": "https://api.github.com/repos/l3pp4rd/DoctrineExtensions/zipball/v2.3.5",
+            "reference": "v2.3.5",
             "shasum": ""
         },
         "require": {
@@ -2158,7 +2158,7 @@
             "doctrine/mongodb-odm": ">=1.0.0-BETA7",
             "doctrine/orm": ">=2.3.2"
         },
-        "time": "2013-03-04 13:45:49",
+        "time": "2013-03-05 06:32:22",
         "type": "library",
         "extra": {
             "branch-alias": {
@@ -2214,18 +2214,18 @@
         "source": {
             "type": "git",
             "url": "https://github.com/fzaninotto/Faker.git",
-            "reference": "843e60b04f923402b8a9d78c7ae742e09b581b1b"
+            "reference": "a1fd779b525c6a7669c136d23ca9c8130e4441b8"
         },
         "dist": {
             "type": "zip",
-            "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/843e60b04f923402b8a9d78c7ae742e09b581b1b",
-            "reference": "843e60b04f923402b8a9d78c7ae742e09b581b1b",
+            "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/a1fd779b525c6a7669c136d23ca9c8130e4441b8",
+            "reference": "a1fd779b525c6a7669c136d23ca9c8130e4441b8",
             "shasum": ""
         },
         "require": {
             "php": ">=5.3.3"
         },
-        "time": "2013-03-04 14:55:49",
+        "time": "2013-03-04 17:05:06",
         "type": "library",
         "extra": {
             "branch-alias": {

+ 5 - 2
vendor/doctrine/dbal/docs/en/reference/configuration.rst

@@ -119,6 +119,11 @@ pdo\_pgsql
 -  ``port`` (integer): Port of the database to connect to.
 -  ``dbname`` (string): Name of the database/schema to connect to.
 
+PostgreSQL behaves differently with regard to booleans when you use
+``PDO::ATTR_EMULATE_PREPARES`` or not. To switch from using ``'true'``
+and ``'false'`` as strings you can change to integers by using:
+``$conn->getDatabasePlatform()->setUseBooleanTrueFalseStrings($flag)``.
+
 pdo\_oci / oci8
 ^^^^^^^^^^^^^^^
 
@@ -159,5 +164,3 @@ Custom Driver Options
 The ``driverOptions`` option allows to pass arbitrary options
 through to the driver. This is equivalent to the fourth argument of
 the `PDO constructor <http://php.net/manual/en/pdo.construct.php>`_.
-
-

+ 22 - 0
vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php

@@ -33,6 +33,24 @@ use Doctrine\DBAL\Schema\TableDiff,
  */
 class PostgreSqlPlatform extends AbstractPlatform
 {
+    /**
+     * @var bool
+     */
+    private $useBooleanTrueFalseStrings = true;
+
+    /**
+     * PostgreSQL has different behavior with some drivers
+     * with regard to how booleans have to be handled.
+     *
+     * Enables use of 'true'/'false' or otherwise 1 and 0 instead.
+     *
+     * @param bool $flag
+     */
+    public function setUseBooleanTrueFalseStrings($flag)
+    {
+        $this->useBooleanTrueFalseStrings = (bool)$flag;
+    }
+
     /**
      * {@inheritDoc}
      */
@@ -522,6 +540,10 @@ class PostgreSqlPlatform extends AbstractPlatform
      */
     public function convertBooleans($item)
     {
+        if ( ! $this->useBooleanTrueFalseStrings) {
+            return parent::convertBooleans($item);
+        }
+
         if (is_array($item)) {
             foreach ($item as $key => $value) {
                 if (is_bool($value) || is_numeric($item)) {

+ 24 - 0
vendor/doctrine/dbal/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php

@@ -280,4 +280,28 @@ class PostgreSqlPlatformTest extends AbstractPlatformTestCase
             'CREATE INDEX IDX_22660D028A90ABA9 ON "quoted" ("key")',
         );
     }
+
+    /**
+     * @group DBAL-457
+     */
+    public function testConvertBooleanAsStrings()
+    {
+        $platform = $this->createPlatform();
+
+        $this->assertEquals('true', $platform->convertBooleans(true));
+        $this->assertEquals('false', $platform->convertBooleans(false));
+    }
+
+    /**
+     * @group DBAL-457
+     */
+    public function testConvertBooleanAsIntegers()
+    {
+        $platform = $this->createPlatform();
+        $platform->setUseBooleanTrueFalseStrings(false);
+
+        $this->assertEquals('1', $platform->convertBooleans(true));
+        $this->assertEquals('0', $platform->convertBooleans(false));
+    }
 }
+

+ 2 - 1
vendor/doctrine/orm/docs/en/index.rst

@@ -113,7 +113,8 @@ Cookbook
   :doc:`Using Wakeup Or Clone <cookbook/implementing-wakeup-or-clone>` |
   :doc:`Working with DateTime <cookbook/working-with-datetime>` |
   :doc:`Validation <cookbook/validation-of-entities>` |
-  :doc:`Entities in the Session <cookbook/entities-in-session>`
+  :doc:`Entities in the Session <cookbook/entities-in-session>` |
+  :doc:`Keeping your Modules independent <cookbook/resolve-target-entity-listener>`
 
 * **Integration into Frameworks/Libraries**
   :doc:`CodeIgniter <cookbook/integrating-with-codeigniter>`

+ 1 - 5
vendor/doctrine/orm/docs/en/reference/native-sql.rst

@@ -564,7 +564,6 @@ Let's now see an implicit declaration of the property / column.
 
         <?php
         namespace MyProject\Model;
-            <?php
             /**
              * @NamedNativeQueries({
              *      @NamedNativeQuery(
@@ -648,7 +647,6 @@ followed by a dot ("."), followed by the name or the field or property of the pr
 
         <?php
         namespace MyProject\Model;
-            <?php
             /**
              * @NamedNativeQueries({
              *      @NamedNativeQuery(
@@ -766,7 +764,6 @@ you can use the resultClass attribute instead of resultSetMapping:
 
         <?php
         namespace MyProject\Model;
-            <?php
             /**
              * @NamedNativeQueries({
              *      @NamedNativeQuery(
@@ -814,7 +811,6 @@ You actually can even mix, entities and scalar returns in the same native query
 
         <?php
         namespace MyProject\Model;
-            <?php
             /**
              * @NamedNativeQueries({
              *      @NamedNativeQuery(
@@ -867,4 +863,4 @@ You actually can even mix, entities and scalar returns in the same native query
               name: mappingCount
               columnResult:
                 count:
-                  name: count
+                  name: count

+ 9 - 4
vendor/fzaninotto/faker/src/Faker/Provider/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider;
 
 class Internet extends \Faker\Provider\Base
 {
-    protected static $safeEmailTld = array('org', 'com', 'net');
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com');
     protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org');
 
@@ -36,7 +35,7 @@ class Internet extends \Faker\Provider\Base
     /**
      * @example 'jdoe@example.com'
      */
-    public function safeEmail()
+    public final function safeEmail()
     {
         return preg_replace('/\s/', '', $this->userName() . '@' . static::safeEmailDomain());
     }
@@ -68,9 +67,15 @@ class Internet extends \Faker\Provider\Base
     /**
      * @example 'example.org'
      */
-    public static function safeEmailDomain()
+    public static final function safeEmailDomain()
     {
-        return 'example.' . static::randomElement(static::$safeEmailTld);
+        $domains = array(
+            'example.com',
+            'example.org',
+            'example.net'
+        );
+
+        return static::randomElement($domains);
     }
     /**
      * @example 'jdoe'

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/bg_BG/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\bg_BG;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('org', 'com', 'net', 'bg');
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'mail.bg', 'abv.bg', 'dir.bg');
     protected static $tld = array('bg', 'bg', 'bg', 'bg', 'bg', 'bg', 'com', 'biz', 'info', 'net', 'org');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/cs_CZ/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\cs_CZ;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'cz');
 
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'seznam.cz', 'atlas.cz', 'centrum.cz', 'email.cz', 'post.cz');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/de_DE/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\de_DE;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'net', 'de', 'de');
     protected static $freeEmailDomain = array('web.de', 'gmail.com', 'hotmail.de', 'yahoo.de', 'googlemail.com', 'aol.de', 'gmx.de');
     protected static $tld = array('com', 'com', 'com', 'net', 'org', 'de', 'de', 'de');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/en_GB/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\en_GB;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('org', 'com', 'net', 'co.uk');
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'gmail.co.uk', 'yahoo.co.uk', 'hotmail.co.uk');
     protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org', 'co.uk');
 }

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/fi_FI/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\fi_FI;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('org', 'com', 'net', 'fi');
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'jippii.fi', 'luukku.com');
     protected static $tld = array('com', 'com', 'com', 'com', 'com', 'com', 'biz', 'info', 'net', 'org', 'fi');
 }

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/fr_FR/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\fr_FR;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'net', 'fr', 'fr');
     protected static $freeEmailDomain = array('voila.fr', 'gmail.com', 'hotmail.fr', 'yahoo.fr', 'laposte.net', 'free.fr', 'sfr.fr', 'orange.fr', 'bouygtel.fr', 'club-internet.fr', 'dbmail.com', 'live.com', 'ifrance.com', 'noos.fr', 'tele2.fr', 'tiscali.fr', 'wanadoo.fr');
     protected static $tld = array('com', 'com', 'com', 'net', 'org', 'fr', 'fr', 'fr');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/it_IT/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\it_IT;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('org', 'com', 'net', 'it');
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'hotmail.com', 'email.it', 'libero.it', 'yahoo.it');
     protected static $tld = array('com', 'com', 'com', 'net', 'org', 'it', 'it', 'it');
 }

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/nl_BE/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\nl_BE;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'net', 'be', 'be');
     protected static $freeEmailDomain = array('gmail.com', 'hotmail.com', 'yahoo.com', 'advalvas.be');
     protected static $tld = array('com', 'com', 'com', 'net', 'org', 'be', 'be', 'be');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/nl_NL/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\nl_NL;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'net', 'nl', 'nl');
     protected static $freeEmailDomain = array('gmail.com', 'hotmail.nl', 'live.nl', 'yahoo.nl');
     protected static $tld = array('com', 'com', 'com', 'net', 'org', 'nl', 'nl', 'nl');
 }

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/pl_PL/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\pl_PL;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'pl');
 
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'wp.pl', 'onet.pl', 'interia.pl', 'gazeta.pl');
 

+ 0 - 1
vendor/fzaninotto/faker/src/Faker/Provider/sk_SK/Internet.php

@@ -4,7 +4,6 @@ namespace Faker\Provider\sk_SK;
 
 class Internet extends \Faker\Provider\Internet
 {
-    protected static $safeEmailTld = array('com', 'sk');
 
     protected static $freeEmailDomain = array('gmail.com', 'yahoo.com', 'zoznam.sk', 'atlas.', 'centrum.sk', 'azet.sk', 'post.sk');
 

+ 2 - 2
vendor/gedmo/doctrine-extensions/LICENSE

@@ -1,4 +1,4 @@
-Copyright (c) 2011-2012 Gediminas Morkevičius
+Copyright (c) 2011-2013 Gediminas Morkevičius
 
 The MIT license, reference http://www.opensource.org/licenses/mit-license.php
 
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE.

+ 7 - 42
vendor/gedmo/doctrine-extensions/README.md

@@ -7,7 +7,7 @@ refactoring doctrine2 extensions. The repository can be moved to the maintainers
 left on mine. I do not want users to lose availability of stable extensions which they were and are
 used to, at the moment.
 
-**Version 2.3.4**
+**Version 2.3.5**
 
 [![Build Status](https://secure.travis-ci.org/l3pp4rd/DoctrineExtensions.png?branch=master)](http://travis-ci.org/l3pp4rd/DoctrineExtensions)
 
@@ -17,6 +17,10 @@ with latest version of doctrine mapping at master branches
 
 ### Latest updates
 
+**2013-03-05**
+
+- A new extension - **References**, which links Entities in Documents and visa versa, [read more about it](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/references.md). It was contributed by @jwage, @avalanche123, @jmikola and @bobthecow, thanks
+
 **2013-02-05**
 
 - **Sluggable** added back slug handler mapping driver support for yaml and xml.
@@ -35,47 +39,6 @@ with latest version of doctrine mapping at master branches
 - **Sluggable** now allows to regenerate slug if its set to empty or null. Also it allows to
 manually set the slug, in that case it would only transliterate it and ensure uniqueness.
 
-**2012-04-09**
-
-- **Translatable** now does not force lowercase letters on locale or language. If your database is case
-sensitive, take this into account and upgrade your current translations in the database. This change
-will not be backported into 2.2 or older versions of extensions and will be available in comming
-releases.
-- **Sortable** now handles and synchronizes all object sort positions which are allready in memory
-of unitOfWork. Which does not require to do **$em->clear()** after each operation anymore.
-
-**2012-03-04**
-
-- We should be very grateful for contributions of [comfortablynumb](http://github.com/comfortablynumb)
-He has contributed most to these extensions and recently - long waited [softdeleteable
-behavior](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/softdeleteable.md) for **ORM** users. Also most important, there
-was a tree extension missing for **ODM** now everyone can enjoy [materialized path tree strategy](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/tree.md#materialized-path) for **ORM** including.
-
-**2012-02-26**
-
-- Removed slug handlers, this functionality brought complications which could not be maintained.
-
-**2012-02-15**
-
-- Add option to force **Translatable** store translation in default locale like any other.
-See [documentation](http://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/translatable.md#advanced-examples)
-
-**2012-01-29**
-
-- Translatable finally has **Personal Translations** which can relate through a real **foreign key**
-constraint and be used as a standard doctrine collection. This allows to configure domain
-objects anyway you prefere and still enjoy all features **Translatable** provides.
-- There were **BC** breaks introduced in **master** branch of extensions which is
-based on **doctrine2.3.x** version. If you are not interested in upgrading you can
-safely checkout at **2.2.x** or **2.1.x** [tag](http://github.com/l3pp4rd/DoctrineExtensions/tags).
-To upgrade your source code follow the [upgrade guide](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/upgrade/2-3-0.md)
-- Library now can map only **MappedSuperclass**es which would avoid generation of **ext_**
-tables which might not be used. Also it provides [convinient methods](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/lib/Gedmo/DoctrineExtensions.php#L66)
-to hook extension metadata drivers into metadata driver chain.
-- [Example demo application](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/example/em.php) has a detailed configuration provided, which
-explains and shows how extensions can or should be used with **Doctrine2** ORM. To install
-it follow the [steps](#example-demo).
-
 ### Summary and features
 
 This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and
@@ -94,6 +57,7 @@ records being flushed in the behavioral way. List of extensions:
 - **Translator** - explicit way to handle translations
 - **Softdeleteable** - allows to implicitly remove records
 - **Uploadable** - provides file upload handling in entity fields
+- **References** - supports linking Entities in Documents and visa versa
 
 Currently these extensions support **Yaml**, **Annotation**  and **Xml** mapping. Additional mapping drivers
 can be easily implemented using Mapping extension to handle the additional metadata mapping.
@@ -129,6 +93,7 @@ List of extensions which support ODM
 - Loggable
 - Translator
 - Tree (Materialized Path strategy for now)
+- References
 
 All these extensions can be nested together and mapped in traditional ways - annotations,
 xml or yaml

+ 219 - 0
vendor/gedmo/doctrine-extensions/doc/references.md

@@ -0,0 +1,219 @@
+# Cross Object Mapper References behavior extension for Doctrine 2
+
+Create documents and entities that contain references to each other.
+
+## Options
+
+The following options are possible on reference one and many associations:
+
+**Owning Side**
+
+- **type** - The type of association.
+- **class** - The associated class name.
+- **inversedBy** - The property name for the inverse side of this association.
+- **identifier** - The property name to store the associated object id in.
+
+**Inverse Side**
+
+- **type** - The type of association.
+- **class** - The associated class name.
+- **mappedBy** - The property name for the owning side of this association.
+
+## Annotations
+
+**@Gedmo\ReferenceOne**
+
+``` php
+<?php
+
+/**
+ * @Gedmo\ReferenceMany(type="entity", class="Entity\StockItem", mappedBy="product")
+ */
+private $stockItems;
+```
+
+**@Gedmo\ReferenceMany**
+
+``` php
+<?php
+
+/**
+ * @Gedmo\ReferenceOne(type="document", class="Document\Product", inversedBy="stockItems", identifier="productId")
+ */
+private $product;
+```
+
+## Example
+
+Here is an example where you have a Product which is mapped using the Doctrine MongoDB ODM project and it contains a property `$stockItems` that is populated from the Doctrine2 ORM.
+
+``` php
+<?php
+
+namespace Document;
+
+use Doctrine\Common\Collections\Collection;
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
+use Gedmo\Mapping\Annotation as Gedmo;
+
+/**
+ * @ODM\Document
+ */
+class Product
+{
+    /**
+     * @ODM\Id
+     */
+    private $id;
+
+    /**
+     * @ODM\String
+     */
+    private $name;
+
+    /**
+     * @Gedmo\ReferenceMany(type="entity", class="Entity\StockItem", mappedBy="product")
+     */
+    private $stockItems;
+
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    public function setId($id)
+    {
+        $this->id = $id;
+    }
+
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    public function setName($name)
+    {
+        $this->name = $name;
+    }
+
+    public function getStockItems()
+    {
+        return $this->stockItems;
+    }
+
+    public function setStockItems(Collection $stockItems)
+    {
+        $this->stockItems = $stockItems;
+    }
+}
+```
+
+The `StockItem` has a reference to the `Product` as well.
+
+``` php
+<?php
+
+namespace Entity;
+
+use Doctrine\ORM\Mapping as ORM;
+use Gedmo\Mapping\Annotation as Gedmo;
+use References\Fixture\ODM\MongoDB\Product;
+
+/**
+ * @ORM\Entity
+ */
+class StockItem
+{
+    /**
+     * @ORM\Id
+     * @ORM\Column(type="integer")
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    private $id;
+
+    /**
+     * @ORM\Column
+     */
+    private $name;
+
+    /**
+     * @ORM\Column
+     */
+    private $sku;
+
+    /**
+     * @ORM\Column(type="integer")
+     */
+    private $quantity;
+
+    /**
+     * @Gedmo\ReferenceOne(type="document", class="Document\Product", inversedBy="stockItems", identifier="productId")
+     */
+    private $product;
+
+    /**
+     * @ORM\Column(type="string")
+     */
+    private $productId;
+
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    public function setId($id)
+    {
+        $this->id = $id;
+    }
+
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    public function setName($name)
+    {
+        $this->name = $name;
+    }
+
+    public function getSku()
+    {
+        return $this->sku;
+    }
+
+    public function setSku($sku)
+    {
+        $this->sku = $sku;
+    }
+
+    public function getQuantity()
+    {
+        return $this->quantity;
+    }
+
+    public function setQuantity($quantity)
+    {
+        $this->quantity = $quantity;
+    }
+
+    public function setProduct(Product $product)
+    {
+        $this->product = $product;
+    }
+
+    public function getProduct()
+    {
+        return $this->product;
+    }
+
+    public function setProductId($productId)
+    {
+        $this->productId = $productId;
+    }
+
+    public function getProductId()
+    {
+        return $this->productId;
+    }
+}
+```

+ 2 - 1
vendor/gedmo/doctrine-extensions/doc/tree.md

@@ -592,7 +592,8 @@ $tree = $repo->buildTree($query->getArrayResult(), $options);
 
 ### Using routes in decorator, show only selected items, return unlimited levels items as 2 levels
 
-```
+``` php
+<?php
 $controller = $this;
         $tree = $root->childrenHierarchy(null,false,array('decorate' => true,
             'rootOpen' => function($tree) {

+ 25 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/Reference.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace Gedmo\Mapping\Annotation;
+
+use Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Reference annotation for ORM -> ODM references extension
+ * to be user like @ReferenceMany(type="entity", class="MyEntity", identifier="entity_id")
+ *
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @package Gedmo.Mapping.Annotation
+ * @subpackage Language
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ * @Annotation
+ */
+abstract class Reference extends Annotation
+{
+    public $type;
+    public $class;
+    public $identifier;
+    public $mappedBy;
+    public $inversedBy;
+}

+ 21 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceMany.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Gedmo\Mapping\Annotation;
+
+use Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Reference annotation for ORM -> ODM references extension
+ * to be user like @ReferenceOne(type="entity", class="MyEntity", identifier="entity_id")
+ *
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @package Gedmo.Mapping.Annotation
+ * @subpackage Language
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ * @Annotation
+ */
+class ReferenceMany extends Reference
+{
+}
+

+ 21 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/Mapping/Annotation/ReferenceOne.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace Gedmo\Mapping\Annotation;
+
+use Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Reference annotation for ORM -> ODM references extension
+ * to be user like @ReferenceOne(type="entity", class="MyEntity", identifier="entity_id")
+ *
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @package Gedmo.Mapping.Annotation
+ * @subpackage Language
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ * @Annotation
+ */
+class ReferenceOne extends Reference
+{
+}
+

+ 215 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/LazyCollection.php

@@ -0,0 +1,215 @@
+<?php
+
+namespace Gedmo\References;
+
+use Doctrine\Common\Collections\ArrayCollection;
+
+use Doctrine\Common\Collections\Collection;
+
+/**
+ * Lazy collection for loading reference many associations.
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo\References\Mapping\Event
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+class LazyCollection implements Collection
+{
+    private $results;
+    private $callback;
+
+    public function __construct($callback)
+    {
+        $this->callback = $callback;
+    }
+
+    public function add($element)
+    {
+        $this->initialize();
+        return $this->results->add($element);
+    }
+
+    public function clear()
+    {
+        $this->initialize();
+        return $this->results->clear();
+    }
+
+    public function contains($element)
+    {
+        $this->initialize();
+        return $this->results->contains($element);
+    }
+
+    public function containsKey($key)
+    {
+        $this->initialize();
+        return $this->results->containsKey($key);
+    }
+
+    public function current()
+    {
+        $this->initialize();
+        return $this->results->current();
+    }
+
+    public function exists(\Closure $p)
+    {
+        $this->initialize();
+        return $this->results->exists($p);
+    }
+
+    public function filter(\Closure $p)
+    {
+        $this->initialize();
+        return $this->results->filter($p);
+    }
+
+    public function first()
+    {
+        $this->initialize();
+        return $this->results->first();
+    }
+
+    public function forAll(\Closure $p)
+    {
+        $this->initialize();
+        return $this->results->forAll($p);
+    }
+
+    public function get($key)
+    {
+        $this->initialize();
+        return $this->results->get($key);
+    }
+
+    public function getKeys()
+    {
+        $this->initialize();
+        return $this->results->getKeys();
+    }
+
+    public function getValues()
+    {
+        $this->initialize();
+        return $this->results->getValues();
+    }
+
+    public function indexOf($element)
+    {
+        $this->initialize();
+        return $this->results->indexOf($element);
+    }
+
+    public function isEmpty()
+    {
+        $this->initialize();
+        return $this->results->isEmpty();
+    }
+
+    public function key()
+    {
+        $this->initialize();
+        return $this->results->key();
+    }
+
+    public function last()
+    {
+        $this->initialize();
+        return $this->results->last();
+    }
+
+    public function map(\Closure $func)
+    {
+        $this->initialize();
+        return $this->results->map($func);
+    }
+
+    public function next()
+    {
+        $this->initialize();
+        return $this->results->next();
+    }
+
+    public function partition(\Closure $p)
+    {
+        $this->initialize();
+        return $this->results->partition($p);
+    }
+
+    public function remove($key)
+    {
+        $this->initialize();
+        return $this->results->remove($key);
+    }
+
+    public function removeElement($element)
+    {
+        $this->initialize();
+        return $this->results->removeElement($element);
+    }
+
+    public function set($key, $value)
+    {
+        $this->initialize();
+        return $this->results->set($key, $value);
+    }
+
+    public function slice($offset, $length = null)
+    {
+        $this->initialize();
+        return $this->results->slice($offset, $length);
+    }
+
+    public function toArray()
+    {
+        $this->initialize();
+        return $this->results->toArray();
+    }
+
+    public function offsetExists($offset)
+    {
+        $this->initialize();
+        return $this->results->offsetExists($offset);
+    }
+
+    public function offsetGet($offset)
+    {
+        $this->initialize();
+        return $this->results->offsetGet($offset);
+    }
+
+    public function offsetSet($offset, $value)
+    {
+        $this->initialize();
+        return $this->results->offsetSet($offset, $value);
+    }
+
+    public function offsetUnset($offset)
+    {
+        $this->initialize();
+        return $this->results->offsetUnset($offset);
+    }
+
+    public function getIterator()
+    {
+        $this->initialize();
+        return $this->results->getIterator();
+    }
+
+    public function count()
+    {
+        $this->initialize();
+        return $this->results->count();
+    }
+
+    private function initialize()
+    {
+        if (null === $this->results) {
+            $this->results = call_user_func($this->callback);
+        }
+    }
+}

+ 99 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Driver/Annotation.php

@@ -0,0 +1,99 @@
+<?php
+
+namespace Gedmo\References\Mapping\Driver;
+
+use Gedmo\Mapping\Driver\AnnotationDriverInterface,
+    Doctrine\Common\Annotations\AnnotationReader,
+    Doctrine\Common\Persistence\Mapping\ClassMetadata,
+    Gedmo\Exception\InvalidMappingException;
+
+/**
+ * This is an annotation mapping driver for References
+ * behavioral extension.
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo.References.Mapping.Driver
+ * @subpackage Annotation
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+class Annotation implements AnnotationDriverInterface
+{
+    /**
+     * Annotation to mark field as reference to one
+     */
+    const REFERENCE_ONE = 'Gedmo\\Mapping\\Annotation\\ReferenceOne';
+
+    /**
+     * Annotation to mark field as reference to many
+     */
+    const REFERENCE_MANY = 'Gedmo\\Mapping\\Annotation\\ReferenceMany';
+
+    private $annotations = array(
+        'referenceOne'  => self::REFERENCE_ONE,
+        'referenceMany' => self::REFERENCE_MANY,
+    );
+
+    /**
+     * Annotation reader instance
+     *
+     * @var object
+     */
+    private $reader;
+
+    /**
+     * original driver if it is available
+     */
+    protected $_originalDriver = null;
+
+    /**
+     * {@inheritDoc}
+     */
+    public function setAnnotationReader($reader)
+    {
+        $this->reader = $reader;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function readExtendedMetadata($meta, array &$config)
+    {
+        $class = $meta->getReflectionClass();
+        foreach($this->annotations as $key => $annotation) {
+            $config[$key] = array();
+            foreach ($class->getProperties() as $property) {
+                if ($meta->isMappedSuperclass && !$property->isPrivate() ||
+                    $meta->isInheritedField($property->name) ||
+                    isset($meta->associationMappings[$property->name]['inherited'])
+                ) {
+                    continue;
+                }
+
+                if ($reference = $this->reader->getPropertyAnnotation($property, $annotation)) {
+                    $config[$key][$property->getName()] = array(
+                        'field'      => $property->getName(),
+                        'type'       => $reference->type,
+                        'class'      => $reference->class,
+                        'identifier' => $reference->identifier,
+                        'mappedBy'   => $reference->mappedBy,
+                        'inversedBy' => $reference->inversedBy,
+                    );
+                }
+            }
+        }
+    }
+
+    /**
+     * Passes in the mapping read by original driver
+     *
+     * @param $driver
+     * @return void
+     */
+    public function setOriginalDriver($driver)
+    {
+        $this->_originalDriver = $driver;
+    }
+}

+ 99 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/Adapter/ODM.php

@@ -0,0 +1,99 @@
+<?php
+
+namespace Gedmo\References\Mapping\Event\Adapter;
+
+use Doctrine\Common\Persistence\ObjectManager;
+use Doctrine\ODM\MongoDB\DocumentManager;
+use Doctrine\ODM\MongoDB\Proxy\Proxy as MongoDBProxy;
+use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\Proxy\Proxy as ORMProxy;
+use Gedmo\Exception\InvalidArgumentException;
+use Gedmo\Mapping\Event\Adapter\ODM as BaseAdapterODM;
+use Gedmo\References\Mapping\Event\ReferencesAdapter;
+
+/**
+ * Doctrine event adapter for ODM references behavior
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo\References\Mapping\Event\Adapter
+ * @subpackage ODM
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+final class ODM extends BaseAdapterODM implements ReferencesAdapter
+{
+    /**
+     * @inheritDoc
+     */
+    public function getIdentifier($om, $object, $single = true)
+    {
+        if ($om instanceof DocumentManager) {
+            return $this->extractIdentifier($om, $object, $single);
+        }
+
+        if ($om instanceof EntityManager) {
+            if ($object instanceof ORMProxy) {
+                $id = $om->getUnitOfWork()->getEntityIdentifier($object);
+            } else {
+                $meta = $om->getClassMetadata(get_class($object));
+                $id = array();
+                foreach ($meta->identifier as $name) {
+                    $id[$name] = $meta->getReflectionProperty($name)->getValue($object);
+                    // return null if one of identifiers is missing
+                    if (!$id[$name]) {
+                        return null;
+                    }
+                }
+            }
+
+            if ($single) {
+                $id = current($id);
+            }
+
+            return $id;
+        }
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getSingleReference($om, $class, $identifier)
+    {
+        $this->throwIfNotEntityManager($om);
+        $meta = $om->getClassMetadata($class);
+
+        if (!$meta->isInheritanceTypeNone()) {
+            return $om->find($class, $identifier);
+        }
+
+        return $om->getReference($class, $identifier);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function extractIdentifier($om, $object, $single = true)
+    {
+        $meta = $om->getClassMetadata(get_class($object));
+        if ($object instanceof MongoDBProxy) {
+            $id = $om->getUnitOfWork()->getDocumentIdentifier($object);
+        } else {
+            $id = $meta->getReflectionProperty($meta->identifier)->getValue($object);
+        }
+
+        if ($single || !$id) {
+            return $id;
+        } else {
+            return array($meta->identifier => $id);
+        }
+    }
+
+    /**
+     * Override so we don't get an exception. We want to allow this.
+     */
+    private function throwIfNotEntityManager(EntityManager $em)
+    {
+    }
+}

+ 98 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/Adapter/ORM.php

@@ -0,0 +1,98 @@
+<?php
+
+namespace Gedmo\References\Mapping\Event\Adapter;
+
+use Doctrine\Common\Persistence\ObjectManager;
+use Doctrine\ODM\MongoDB\DocumentManager;
+use Doctrine\ODM\MongoDB\Proxy\Proxy as MongoDBProxy;
+use Doctrine\ORM\EntityManager;
+use Doctrine\ORM\Proxy\Proxy as ORMProxy;
+use Gedmo\Mapping\Event\Adapter\ORM as BaseAdapterORM;
+use Gedmo\References\Mapping\Event\ReferencesAdapter;
+
+/**
+ * Doctrine event adapter for ORM references behavior
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo\References\Mapping\Event\Adapter
+ * @subpackage ORM
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+final class ORM extends BaseAdapterORM implements ReferencesAdapter
+{
+    /**
+     * @inheritDoc
+     */
+    public function getIdentifier($om, $object, $single = true)
+    {
+        if ($om instanceof EntityManager) {
+            return $this->extractIdentifier($om, $object, $single);
+        }
+
+        if ($om instanceof DocumentManager) {
+            $meta = $om->getClassMetadata(get_class($object));
+            if ($object instanceof MongoDBProxy) {
+                $id = $om->getUnitOfWork()->getDocumentIdentifier($object);
+            } else {
+                $id = $meta->getReflectionProperty($meta->identifier)->getValue($object);
+            }
+
+            if ($single || !$id) {
+                return $id;
+            }
+
+            return array($meta->identifier => $id);
+        }
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function getSingleReference($om, $class, $identifier)
+    {
+        $this->throwIfNotDocumentManager($om);
+        $meta = $om->getClassMetadata($class);
+
+        if (!$meta->isInheritanceTypeNone()) {
+            return $om->find($class, $identifier);
+        }
+
+        return $om->getReference($class, $identifier);
+    }
+
+    /**
+     * @inheritDoc
+     */
+    public function extractIdentifier($om, $object, $single = true)
+    {
+        if ($object instanceof ORMProxy) {
+            $id = $om->getUnitOfWork()->getEntityIdentifier($object);
+        } else {
+            $meta = $om->getClassMetadata(get_class($object));
+            $id = array();
+            foreach ($meta->identifier as $name) {
+                $id[$name] = $meta->getReflectionProperty($name)->getValue($object);
+                // return null if one of identifiers is missing
+                if (!$id[$name]) {
+                    return null;
+                }
+            }
+        }
+
+        if ($single) {
+            $id = current($id);
+        }
+
+        return $id;
+    }
+
+    /**
+     * Override so we don't get an exception. We want to allow this.
+     */
+    private function throwIfNotDocumentManager(DocumentManager $dm)
+    {
+    }
+}

+ 50 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/Mapping/Event/ReferencesAdapter.php

@@ -0,0 +1,50 @@
+<?php
+
+namespace Gedmo\References\Mapping\Event;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+use Doctrine\Common\Persistence\ObjectManager;
+use Gedmo\Mapping\Event\AdapterInterface;
+
+/**
+ * Doctrine event adapter interface for References behavior
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo\References\Mapping\Event
+ * @subpackage ReferencesAdapter
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+interface ReferencesAdapter extends AdapterInterface
+{
+    /**
+     * Gets the identifier of the given object using the passed ObjectManager.
+     *
+     * @param ObjectManager $om
+     * @param object $object
+     * @param bool $single
+     * @return array|scalar $id - array or single identifier
+     */
+    function getIdentifier($om, $object, $single = true);
+
+    /**
+     * Gets a single reference for the given ObjectManager, class and identifier.
+     *
+     * @param ObjectManager $om
+     * @param string $class
+     * @param array|scalar $identifier
+     **/
+    function getSingleReference($om, $class, $identifier);
+
+    /**
+     * Extracts identifiers from object or proxy.
+     *
+     * @param DocumentManager $om
+     * @param object $object
+     * @param bool $single
+     * @return array|scalar - array or single identifier
+     */
+    function extractIdentifier($om, $object, $single = true);
+}

+ 158 - 0
vendor/gedmo/doctrine-extensions/lib/Gedmo/References/ReferencesListener.php

@@ -0,0 +1,158 @@
+<?php
+
+namespace Gedmo\References;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\Common\EventArgs;
+use Doctrine\ORM\Mapping\ClassMetadata as ORMClassMetadata;
+use Doctrine\ORM\EntityManager;
+use Doctrine\ODM\MongoDB\DocumentManager;
+use Doctrine\ODM\MongoDB\Mapping\ClassMetadata as MongoDBClassMetadata;
+use Gedmo\Exception\InvalidArgumentException;
+use Gedmo\Mapping\MappedEventSubscriber;
+
+/**
+ * Listener for loading and persisting cross database references.
+ *
+ * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
+ * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
+ * @author Jonathan H. Wage <jonwage@gmail.com>
+ * @package Gedmo\References\Mapping\Event
+ * @subpackage MappedEventSubscriber
+ * @link http://www.gediminasm.org
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+class ReferencesListener extends MappedEventSubscriber
+{
+    private $managers;
+
+    public function __construct(array $managers = array())
+    {
+        $this->managers = $managers;
+    }
+
+    public function loadClassMetadata(EventArgs $eventArgs)
+    {
+        $ea = $this->getEventAdapter($eventArgs);
+        $this->loadMetadataForObjectClass(
+            $ea->getObjectManager(), $eventArgs->getClassMetadata()
+        );
+    }
+
+    public function postLoad(EventArgs $eventArgs)
+    {
+        $ea = $this->getEventAdapter($eventArgs);
+        $om = $ea->getObjectManager();
+        $object = $ea->getObject();
+        $meta = $om->getClassMetadata(get_class($object));
+        $config = $this->getConfiguration($om, $meta->name);
+        foreach ($config['referenceOne'] as $mapping) {
+            $property = $meta->reflClass->getProperty($mapping['field']);
+            $property->setAccessible(true);
+            if (isset($mapping['identifier'])) {
+                $referencedObjectId = $meta->getFieldValue($object, $mapping['identifier']);
+                if (null !== $referencedObjectId) {
+                    $property->setValue(
+                        $object,
+                        $ea->getSingleReference(
+                            $this->getManager($mapping['type']),
+                            $mapping['class'],
+                            $referencedObjectId
+                        )
+                    );
+                }
+            }
+        }
+
+        foreach ($config['referenceMany'] as $mapping) {
+            $property = $meta->reflClass->getProperty($mapping['field']);
+            $property->setAccessible(true);
+            if (isset($mapping['mappedBy'])) {
+                $id = $ea->extractIdentifier($om, $object);
+                $manager = $this->getManager($mapping['type']);
+                $class = $mapping['class'];
+                $refMeta = $manager->getClassMetadata($class);
+                $refConfig = $this->getConfiguration($manager, $refMeta->name);
+                if (isset($refConfig['referenceOne'][$mapping['mappedBy']])) {
+                    $refMapping = $refConfig['referenceOne'][$mapping['mappedBy']];
+                    $identifier = $refMapping['identifier'];
+                    $property->setValue(
+                        $object,
+                        new LazyCollection(
+                            function() use ($id, &$manager, $class, $identifier) {
+                                $results = $manager
+                                    ->getRepository($class)
+                                    ->findBy(array(
+                                        $identifier => $id,
+                                    ));
+
+                                return new ArrayCollection((is_array($results) ? $results : $results->toArray()));
+                            }
+                        )
+                    );
+                }
+            }
+        }
+    }
+
+    public function prePersist(EventArgs $eventArgs)
+    {
+        $this->updateReferences($eventArgs);
+    }
+
+    public function preUpdate(EventArgs $eventArgs)
+    {
+        $this->updateReferences($eventArgs);
+    }
+
+    public function getSubscribedEvents()
+    {
+        return array(
+            'postLoad',
+            'loadClassMetadata',
+            'prePersist',
+            'preUpdate',
+        );
+    }
+
+    public function registerManager($type, $manager)
+    {
+        $this->managers[$type] = $manager;
+    }
+
+    public function getManager($type)
+    {
+        return $this->managers[$type];
+    }
+
+    protected function getNamespace()
+    {
+        return __NAMESPACE__;
+    }
+
+    private function updateReferences(EventArgs $eventArgs)
+    {
+        $ea = $this->getEventAdapter($eventArgs);
+        $om = $ea->getObjectManager();
+        $object = $ea->getObject();
+        $meta = $om->getClassMetadata(get_class($object));
+        $config = $this->getConfiguration($om, $meta->name);
+        foreach ($config['referenceOne'] as $mapping) {
+            if (isset($mapping['identifier'])) {
+                $property = $meta->reflClass->getProperty($mapping['field']);
+                $property->setAccessible(true);
+                $referencedObject = $property->getValue($object);
+                if (is_object($referencedObject)) {
+                    $meta->setFieldValue(
+                        $object,
+                        $mapping['identifier'],
+                        $ea->getIdentifier(
+                            $this->getManager($mapping['type']),
+                            $referencedObject
+                        )
+                    );
+                }
+            }
+        }
+    }
+}

+ 58 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/References/Fixture/ODM/MongoDB/Product.php

@@ -0,0 +1,58 @@
+<?php
+
+namespace References\Fixture\ODM\MongoDB;
+
+use Doctrine\Common\Collections\Collection;
+use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
+use Gedmo\Mapping\Annotation as Gedmo;
+
+/**
+ * @ODM\Document
+ */
+class Product
+{
+    /**
+     * @ODM\Id
+     */
+    private $id;
+
+    /**
+     * @ODM\String
+     */
+    private $name;
+
+    /**
+     * @Gedmo\ReferenceMany(type="entity", class="References\Fixture\ORM\StockItem", mappedBy="product")
+     */
+    private $stockItems;
+
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    public function setId($id)
+    {
+        $this->id = $id;
+    }
+
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    public function setName($name)
+    {
+        $this->name = $name;
+    }
+
+    public function getStockItems()
+    {
+        return $this->stockItems;
+    }
+
+    public function setStockItems(Collection $stockItems)
+    {
+        $this->stockItems = $stockItems;
+    }
+}

+ 105 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/References/Fixture/ORM/StockItem.php

@@ -0,0 +1,105 @@
+<?php
+
+namespace References\Fixture\ORM;
+
+use Doctrine\ORM\Mapping as ORM;
+use Gedmo\Mapping\Annotation as Gedmo;
+use References\Fixture\ODM\MongoDB\Product;
+
+/**
+ * @ORM\Entity
+ */
+class StockItem
+{
+    /**
+     * @ORM\Id
+     * @ORM\Column(type="integer")
+     * @ORM\GeneratedValue(strategy="IDENTITY")
+     */
+    private $id;
+
+    /**
+     * @ORM\Column
+     */
+    private $name;
+
+    /**
+     * @ORM\Column
+     */
+    private $sku;
+
+    /**
+     * @ORM\Column(type="integer")
+     */
+    private $quantity;
+
+    /**
+     * @Gedmo\ReferenceOne(type="document", class="References\Fixture\ODM\MongoDB\Product", inversedBy="stockItems", identifier="productId")
+     */
+    private $product;
+
+    /**
+     * @ORM\Column(type="string")
+     */
+    private $productId;
+
+    public function getId()
+    {
+        return $this->id;
+    }
+
+    public function setId($id)
+    {
+        $this->id = $id;
+    }
+
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    public function setName($name)
+    {
+        $this->name = $name;
+    }
+
+    public function getSku()
+    {
+        return $this->sku;
+    }
+
+    public function setSku($sku)
+    {
+        $this->sku = $sku;
+    }
+
+    public function getQuantity()
+    {
+        return $this->quantity;
+    }
+
+    public function setQuantity($quantity)
+    {
+        $this->quantity = $quantity;
+    }
+
+    public function setProduct(Product $product)
+    {
+        $this->product = $product;
+    }
+
+    public function getProduct()
+    {
+        return $this->product;
+    }
+
+    public function setProductId($productId)
+    {
+        $this->productId = $productId;
+    }
+
+    public function getProductId()
+    {
+        return $this->productId;
+    }
+}

+ 123 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/References/ReferencesListenerTest.php

@@ -0,0 +1,123 @@
+<?php
+
+namespace Gedmo\References;
+
+use Doctrine\Common\Annotations\AnnotationReader;
+use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver as MongoDBAnnotationDriver;
+use Doctrine\ODM\MongoDB\Configuration;
+use Doctrine\ORM\Mapping\Driver\AnnotationDriver as ORMAnnotationDriver;
+use References\Fixture\ODM\MongoDB\Product;
+use References\Fixture\ORM\StockItem;
+use Tool\BaseTestCaseOM;
+
+class ReferencesListenerTest extends BaseTestCaseOM
+{
+    private $em;
+    private $dm;
+
+    protected function setUp()
+    {
+        parent::setUp();
+
+        $reader = new AnnotationReader();
+
+        $this->dm = $this->getMockDocumentManager('test', new MongoDBAnnotationDriver($reader, __DIR__ . '/Fixture/ODM/MongoDB'));
+
+        $listener = new ReferencesListener(array(
+            'document' => $this->dm
+        ));
+
+        $this->evm->addEventSubscriber($listener);
+
+        $reader = new AnnotationReader();
+
+        $this->em = $this->getMockSqliteEntityManager(array('References\Fixture\ORM\StockItem'), new ORMAnnotationDriver($reader, __DIR__ . '/Fixture/ORM'));
+
+        $listener->registerManager('entity', $this->em);
+    }
+
+    public function testShouldPersistReferencedIdentifiersIntoIdentifierField()
+    {
+        $stockItem = new StockItem();
+        $stockItem->setName('Apple TV');
+        $stockItem->setSku('APP-TV');
+        $stockItem->setQuantity(25);
+
+        $product = new Product();
+        $product->setName('Apple TV');
+
+        $this->dm->persist($product);
+        $this->dm->flush();
+
+        $stockItem->setProduct($product);
+
+        $this->em->persist($stockItem);
+
+        $this->assertEquals($product->getId(), $stockItem->getProductId());
+    }
+
+    public function testShouldPopulateReferenceOneWithProxyFromIdentifierField()
+    {
+        $product = new Product();
+        $product->setName('Apple TV');
+
+        $this->dm->persist($product);
+        $this->dm->flush();
+
+        $stockItem = new StockItem();
+        $stockItem->setName('Apple TV');
+        $stockItem->setSku('APP-TV');
+        $stockItem->setQuantity(25);
+        $stockItem->setProductId($product->getId());
+
+        $this->em->persist($stockItem);
+        $this->em->flush();
+        $this->em->clear();
+
+        $stockItem = $this->em->find(get_class($stockItem), $stockItem->getId());
+
+        $this->assertSame($product, $stockItem->getProduct());
+    }
+
+    public function testShouldPopulateReferenceManyWithLazyCollectionInstance()
+    {
+        $product = new Product();
+        $product->setName('Apple TV');
+
+        $this->dm->persist($product);
+        $this->dm->flush();
+        $this->dm->clear();
+
+        $stockItem = new StockItem();
+        $stockItem->setName('Apple TV');
+        $stockItem->setSku('APP-TV');
+        $stockItem->setQuantity(25);
+        $stockItem->setProductId($product->getId());
+
+        $this->em->persist($stockItem);
+
+        $stockItem = new StockItem();
+        $stockItem->setName('Apple TV');
+        $stockItem->setSku('AMZN-APP-TV');
+        $stockItem->setQuantity(25);
+        $stockItem->setProductId($product->getId());
+
+        $this->em->persist($stockItem);
+        $this->em->flush();
+
+        $product = $this->dm->find(get_class($product), $product->getId());
+
+        $this->assertInstanceOf('Doctrine\Common\Collections\Collection', $product->getStockItems());
+        $this->assertEquals(2, $product->getStockItems()->count());
+
+        $first = $product->getStockItems()->first();
+
+        $this->assertInstanceOf(get_class($stockItem), $first);
+        $this->assertEquals('APP-TV', $first->getSku());
+
+        $last = $product->getStockItems()->last();
+
+        $this->assertInstanceOf(get_class($stockItem), $last);
+        $this->assertEquals('AMZN-APP-TV', $last->getSku());
+    }
+}

+ 6 - 0
vendor/gedmo/doctrine-extensions/tests/Gedmo/Tool/BaseTestCaseOM.php

@@ -301,6 +301,12 @@ abstract class BaseTestCaseOM extends \PHPUnit_Framework_TestCase
             ->method('getClassMetadataFactoryName')
             ->will($this->returnValue('Doctrine\\ORM\\Mapping\\ClassMetadataFactory'));
 
+        $config
+            ->expects($this->any())
+            ->method('getDefaultRepositoryClassName')
+            ->will($this->returnValue('Doctrine\\ORM\\EntityRepository'))
+        ;
+
         $config
             ->expects($this->any())
             ->method('getQuoteStrategy')

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

@@ -50,6 +50,7 @@ $loader->add('SoftDeleteable\\Fixture', __DIR__ . '/Gedmo');
 $loader->add('Uploadable\\Fixture', __DIR__ . '/Gedmo');
 $loader->add('Wrapper\\Fixture', __DIR__ . '/Gedmo');
 $loader->add('ReferenceIntegrity\\Fixture', __DIR__ . '/Gedmo');
+$loader->add('References\\Fixture', __DIR__ . '/Gedmo');
 // stubs
 $loader->add('Gedmo\\Uploadable\\Stub', __DIR__);
 

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

@@ -53,6 +53,9 @@
         <testsuite name="ReferenceIntegrity Extension">
             <directory suffix="Test.php">./Gedmo/ReferenceIntegrity/</directory>
         </testsuite>
+        <testsuite name="References Extension">
+            <directory suffix="Test.php">./Gedmo/References/</directory>
+        </testsuite>
     </testsuites>
 
     <filter>