commit 343d66a79d46ca4911131cba2b161b11d3a4391f
Author: Tomáš Ballák <balllak.tomas@gmail.com>
Date:   Wed Apr 8 14:30:04 2020 +0200

    new changes

diff --git a/build/php-fpm/dev/Dockerfile b/build/php-fpm/dev/Dockerfile
index d476d55..eb02b0b 100644
--- a/build/php-fpm/dev/Dockerfile
+++ b/build/php-fpm/dev/Dockerfile
@@ -25,3 +25,7 @@ RUN apk --update --no-cache add autoconf g++ make && \
     docker-php-ext-enable xdebug && \
     apk del --purge autoconf g++ make
 RUN echo zend_extension="$(find / -name 'xdebug.so')" >> /etc/php7/conf.d/xdebug.ini
+RUN echo -e "\n" >> /usr/local/etc/php/php.ini-development
+RUN echo -e "\n" >> /usr/local/etc/php/php.ini-production
+RUN echo -e "extension=mongodb.so" >> /usr/local/etc/php/php.ini-development
+RUN echo -e "extension=mongodb.so" >> /usr/local/etc/php/php.ini-production
\ No newline at end of file
diff --git a/website/composer.json b/website/composer.json
index 27f8e6e..a28c41f 100644
--- a/website/composer.json
+++ b/website/composer.json
@@ -7,6 +7,8 @@
         "php": "^7.2.5",
         "ext-ctype": "*",
         "ext-iconv": "*",
+        "alcaeus/mongo-php-adapter": "^1.1",
+        "doctrine/mongodb-odm": "^2.0",
         "doctrine/mongodb-odm-bundle": "^4.1",
         "symfony/console": "5.0.*",
         "symfony/dotenv": "5.0.*",
@@ -22,7 +24,10 @@
         "preferred-install": {
             "*": "dist"
         },
-        "sort-packages": true
+        "sort-packages": true,
+        "platform": {
+            "ext-mongo": "1.6.16"
+        }
     },
     "autoload": {
         "psr-4": {
diff --git a/website/composer.lock b/website/composer.lock
index 997f6aa..a4ccc9c 100644
--- a/website/composer.lock
+++ b/website/composer.lock
@@ -4,8 +4,74 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "89f5356e79d07af8f66a1d7aa412c992",
+    "content-hash": "c3005e8bd1ce383e1ee58d624e0eb875",
     "packages": [
+        {
+            "name": "alcaeus/mongo-php-adapter",
+            "version": "1.1.11",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/alcaeus/mongo-php-adapter.git",
+                "reference": "43b6add94c8b4cb9890d662cba4c0defde733dcf"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/alcaeus/mongo-php-adapter/zipball/43b6add94c8b4cb9890d662cba4c0defde733dcf",
+                "reference": "43b6add94c8b4cb9890d662cba4c0defde733dcf",
+                "shasum": ""
+            },
+            "require": {
+                "ext-ctype": "*",
+                "ext-hash": "*",
+                "ext-mongodb": "^1.2.0",
+                "mongodb/mongodb": "^1.0.1",
+                "php": "^5.6 || ^7.0"
+            },
+            "provide": {
+                "ext-mongo": "1.6.14"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.7.27 || ^6.0 || ^7.0",
+                "squizlabs/php_codesniffer": "^3.2"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "1.1.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-0": {
+                    "Mongo": "lib/Mongo"
+                },
+                "psr-4": {
+                    "Alcaeus\\MongoDbAdapter\\": "lib/Alcaeus/MongoDbAdapter"
+                },
+                "files": [
+                    "lib/Mongo/functions.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "alcaeus",
+                    "email": "alcaeus@alcaeus.org"
+                },
+                {
+                    "name": "Olivier Lechevalier",
+                    "email": "olivier.lechevalier@gmail.com"
+                }
+            ],
+            "description": "Adapter to provide ext-mongo interface on top of mongo-php-libary",
+            "keywords": [
+                "database",
+                "mongodb"
+            ],
+            "time": "2019-11-11T20:47:32+00:00"
+        },
         {
             "name": "doctrine/annotations",
             "version": "1.10.1",
@@ -3879,5 +3945,8 @@
         "ext-iconv": "*"
     },
     "platform-dev": [],
+    "platform-overrides": {
+        "ext-mongo": "1.6.16"
+    },
     "plugin-api-version": "1.1.0"
 }
diff --git a/website/config/packages/doctrine_mongodb.yaml b/website/config/packages/doctrine_mongodb.yaml
index 8b8bb69..a4b98ea 100644
--- a/website/config/packages/doctrine_mongodb.yaml
+++ b/website/config/packages/doctrine_mongodb.yaml
@@ -7,7 +7,6 @@ doctrine_mongodb:
             options: 
                 username: root
                 password: root
-                authSource: test
     default_database: '%env(resolve:MONGODB_DB)%'
     document_managers:
         default:
diff --git a/website/src/Controller/IndexController.php b/website/src/Controller/IndexController.php
index 6f0b61f..9285150 100644
--- a/website/src/Controller/IndexController.php
+++ b/website/src/Controller/IndexController.php
@@ -7,14 +7,19 @@ use Doctrine\ODM\MongoDB\DocumentManager;
 use Symfony\Component\HttpFoundation\Response;
 use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
 
-class IndexController extends AbstractController {
-    public function index(DocumentManager $dm): Response {
+class IndexController extends AbstractController
+{
+    public function index(DocumentManager $dm): Response
+    {
         $number = random_int(0, 100);
-
+        $test = new Test();
+        $test->setName('A Foo Bar');
+    
+        $dm->persist($test);
+        $dm->flush();
         $test = $dm->getRepository(Test::class)->findAll();
-
         return new Response(
-            '<html><body>Lucky number: '.$number.'</body></html>'
+            '<html><body>Lucky number: '. ($test ? 'not null' : 'null') .'</body></html>'
         );
     }
 }
diff --git a/website/src/Document/Test.php b/website/src/Document/Test.php
index f2b520b..85be984 100644
--- a/website/src/Document/Test.php
+++ b/website/src/Document/Test.php
@@ -17,4 +17,12 @@ class Test {
      * @MongoDB\Field(type="string")
      */
     protected $name;
+
+    public function setName(string $name) {
+        $this->name = $name;
+    }
+
+    public function getName(): string {
+        return $this->name;
+    }
 }
diff --git a/website/symfony.lock b/website/symfony.lock
index 55d4179..0ae8f76 100644
--- a/website/symfony.lock
+++ b/website/symfony.lock
@@ -1,4 +1,7 @@
 {
+    "alcaeus/mongo-php-adapter": {
+        "version": "1.1.11"
+    },
     "composer/semver": {
         "version": "1.5.1"
     },
