<?php

use JwPersistentUser\Model\ModuleOptions;
use JwPersistentUser\Model\ModuleOptionsFactory;
use JwPersistentUser\Service\CookieService;
use JwPersistentUser\Service\CookieServiceFactory;
use JwPersistentUser\Service\RememberMeService;
use JwPersistentUser\Service\RememberMeServiceFactory;
use JwPersistentUser\Service\UserAlwaysValid;
use Zend\ServiceManager\Factory\InvokableFactory;

return [
    'service_manager' => [
        'factories' => [
            ModuleOptions::class => ModuleOptionsFactory::class,
            RememberMeService::class => RememberMeServiceFactory::class,
            CookieService::class => CookieServiceFactory::class,
            UserAlwaysValid::class => InvokableFactory::class,
        ],
        'aliases' => [
            'JwPersistentUser\UserValidity' => UserAlwaysValid::class,
            'JwPersistentUser\Service\RememberMe' => RememberMeService::class,
            'JwPersistentUser\ModuleOptions' => ModuleOptions::class,
            'JwPersistentUser\Service\Cookie' => CookieService::class,
        ],
    ],
];

<?php

return [
    'service_manager' => [
        'factories' => [
            'JwPersistentUser\ModuleOptions' => 'JwPersistentUser\Model\ModuleOptionsFactory',
            'JwPersistentUser\Service\RememberMe' => 'JwPersistentUser\Service\RememberMeServiceFactory',
            'JwPersistentUser\Service\Cookie' => 'JwPersistentUser\Service\CookieServiceFactory',
            'JwPersistentUser\Service\UserAlwaysValid' => \Zend\ServiceManager\Factory\InvokableFactory::class,
        ],
        'aliases' => [
            'JwPersistentUser\UserValidity' => 'JwPersistentUser\Service\UserAlwaysValid',
        ],
    ],
];

--- 
+++ 
@@ -1,15 +1,27 @@
 <?php
+
+use JwPersistentUser\Model\ModuleOptions;
+use JwPersistentUser\Model\ModuleOptionsFactory;
+use JwPersistentUser\Service\CookieService;
+use JwPersistentUser\Service\CookieServiceFactory;
+use JwPersistentUser\Service\RememberMeService;
+use JwPersistentUser\Service\RememberMeServiceFactory;
+use JwPersistentUser\Service\UserAlwaysValid;
+use Zend\ServiceManager\Factory\InvokableFactory;
 
 return [
     'service_manager' => [
         'factories' => [
-            'JwPersistentUser\ModuleOptions' => 'JwPersistentUser\Model\ModuleOptionsFactory',
-            'JwPersistentUser\Service\RememberMe' => 'JwPersistentUser\Service\RememberMeServiceFactory',
-            'JwPersistentUser\Service\Cookie' => 'JwPersistentUser\Service\CookieServiceFactory',
-            'JwPersistentUser\Service\UserAlwaysValid' => \Zend\ServiceManager\Factory\InvokableFactory::class,
+            ModuleOptions::class => ModuleOptionsFactory::class,
+            RememberMeService::class => RememberMeServiceFactory::class,
+            CookieService::class => CookieServiceFactory::class,
+            UserAlwaysValid::class => InvokableFactory::class,
         ],
         'aliases' => [
-            'JwPersistentUser\UserValidity' => 'JwPersistentUser\Service\UserAlwaysValid',
+            'JwPersistentUser\UserValidity' => UserAlwaysValid::class,
+            'JwPersistentUser\Service\RememberMe' => RememberMeService::class,
+            'JwPersistentUser\ModuleOptions' => ModuleOptions::class,
+            'JwPersistentUser\Service\Cookie' => CookieService::class,
         ],
     ],
 ];
Make some aliases and use classes as identifiers

Signed-off-by: Camilo Sperberg <9fc10dd65f77fb6c78cda83e986d969eee8e0d9c@jouwweb.nl>
