Skip to content

Commit 8fabda6

Browse files
committed
using service named Zend\Db\Adapter\AdapterInterface in config
1 parent 005b1d2 commit 8fabda6

File tree

11 files changed

+24
-21
lines changed

11 files changed

+24
-21
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ When done, you can modify logger service named `ErrorHeroModuleLogger` and `erro
141141
```php
142142
<?php
143143
// config/autoload/error-hero-module.local.php or config/autoload/expressive-error-hero-module.local.php
144+
145+
use Zend\Db\Adapter\AdapterInterface;
146+
144147
return [
145148

146149
'log' => [
@@ -150,7 +153,7 @@ return [
150153
[
151154
'name' => 'db',
152155
'options' => [
153-
'db' => 'Zend\Db\Adapter\Adapter',
156+
'db' => AdapterInterface::class,
154157
'table' => 'log',
155158
'column' => [
156159
'timestamp' => 'date',

config/error-hero-module.local.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44

55
return [
66

@@ -11,7 +11,7 @@ return [
1111
[
1212
'name' => 'db',
1313
'options' => [
14-
'db' => Adapter::class,
14+
'db' => AdapterInterface::class,
1515
'table' => 'log',
1616
'column' => [
1717
'timestamp' => 'date',

config/expressive-error-hero-module.local.php.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace ErrorHeroModule;
44

5-
use Zend\Db\Adapter\Adapter;
5+
use Zend\Db\Adapter\AdapterInterface;
66
use Zend\Log;
77
use Zend\ServiceManager\Factory\InvokableFactory;
88

@@ -15,7 +15,7 @@ return [
1515
[
1616
'name' => 'db',
1717
'options' => [
18-
'db' => Adapter::class,
18+
'db' => AdapterInterface::class,
1919
'table' => 'log',
2020
'column' => [
2121
'timestamp' => 'date',

spec/Fixture/config/autoload-for-cannot-connect-to-db/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44
use Zend\Mail\Message;
55
use Zend\Mail\Transport\InMemory;
66
use Zend\ServiceManager\Factory\InvokableFactory;
@@ -31,7 +31,7 @@
3131
[
3232
'name' => 'db',
3333
'options' => [
34-
'db' => Adapter::class,
34+
'db' => AdapterInterface::class,
3535
'table' => 'log',
3636
'column' => [
3737
'timestamp' => 'date',

spec/Fixture/config/autoload-for-enable-display-errors/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44
use Zend\Mail\Message;
55
use Zend\Mail\Transport\InMemory;
66
use Zend\ServiceManager\Factory\InvokableFactory;
@@ -31,7 +31,7 @@
3131
[
3232
'name' => 'db',
3333
'options' => [
34-
'db' => Adapter::class,
34+
'db' => AdapterInterface::class,
3535
'table' => 'log',
3636
'column' => [
3737
'timestamp' => 'date',

spec/Fixture/config/autoload-for-xmlhttprequest-with-non-json-message/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44

55
return [
66

@@ -21,7 +21,7 @@
2121
[
2222
'name' => 'db',
2323
'options' => [
24-
'db' => Adapter::class,
24+
'db' => AdapterInterface::class,
2525
'table' => 'log',
2626
'column' => [
2727
'timestamp' => 'date',

spec/Fixture/config/autoload-for-xmlhttprequest/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44

55
return [
66

@@ -21,7 +21,7 @@
2121
[
2222
'name' => 'db',
2323
'options' => [
24-
'db' => Adapter::class,
24+
'db' => AdapterInterface::class,
2525
'table' => 'log',
2626
'column' => [
2727
'timestamp' => 'date',

spec/Fixture/config/autoload-with-doctrine/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44

55
return [
66

@@ -29,7 +29,7 @@
2929
[
3030
'name' => 'db',
3131
'options' => [
32-
'db' => Adapter::class,
32+
'db' => AdapterInterface::class,
3333
'table' => 'log',
3434
'column' => [
3535
'timestamp' => 'date',

spec/Fixture/config/autoload-with-enable-sendmail-with-empty-email-receivers/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44
use Zend\Mail\Message;
55
use Zend\Mail\Transport\InMemory;
66
use Zend\ServiceManager\Factory\InvokableFactory;
@@ -31,7 +31,7 @@
3131
[
3232
'name' => 'db',
3333
'options' => [
34-
'db' => Adapter::class,
34+
'db' => AdapterInterface::class,
3535
'table' => 'log',
3636
'column' => [
3737
'timestamp' => 'date',

spec/Fixture/config/autoload-with-enable-sendmail/error-hero-module.local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Zend\Db\Adapter\Adapter;
3+
use Zend\Db\Adapter\AdapterInterface;
44
use Zend\Mail\Message;
55
use Zend\Mail\Transport\InMemory;
66
use Zend\ServiceManager\Factory\InvokableFactory;
@@ -31,7 +31,7 @@
3131
[
3232
'name' => 'db',
3333
'options' => [
34-
'db' => Adapter::class,
34+
'db' => AdapterInterface::class,
3535
'table' => 'log',
3636
'column' => [
3737
'timestamp' => 'date',

0 commit comments

Comments
 (0)