diff --git a/.env.example b/.env.example
index e0b95d5..fcae4d6 100644
--- a/.env.example
+++ b/.env.example
@@ -3,3 +3,4 @@ DB_HOST=127.0.0.1
 DB_NAME=phalcon
 DB_USERNAME=root
 DB_PASSWORD=password
+DB_PORT=3306
\ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..4abf452
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,47 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+  tests:
+    runs-on: ubuntu-latest
+
+    services:
+      mysql:
+        image: mysql:5.7
+        env:
+          MYSQL_ROOT_PASSWORD: password
+          MYSQL_DATABASE: phalcon
+        ports:
+          - 3306:3306
+        options: >-
+          --health-cmd "mysqladmin ping"
+          --health-interval 10s
+          --health-timeout 5s
+          --health-retries 5
+    strategy:
+      matrix:
+        php: [7.2, 7.3, 7.4]
+
+    steps:
+    - name: Checkout code
+      uses: actions/checkout@v2
+
+    - name: Setup PHP
+      uses: shivammathur/setup-php@v2
+      with:
+        php-version: ${{ matrix.php }}
+        extensions: phalcon4, pdo, mysql
+        coverage: none
+
+    - name: Validate composer.json and composer.lock
+      run: composer validate
+
+    - name: Install dependencies
+      run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
+
+    - name: Run test suite
+      run: |
+        php -r "file_exists('.env') || copy('.env.example', '.env');"
+        php vendor/bin/codecept build
+        php vendor/bin/codecept run unit
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
deleted file mode 100644
index f014dde..0000000
--- a/.github/workflows/tests.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-# GitHub Action for Phalcon with MySQL
-## Notes
-## Make sure you have .env.example or .env file in your project
-## and you have loaded Dotenv (https://github.com/vlucas/phpdotenv)
-name: Testing Phalcon with MySQL
-on: [push, pull_request]
-jobs:
-  phalcon:
-    name: Phalcon (PHP ${{ matrix.php-versions }})
-    runs-on: ubuntu-latest
-    env:
-      DB_ADAPTER: mysql
-      DB_HOST: 127.0.0.1
-      DB_NAME: phalcon
-      DB_USERNAME: root
-      DB_PASSWORD: password
-    services:
-      mysql:
-        image: mysql:5.7
-        env:
-          MYSQL_ALLOW_EMPTY_PASSWORD: false
-          MYSQL_ROOT_PASSWORD: password
-          MYSQL_DATABASE: phalcon
-        ports:
-          - 3306
-        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
-    strategy:
-      fail-fast: false
-      matrix:
-        php-versions: ['7.2', '7.3', '7.4']
-      # For phalcon 3.x, use
-      # php-versions: ['7.0', '7.1', '7.2', '7.3']
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v1
-      - name: Setup PHP, with composer and extensions
-        uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
-        with:
-          php-version: ${{ matrix.php-versions }}
-          extensions: mbstring, dom, zip, phalcon4, mysql
-          coverage: xdebug #optional
-      - name: Install Composer dependencies
-        run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
-      - name: Prepare the application
-        run: php -r "file_exists('.env') || copy('.env.example', '.env');"
-      - name: Run Tests
-        run: |
-          vendor/bin/codecept build
-          vendor/bin/codecept run unit
-        env:
-          DB_PORT: ${{ job.services.mysql.ports['3306'] }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 69bc11e..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-language: php
-
-php:
-  - 7.2
-  - 7.3
-  - 7.4
-
-# faster builds on new travis setup not using sudo
-sudo: false
-
-services:
-  - mysql
-
-install:
-  - '[[ -z "$CI_USER_TOKEN" ]] || composer config github-oauth.github.com ${CI_USER_TOKEN};'
-  - travis_retry composer self-update && composer --version
-  - travis_retry composer update --prefer-dist --no-interaction
-  - git clone -q --depth=1 https://github.com/Codeception/phalcon-demo.git framework-tests
-  - git --git-dir framework-tests/.git log -n 1
-  - git clone -q --depth=1 https://github.com/phalcon/cphalcon.git -b v4.0.0-RC.3
-  - (cd cphalcon/build; bash ./install --phpize $(phpenv which phpize) --php-config $(phpenv which php-config) &>/dev/null && phpenv config-add ../tests/_ci/phalcon.ini &> /dev/null)
-  - travis_retry composer update -d framework-tests --no-dev --prefer-dist --no-interaction
-  - php ./vendor/bin/codecept build -c framework-tests
-
-before_script:
-  - 'mysql -e "CREATE DATABASE phalcon_demo CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;"'
-  - 'cat framework-tests/schemas/phalcon_demo.sql | mysql phalcon_demo'
-script:
-  - php ./vendor/bin/codecept run unit
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c99c8c..4b83c08 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,50 @@
-#### 1.0.1
+## [1.0.7](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.7) (18-05-2021)
+
+Updated code base to PHP 7.2 [#14](https://github.com/Codeception/module-phalcon4/pull/14):
+
+- Added strict types
+-  Added return types
+-  Added some type hints
+-  Removed unnecessary qualifiers
+-  sha1 by default instead of md5.
+
+## [1.0.6](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.6) (14-04-2021)
+
+#### Changed
+
+- Fixed Request service redefinition [#7](https://github.com/Codeception/module-phalcon4/pull/7)
+
+## [1.0.5](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.5) (11-02-2021)
+
+#### Changed
+
+- Removed limitation of PHP 8.0 version in composer.json
+
+## [1.0.4](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.4) (26-08-2020)
+
+#### Fixed
+
+- Session To Use Session Manager
+
+## [1.0.3](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.3) (11-01-2020)
+
+#### Fixed
+
+- Dependencies
+
+## [1.0.2](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.2) (07-01-2020)
+
+#### Fixed
+
+- Replacing service in DI from functional test not working
+
+## [1.0.1](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.1) (06-01-2020)
 
 - Removed composer.lock
 - Updated dependencies
 - Updated SQL schema
+- Updated DocBlocks
 
-#### 1.0.0
+## [1.0.0](https://github.com/Codeception/module-phalcon4/releases/tag/1.0.0) (06-01-2020)
 
-* Support Phalcon 4.0.0-RC.3
+- Support Phalcon 4.0.0-RC.3
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 1a8584c..b2d64be 100644
--- a/composer.json
+++ b/composer.json
@@ -1,41 +1,43 @@
 {
-    "name":"codeception/module-phalcon4",
-    "description":"Codeception module for Phalcon 4 framework",
-    "keywords":["codeception", "phalcon", "phalcon4"],
-    "homepage":"https://codeception.com/",
-    "type":"library",
-    "license":"MIT",
-    "authors": [
-        {
-            "name": "Phalcon Team",
-            "email": "team@phalcon.io",
-            "homepage": "https://phalcon.io/en/team"
-        },
-        {
-            "name": "Codeception Team",
-            "email": "team@codeception.com",
-            "homepage": "http://codeception.com/"
-        }
-    ],
-    "require": {
-        "php": ">=7.2.0 <8.0",
-        "ext-phalcon": ">=4",
-        "codeception/codeception": "^4.0",
-        "codeception/lib-innerbrowser": "^1.0",
-        "codeception/module-asserts": "^1.0",
-        "codeception/module-phpbrowser": "^1.0",
-        "codeception/module-db": "^1.0"
-    },
-    "require-dev": {
-        "codeception/util-robohelpers": "dev-master",
-        "vlucas/phpdotenv": "^4.1",
-        "squizlabs/php_codesniffer": "^3.4",
-        "vimeo/psalm": "^3.6"
-    },
-    "autoload":{
-        "classmap": ["src/"]
-    },
-    "config": {
-        "classmap-authoritative": true
-    }
+	"name": "codeception/module-phalcon4",
+	"description": "Codeception module for Phalcon 4 framework",
+	"keywords": [ "codeception", "phalcon", "phalcon4" ],
+	"homepage": "https://codeception.com/",
+	"type": "library",
+	"license": "MIT",
+	"authors": [
+		{
+			"name": "Phalcon Team",
+			"email": "team@phalcon.io",
+			"homepage": "https://phalcon.io/en/team"
+		},
+		{
+			"name": "Codeception Team",
+			"email": "team@codeception.com",
+			"homepage": "https://codeception.com/"
+		}
+	],
+	"require": {
+		"php": ">=7.2.0",
+		"ext-json": "*",
+		"codeception/codeception": "^4.0",
+		"codeception/lib-innerbrowser": "^1.0",
+		"codeception/module-asserts": "^1.0",
+		"codeception/module-phpbrowser": "^1.0",
+		"codeception/module-db": "^1.0"
+	},
+	"require-dev": {
+		"codeception/util-robohelpers": "dev-master",
+		"vlucas/phpdotenv": "^4.1",
+		"squizlabs/php_codesniffer": "^3.4",
+		"vimeo/psalm": "^3.6"
+	},
+	"autoload": {
+		"classmap": [
+			"src/"
+		]
+	},
+	"config": {
+		"classmap-authoritative": true
+	}
 }
diff --git a/documentation.md b/documentation.md
index 5dbe535..087bd88 100644
--- a/documentation.md
+++ b/documentation.md
@@ -1,7 +1,7 @@
 # Phalcon
 
 
-This module provides integration with [Phalcon framework](http://www.phalcon.io/) (4.x).
+This module provides integration with [Phalcon framework](https://www.phalcon.io/) (4.x).
 Please try it and leave your feedback.
 
 ## Demo Project
diff --git a/readme.md b/readme.md
index 70b80af..4b9f3fd 100644
--- a/readme.md
+++ b/readme.md
@@ -1,13 +1,28 @@
-# Codeception module for Phalcon framework
+# Codeception Module Phalcon4
 
-[![Build Status](https://travis-ci.org/Codeception/module-phalcon.svg?branch=master)](https://travis-ci.org/Codeception/module-phalcon)
+A Codeception module for Phalcon4 framework
+
+[![Actions Status](https://github.com/Codeception/module-phalcon4/workflows/CI/badge.svg)](https://github.com/Codeception/module-phalcon4/actions)
+[![Latest Stable Version](https://poser.pugx.org/codeception/module-phalcon4/v/stable)](https://github.com/Codeception/module-phalcon4/releases)
+[![Total Downloads](https://poser.pugx.org/codeception/module-phalcon4/downloads)](https://packagist.org/packages/codeception/module-phalcon4)
+[![License](https://poser.pugx.org/codeception/module-phalcon4/license)](/LICENSE)
+
+## Requirements
+
+* `PHP 7.2` or higher.
 
 ## Installation
 
 ```
-composer require --dev "codeception/module-phalcon"
+composer require "codeception/module-phalcon4" --dev
 ```
 
 ## Documentation
 
 <a href="documentation.md">Look at documentation.md file</a>
+
+## License
+
+`Codeception Module Phalcon4` is open-sourced software licensed under the [MIT](/LICENSE) License.
+
+© Codeception PHP Testing Framework
diff --git a/src/Codeception/Lib/Connector/Phalcon4.php b/src/Codeception/Lib/Connector/Phalcon4.php
index a03edd1..e28ee1c 100644
--- a/src/Codeception/Lib/Connector/Phalcon4.php
+++ b/src/Codeception/Lib/Connector/Phalcon4.php
@@ -1,21 +1,25 @@
 <?php
 
+declare(strict_types=1);
+
 namespace Codeception\Lib\Connector;
 
 use Closure;
+use Codeception\Lib\Connector\Shared\PhpSuperGlobalsConverter;
+use Codeception\Util\Stub;
 use Phalcon\Di;
 use Phalcon\Http;
-use RuntimeException;
-use ReflectionProperty;
-use Codeception\Util\Stub;
 use Phalcon\Mvc\Application;
-use Symfony\Component\BrowserKit\Cookie;
-use Symfony\Component\BrowserKit\AbstractBrowser as Client;
 use Phalcon\Mvc\Micro as MicroApplication;
+use ReflectionException;
+use ReflectionProperty;
+use RuntimeException;
+use Symfony\Component\BrowserKit\AbstractBrowser;
+use Symfony\Component\BrowserKit\Cookie;
+use Symfony\Component\BrowserKit\Request;
 use Symfony\Component\BrowserKit\Response;
-use Codeception\Lib\Connector\Shared\PhpSuperGlobalsConverter;
 
-class Phalcon4 extends Client
+class Phalcon4 extends AbstractBrowser
 {
     use PhpSuperGlobalsConverter;
 
@@ -30,7 +34,7 @@ class Phalcon4 extends Client
      *
      * @param mixed $application
      */
-    public function setApplication($application)
+    public function setApplication($application): void
     {
         $this->application = $application;
     }
@@ -43,10 +47,11 @@ public function setApplication($application)
     public function getApplication()
     {
         $application = $this->application;
-
         if ($application instanceof Closure) {
             return $application();
-        } elseif (is_string($application)) {
+        }
+
+        if (is_string($application)) {
             /** @noinspection PhpIncludeInspection */
             return require $application;
         }
@@ -57,12 +62,11 @@ public function getApplication()
     /**
      * Makes a request.
      *
-     * @param \Symfony\Component\BrowserKit\Request $request
+     * @param Request $request
      *
-     * @return \Symfony\Component\BrowserKit\Response
-     * @throws \RuntimeException
+     * @throws RuntimeException|ReflectionException
      */
-    public function doRequest($request)
+    public function doRequest($request): Response
     {
         $application = $this->getApplication();
         if (!$application instanceof Application && !$application instanceof MicroApplication) {
@@ -99,7 +103,7 @@ public function doRequest($request)
             $_POST = $_REQUEST;
         }
 
-        parse_str($queryString, $output);
+        parse_str((string) $queryString, $output);
         foreach ($output as $k => $v) {
             $_GET[$k] = $v;
         }
@@ -110,7 +114,11 @@ public function doRequest($request)
         Di::reset();
         Di::setDefault($di);
 
-        $di['request'] = Stub::construct($phRequest, [], ['getRawBody' => $request->getContent()]);
+        if ($di->has('request')) {
+            $di->remove('request');
+        }
+        $requestContent = $request->getContent() ?: '';
+        $di['request'] = Stub::construct($phRequest, [], ['getRawBody' => $requestContent]);
 
         $response = $application->handle($pathString);
         if (!$response instanceof Http\ResponseInterface) {
@@ -122,12 +130,14 @@ public function doRequest($request)
 
         $headersProperty = new ReflectionProperty($headers, 'headers');
         $headersProperty->setAccessible(true);
+
         $headers = $headersProperty->getValue($headers);
         if (!is_array($headers)) {
             $headers = [];
         }
 
         $cookiesProperty = new ReflectionProperty($di['cookies'], 'cookies');
+
         $cookiesProperty->setAccessible(true);
         $cookies = $cookiesProperty->getValue($di['cookies']);
         if (is_array($cookies)) {
@@ -140,7 +150,7 @@ public function doRequest($request)
                     $clientCookie = new Cookie(
                         $name,
                         $valueProperty->getValue($cookie),
-                        $cookie->getExpiration(),
+                        (string)$cookie->getExpiration(),
                         $cookie->getPath(),
                         $cookie->getDomain(),
                         $cookie->getSecure(),
@@ -153,7 +163,7 @@ public function doRequest($request)
 
         return new Response(
             $response->getContent() ?: '',
-            $status ? $status : 200,
+            $status !== 0 ? $status : 200,
             $headers
         );
     }
diff --git a/src/Codeception/Lib/Connector/Phalcon4/MemorySession.php b/src/Codeception/Lib/Connector/Phalcon4/MemorySession.php
index c8f8adf..ca7596c 100644
--- a/src/Codeception/Lib/Connector/Phalcon4/MemorySession.php
+++ b/src/Codeception/Lib/Connector/Phalcon4/MemorySession.php
@@ -1,8 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 namespace Codeception\Lib\Connector\Phalcon4;
 
 use Phalcon\Session\Adapter\AbstractAdapter;
+use Phalcon\Session\AdapterInterface;
 
 class MemorySession extends AbstractAdapter
 {
@@ -43,7 +46,7 @@ public function __construct(array $options = null)
     /**
      * @inheritdoc
      */
-    public function start()
+    public function start(): bool
     {
         if ($this->status() !== PHP_SESSION_ACTIVE) {
             $this->memory = [];
@@ -60,7 +63,7 @@ public function start()
      *
      * @param array $options
      */
-    public function setOptions(array $options)
+    public function setOptions(array $options): void
     {
         if (isset($options['uniqueId'])) {
             $this->sessionId = $options['uniqueId'];
@@ -74,7 +77,7 @@ public function setOptions(array $options)
      *
      * @return array
      */
-    public function getOptions()
+    public function getOptions(): array
     {
         return $this->options;
     }
@@ -87,7 +90,7 @@ public function getOptions()
      * @param bool $remove
      * @return mixed
      */
-    public function get($index, $defaultValue = null, $remove = false)
+    public function get(string $index, $defaultValue = null, bool $remove = false)
     {
         $key = $this->prepareIndex($index);
 
@@ -110,7 +113,7 @@ public function get($index, $defaultValue = null, $remove = false)
      * @param string $index
      * @param mixed $value
      */
-    public function set($index, $value)
+    public function set(string $index, $value): void
     {
         $this->memory[$this->prepareIndex($index)] = $value;
     }
@@ -121,7 +124,7 @@ public function set($index, $value)
      * @param string $index
      * @return bool
      */
-    public function has($index)
+    public function has(string $index): bool
     {
         return isset($this->memory[$this->prepareIndex($index)]);
     }
@@ -131,7 +134,7 @@ public function has($index)
      *
      * @param string $index
      */
-    public function remove($index)
+    public function remove(string $index): void
     {
         unset($this->memory[$this->prepareIndex($index)]);
     }
@@ -141,7 +144,7 @@ public function remove($index)
      *
      * @return string
      */
-    public function getId()
+    public function getId(): string
     {
         return $this->sessionId;
     }
@@ -151,7 +154,7 @@ public function getId()
      *
      * @return bool
      */
-    public function isStarted()
+    public function isStarted(): bool
     {
         return $this->started;
     }
@@ -164,12 +167,11 @@ public function isStarted()
      * if ($session->status() !== PHP_SESSION_ACTIVE) {
      *     $session->start();
      * }
-     * ?>
      * ```
      *
      * @return int
      */
-    public function status()
+    public function status(): int
     {
         if ($this->isStarted()) {
             return PHP_SESSION_ACTIVE;
@@ -181,7 +183,7 @@ public function status()
     /**
      * @inheritdoc
      *
-     * @param bool $removeData
+     * @param bool $id
      * @return bool
      */
     public function destroy($id): bool
@@ -195,9 +197,9 @@ public function destroy($id): bool
      * @inheritdoc
      *
      * @param bool $deleteOldSession
-     * @return \Phalcon\Session\AdapterInterface
+     * @return AdapterInterface
      */
-    public function regenerateId($deleteOldSession = true)
+    public function regenerateId(bool $deleteOldSession = true): AdapterInterface
     {
         $this->sessionId = $this->generateId();
 
@@ -209,7 +211,7 @@ public function regenerateId($deleteOldSession = true)
      *
      * @param string $name
      */
-    public function setName($name)
+    public function setName(string $name): void
     {
         $this->name = $name;
     }
@@ -219,7 +221,7 @@ public function setName($name)
      *
      * @return string
      */
-    public function getName()
+    public function getName(): string
     {
         return $this->name;
     }
@@ -229,7 +231,7 @@ public function getName()
      *
      * @return array
      */
-    public function toArray()
+    public function toArray(): array
     {
         return (array) $this->memory;
     }
@@ -240,7 +242,7 @@ public function toArray()
      * @param string $index
      * @return mixed
      */
-    public function __get($index)
+    public function __get(string $index)
     {
         return $this->get($index);
     }
@@ -251,7 +253,7 @@ public function __get($index)
      * @param string $index
      * @param mixed $value
      */
-    public function __set($index, $value)
+    public function __set(string $index, $value): void
     {
         $this->set($index, $value);
     }
@@ -259,10 +261,10 @@ public function __set($index, $value)
     /**
      * Alias: Check whether a session variable is set in an application context
      *
-     * @param  string $index
+     * @param string $index
      * @return bool
      */
-    public function __isset($index)
+    public function __isset(string $index): bool
     {
         return $this->has($index);
     }
@@ -272,12 +274,12 @@ public function __isset($index)
      *
      * @param string $index
      */
-    public function __unset($index)
+    public function __unset(string $index): void
     {
         $this->remove($index);
     }
 
-    private function prepareIndex($index)
+    private function prepareIndex(string $index): string
     {
         if ($this->sessionId) {
             $key = $this->sessionId . '#' . $index;
@@ -291,8 +293,31 @@ private function prepareIndex($index)
     /**
      * @return string
      */
-    private function generateId()
+    private function generateId(): string
+    {
+        return sha1((string) time());
+    }
+
+    /**
+     * Dummy - We Don't Actually Read Anything
+     *
+     * @return string
+     */
+    public function read($id): string
     {
-        return md5(time());
+        return "";
+    }
+
+    /**
+     * Write - We Don't Actually Write Anything
+     *
+     * @param $id
+     * @param $data
+     *
+     * @return bool
+     */
+    public function write($id, $data): bool
+    {
+        return true;
     }
 }
diff --git a/src/Codeception/Lib/Connector/Phalcon4/SessionManager.php b/src/Codeception/Lib/Connector/Phalcon4/SessionManager.php
new file mode 100644
index 0000000..eb8cc65
--- /dev/null
+++ b/src/Codeception/Lib/Connector/Phalcon4/SessionManager.php
@@ -0,0 +1,20 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Codeception\Lib\Connector\Phalcon4;
+
+use Phalcon\Session\Manager;
+
+class SessionManager extends Manager
+{
+    /**
+     * We have to override this as otherwise nothing working correctly in testing.
+     *
+     * @return bool
+     */
+    public function exists(): bool
+    {
+        return true;
+    }
+}
diff --git a/src/Codeception/Module/Phalcon4.php b/src/Codeception/Module/Phalcon4.php
index e8587ad..1cbbde5 100644
--- a/src/Codeception/Module/Phalcon4.php
+++ b/src/Codeception/Module/Phalcon4.php
@@ -1,5 +1,7 @@
 <?php
 
+declare(strict_types=1);
+
 namespace Codeception\Module;
 
 use Codeception\Configuration;
@@ -7,22 +9,25 @@
 use Codeception\Exception\ModuleException;
 use Codeception\Lib\Connector\Phalcon4 as PhalconConnector;
 use Codeception\Lib\Connector\Phalcon4\MemorySession as MemorySession;
+use Codeception\Lib\Connector\Phalcon4\SessionManager;
 use Codeception\Lib\Framework;
 use Codeception\Lib\Interfaces\ActiveRecord;
 use Codeception\Lib\Interfaces\PartedModule;
 use Codeception\TestInterface;
 use Codeception\Util\ReflectionHelper;
+use Exception;
 use PDOException;
 use Phalcon\Di;
 use Phalcon\Di\Injectable;
 use Phalcon\DiInterface;
 use Phalcon\Mvc\Model as PhalconModel;
+use Phalcon\Mvc\ResultsetInterface;
 use Phalcon\Mvc\Router\RouteInterface;
 use Phalcon\Mvc\RouterInterface;
 use Phalcon\Url;
 
 /**
- * This module provides integration with [Phalcon framework](http://www.phalcon.io/) (4.x).
+ * This module provides integration with [Phalcon framework](https://www.phalcon.io/) (4.x).
  * Please try it and leave your feedback.
  *
  * ## Status
@@ -55,6 +60,9 @@
  * * `orm` - include only `haveRecord/grabRecord/seeRecord/dontSeeRecord` actions.
  * * `services` - allows to use `grabServiceFromContainer` and `addServiceToContainer`.
  *
+ * See [WebDriver module](https://codeception.com/docs/modules/WebDriver#Loading-Parts-from-other-Modules)
+ * for general information on how to load parts of a framework module.
+ *
  * Usage example:
  *
  * Sample bootstrap (`app/config/bootstrap.php`):
@@ -82,6 +90,9 @@
  */
 class Phalcon4 extends Framework implements ActiveRecord, PartedModule
 {
+    /**
+     * @var array
+     */
     protected $config = [
         'bootstrap'  => 'app/config/bootstrap.php',
         'cleanup'    => true,
@@ -96,12 +107,14 @@ class Phalcon4 extends Framework implements ActiveRecord, PartedModule
 
     /**
      * Dependency injection container
+     *
      * @var DiInterface
      */
     public $di = null;
 
     /**
      * Phalcon Connector
+     *
      * @var PhalconConnector
      */
     public $client;
@@ -150,8 +163,14 @@ public function _before(TestInterface $test)
         Di::setDefault($this->di);
 
         if ($this->di->has('session')) {
+            /** @var Manager $manager */
+            $manager = $this->di->get(SessionManager::class);
+            $manager->setAdapter(
+                $this->di->get($this->config['session'])
+            );
+
             // Destroy existing sessions of previous tests
-            $this->di['session'] = $this->di->get($this->config['session']);
+            $this->di['session'] = $manager;
         }
 
         if ($this->di->has('cookies')) {
@@ -207,7 +226,7 @@ public function _parts()
      * Provides access the Phalcon application object.
      *
      * @see \Codeception\Lib\Connector\Phalcon::getApplication
-     * @return \Phalcon\Application|\Phalcon\Mvc\Micro
+     * @return \Phalcon\Mvc\Application|\Phalcon\Mvc\Micro
      */
     public function getApplication()
     {
@@ -220,10 +239,10 @@ public function getApplication()
      * @param string $key
      * @param mixed $val
      */
-    public function haveInSession($key, $val)
+    public function haveInSession(string $key, $val): void
     {
         $this->di->get('session')->set($key, $val);
-        $this->debugSection('Session', json_encode($this->di['session']->toArray()));
+        $this->debugSection('Session', json_encode($this->di['session']->getAdapter()->toArray()));
     }
 
     /**
@@ -234,15 +253,14 @@ public function haveInSession($key, $val)
      * <?php
      * $I->seeInSession('key');
      * $I->seeInSession('key', 'value');
-     * ?>
      * ```
      *
      * @param string $key
      * @param mixed $value
      */
-    public function seeInSession($key, $value = null)
+    public function seeInSession(string $key, $value = null): void
     {
-        $this->debugSection('Session', json_encode($this->di['session']->toArray()));
+        $this->debugSection('Session', json_encode($this->di['session']->getAdapter()->toArray()));
 
         if (is_array($key)) {
             $this->seeSessionHasValues($key);
@@ -267,13 +285,12 @@ public function seeInSession($key, $value = null)
      * <?php
      * $I->seeSessionHasValues(['key1', 'key2']);
      * $I->seeSessionHasValues(['key1' => 'value1', 'key2' => 'value2']);
-     * ?>
      * ```
      *
      * @param  array $bindings
      * @return void
      */
-    public function seeSessionHasValues(array $bindings)
+    public function seeSessionHasValues(array $bindings): void
     {
         foreach ($bindings as $key => $value) {
             if (is_int($key)) {
@@ -291,7 +308,6 @@ public function seeSessionHasValues(array $bindings)
      * <?php
      * $user_id = $I->haveRecord('App\Models\Users', ['name' => 'Phalcon']);
      * $I->haveRecord('App\Models\Categories', ['name' => 'Testing']');
-     * ?>
      * ```
      *
      * @param string $model Model name
@@ -341,7 +357,6 @@ public function haveRecord($model, $attributes = [])
      * ``` php
      * <?php
      * $I->seeRecord('App\Models\Categories', ['name' => 'Testing']);
-     * ?>
      * ```
      *
      * @param string $model Model name
@@ -363,15 +378,14 @@ public function seeRecord($model, $attributes = [])
      * ``` php
      * <?php
      * $I->seeNumberOfRecords('App\Models\Categories', 3, ['name' => 'Testing']);
-     * ?>
      * ```
      *
      * @param string $model Model name
      * @param int $number int number of records
-     * @param array  $attributes Model attributes
+     * @param array $attributes Model attributes
      * @part orm
      */
-    public function seeNumberOfRecords($model, $number, $attributes = [])
+    public function seeNumberOfRecords(string $model, int $number, array $attributes = []): void
     {
         $records = $this->findRecords($model, $attributes);
         if ($records->count() != $number) {
@@ -392,7 +406,6 @@ public function seeNumberOfRecords($model, $number, $attributes = [])
      * ``` php
      * <?php
      * $I->dontSeeRecord('App\Models\Categories', ['name' => 'Testing']);
-     * ?>
      * ```
      *
      * @param string $model Model name
@@ -414,7 +427,6 @@ public function dontSeeRecord($model, $attributes = [])
      * ``` php
      * <?php
      * $category = $I->grabRecord('App\Models\Categories', ['name' => 'Testing']);
-     * ?>
      * ```
      *
      * @param string $model Model name
@@ -436,7 +448,7 @@ public function grabRecord($model, $attributes = [])
      * @return mixed
      * @part services
      */
-    public function grabServiceFromContainer($service, array $parameters = [])
+    public function grabServiceFromContainer(string $service, array $parameters = [])
     {
         if (!$this->di->has($service)) {
             $this->fail("Service $service is not available in container");
@@ -455,7 +467,6 @@ public function grabServiceFromContainer($service, array $parameters = [])
      * $filter = $I->addServiceToContainer('answer', function () {
      *      return rand(0, 1) ? 'Yes' : 'No';
      * }, true);
-     * ?>
      * ```
      *
      * @param string $name
@@ -464,12 +475,12 @@ public function grabServiceFromContainer($service, array $parameters = [])
      * @return mixed|null
      * @part services
      */
-    public function addServiceToContainer($name, $definition, $shared = false)
+    public function addServiceToContainer(string $name, $definition, bool $shared = false)
     {
         try {
             $service = $this->di->set($name, $definition, $shared);
             return $service->resolve();
-        } catch (\Exception $e) {
+        } catch (Exception $e) {
             $this->fail($e->getMessage());
 
             return null;
@@ -482,13 +493,12 @@ public function addServiceToContainer($name, $definition, $shared = false)
      * ``` php
      * <?php
      * $I->amOnRoute('posts.create');
-     * ?>
      * ```
      *
      * @param string $routeName
      * @param array  $params
      */
-    public function amOnRoute($routeName, array $params = [])
+    public function amOnRoute(string $routeName, array $params = []): void
     {
         if (!$this->di->has('url')) {
             $this->fail('Unable to resolve "url" service.');
@@ -511,11 +521,10 @@ public function amOnRoute($routeName, array $params = [])
      * ``` php
      * <?php
      * $I->seeCurrentRouteIs('posts.index');
-     * ?>
      * ```
      * @param string $routeName
      */
-    public function seeCurrentRouteIs($routeName)
+    public function seeCurrentRouteIs(string $routeName): void
     {
         if (!$this->di->has('url')) {
             $this->fail('Unable to resolve "url" service.');
@@ -534,7 +543,7 @@ public function seeCurrentRouteIs($routeName)
      *
      * @return \Phalcon\Mvc\Model
      */
-    protected function findRecord($model, $attributes = [])
+    protected function findRecord(string $model, array $attributes = [])
     {
         $this->getModelRecord($model);
         $conditions = [];
@@ -563,9 +572,9 @@ protected function findRecord($model, $attributes = [])
      * @param string $model Model name
      * @param array $attributes Model attributes
      *
-     * @return \Phalcon\Mvc\ResultsetInterface
+     * @return ResultsetInterface
      */
-    protected function findRecords($model, $attributes = [])
+    protected function findRecords(string $model, array $attributes = [])
     {
         $this->getModelRecord($model);
         $conditions = [];
@@ -680,10 +689,7 @@ protected function getInternalDomains()
         return array_unique($internalDomains);
     }
 
-    /**
-     * @return string
-     */
-    private function getApplicationDomainRegex()
+    private function getApplicationDomainRegex(): string
     {
         $server = ReflectionHelper::readPrivateProperty($this->client, 'server');
         $domain = $server['HTTP_HOST'];
diff --git a/tests/_data/bootstrap-micro.php b/tests/_data/bootstrap-micro.php
index c46e41c..7992a5a 100644
--- a/tests/_data/bootstrap-micro.php
+++ b/tests/_data/bootstrap-micro.php
@@ -1,3 +1,4 @@
 <?php
+
 $di = new \Phalcon\DI\FactoryDefault();
 return new \Phalcon\Mvc\Micro($di);
diff --git a/tests/_support/AcceptanceTester.php b/tests/_support/AcceptanceTester.php
index 95c00ec..511ad7f 100644
--- a/tests/_support/AcceptanceTester.php
+++ b/tests/_support/AcceptanceTester.php
@@ -1,8 +1,8 @@
 <?php
 
-
 /**
  * Inherited Methods
+ *
  * @method void wantToTest($text)
  * @method void wantTo($text)
  * @method void execute($callable)
@@ -16,6 +16,7 @@
  *
  * @SuppressWarnings(PHPMD)
 */
+
 class AcceptanceTester extends \Codeception\Actor
 {
     use _generated\AcceptanceTesterActions;
diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php
index 83fbacd..f50c3cf 100644
--- a/tests/_support/FunctionalTester.php
+++ b/tests/_support/FunctionalTester.php
@@ -1,8 +1,8 @@
 <?php
 
-
 /**
  * Inherited Methods
+ *
  * @method void wantToTest($text)
  * @method void wantTo($text)
  * @method void execute($callable)
@@ -16,6 +16,7 @@
  *
  * @SuppressWarnings(PHPMD)
 */
+
 class FunctionalTester extends \Codeception\Actor
 {
     use _generated\FunctionalTesterActions;
diff --git a/tests/_support/UnitTester.php b/tests/_support/UnitTester.php
index e19544a..860c762 100644
--- a/tests/_support/UnitTester.php
+++ b/tests/_support/UnitTester.php
@@ -1,8 +1,8 @@
 <?php
 
-
 /**
  * Inherited Methods
+ *
  * @method void wantToTest($text)
  * @method void wantTo($text)
  * @method void execute($callable)
@@ -16,6 +16,7 @@
  *
  * @SuppressWarnings(PHPMD)
 */
+
 class UnitTester extends \Codeception\Actor
 {
     use _generated\UnitTesterActions;
diff --git a/tests/unit/MemorySessionTest.php b/tests/unit/MemorySessionTest.php
index 2476f00..0c336d1 100644
--- a/tests/unit/MemorySessionTest.php
+++ b/tests/unit/MemorySessionTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 use Codeception\Lib\Connector\Phalcon4\MemorySession;
 use Codeception\Util\Autoload;
 
-class MemorySessionTest extends \Codeception\Test\Unit
+final class MemorySessionTest extends \Codeception\Test\Unit
 {
     /**
      * @var \UnitTester
diff --git a/tests/unit/Phalcon4ConnectorTest.php b/tests/unit/Phalcon4ConnectorTest.php
new file mode 100644
index 0000000..7ffaba3
--- /dev/null
+++ b/tests/unit/Phalcon4ConnectorTest.php
@@ -0,0 +1,106 @@
+<?php
+
+declare(strict_types=1);
+
+use Codeception\Lib\Connector\Phalcon4 as PhalconConnector;
+use Codeception\Module\Phalcon4;
+use Symfony\Component\BrowserKit\Request;
+
+final class Phalcon4ConnectorTest extends \Codeception\Test\Unit
+{
+    protected function getPhalconModule(): Phalcon4
+    {
+        $container = \Codeception\Util\Stub::make('Codeception\Lib\ModuleContainer');
+        $module = new Phalcon4($container);
+        $module->_setConfig([
+            'bootstrap'  => 'tests/_data/bootstrap.php',
+            'cleanup'    => true,
+            'savepoints' => true,
+            'session'    => 'Codeception\Lib\Connector\Phalcon4\MemorySession'
+        ]);
+        $module->_initialize();
+        return $module;
+    }
+
+    public function testConstruct(): void
+    {
+        $connector = new PhalconConnector();
+        $this->assertInstanceOf(PhalconConnector::class, $connector);
+    }
+
+    public function testDoRequest(): void
+    {
+        $module = $this->getPhalconModule();
+        $test = new Codeception\Test\Unit();
+        $module->_before($test);
+
+        $connector = $module->client;
+
+        // parameters for Request object
+        $uri = '/';
+        $method = 'GET';
+        $params = [
+            'first' => 'one',
+            'second' => 'two'
+        ];
+        $files = [
+            'file' => [
+                'name' => 'SomeFile.ext',
+                'tmp_name' => 'SomeFile.ext',
+                'error' => false
+            ]
+        ];
+        $cookies = [
+            'token' => 'asdev257'
+        ];
+        $server = [
+            'HTTP_HOST' => 'localhost',
+            'SERVER_NAME' => 'my pc',
+            'SERVER_ADDR' => '127.0.0.1',
+        ];
+        $content = "this is request content";
+
+        $request = new Request(
+            $uri,
+            $method,
+            $params,
+            $files,
+            $cookies,
+            $server,
+            $content
+        );
+
+        // send request
+        $response = $connector->doRequest($request);
+        $this->assertSame(200, $response->getStatusCode());
+
+        /** @var Phalcon\Http\Request $requestService*/
+        $requestService = $module->grabServiceFromContainer('request');
+
+        // assert request uri
+        $this->assertSame($uri, $requestService->getURI());
+
+        // assert request method
+        $this->assertSame($method, $requestService->getMethod());
+
+        // assert reques paramters
+        $this->assertSame($params['first'], $requestService->get('first'));
+        $this->assertSame($params['second'], $requestService->get('second'));
+
+        // assert uploaded file
+        $this->assertTrue($requestService->hasFiles());
+        /** @var Phalcon\Http\Request\File $uploadedFile */
+        $uploadedFile = $requestService->getUploadedFiles()[0];
+        $this->assertSame($files['file']['name'], $uploadedFile->getName());
+        $this->assertSame($files['file']['tmp_name'], $uploadedFile->getTempName());
+        $this->assertSame('ext', $uploadedFile->getExtension());
+
+        // assert server parameter
+        $this->assertSame($server['HTTP_HOST'], $requestService->getServer('HTTP_HOST'));
+
+        // assert request body
+        $this->assertSame($content, $requestService->getRawBody());
+
+        $module->_after($test);
+    }
+}
diff --git a/tests/unit/Phalcon4ModuleTest.php b/tests/unit/Phalcon4ModuleTest.php
index 1b2bf6f..c60f293 100644
--- a/tests/unit/Phalcon4ModuleTest.php
+++ b/tests/unit/Phalcon4ModuleTest.php
@@ -1,9 +1,11 @@
 <?php
 
+declare(strict_types=1);
+
 use Codeception\Module\Phalcon4;
 use Codeception\Exception\ModuleConfigException;
 
-class Phalcon4ModuleTest extends \Codeception\Test\Unit
+final class Phalcon4ModuleTest extends \Codeception\Test\Unit
 {
     /**
      * @var \UnitTester
@@ -140,7 +142,8 @@ public function testContainerMethods()
         $module->_before($test);
 
         $session = $module->grabServiceFromContainer('session');
-        $this->assertInstanceOf('Codeception\Lib\Connector\Phalcon4\MemorySession', $session);
+        $this->assertInstanceOf('Phalcon\Session\Manager', $session);
+        $this->assertInstanceOf('Codeception\Lib\Connector\Phalcon4\MemorySession', $session->getAdapter());
 
         $testService = $module->addServiceToContainer('std', function () {
             return new \stdClass();
