Skip to content

Commit f7d05db

Browse files
author
costin
committed
Migrate Zend to Laminas, Expressive to Mezzio
1 parent d3cc9b3 commit f7d05db

9 files changed

Lines changed: 91 additions & 39 deletions

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### JetBrains template
3+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
4+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
5+
6+
# User-specific stuff:
7+
.idea
8+
9+
## File-based project format:
10+
*.iws
11+
12+
## Plugin-specific files:
13+
14+
# IntelliJ
15+
/out/
16+
17+
# mpeltonen/sbt-idea plugin
18+
.idea_modules/
19+
20+
# JIRA plugin
21+
atlassian-ide-plugin.xml
22+
23+
# Crashlytics plugin (for Android Studio and IntelliJ)
24+
com_crashlytics_export_strings.xml
25+
crashlytics.properties
26+
crashlytics-build.properties
27+
fabric.properties
28+
### Composer template
29+
composer.phar
130
/vendor/
31+
32+
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
33+
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
34+
composer.lock

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## 2.0.0 - 2020-01-30
2+
3+
### Changed
4+
* Laminas and Mezzio migration.
5+
6+
### Added
7+
* Nothing
8+
9+
### Deprecated
10+
* Nothing
11+
12+
### Removed
13+
* Support
14+
15+
### Fixed
16+
* Nothing
17+
18+
119
## 1.0.1 - 2018-11-27
220

321
Corrected factory and config provider.

composer.json

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
{
2-
"name": "dotkernel/dot-errorhandler",
3-
"description": "Logging Error Handler for Middleware Applications",
4-
"type": "library",
5-
"require": {
6-
"zendframework/zend-expressive": "^3.0",
7-
"zendframework/zend-log": "^2.10",
8-
"dotkernel/dot-log": "^1.0",
9-
"psr/http-message": "^1.0",
10-
"psr/container": "^1.0"
11-
},
12-
"license": "MIT",
13-
"authors": [
14-
{
15-
"name": "DotKernel Team",
16-
"email": "team@dotkernel.com"
17-
}
18-
],
19-
"autoload": {
20-
"psr-4": {
21-
"Dot\\ErrorHandler\\": "src/"
22-
}
23-
},
24-
"minimum-stability": "stable"
2+
"name": "dotkernel/dot-errorhandler",
3+
"description": "Logging Error Handler for Middleware Applications",
4+
"type": "library",
5+
"require": {
6+
"mezzio/mezzio": "^3.0",
7+
"laminas/laminas-log": "^2.10",
8+
"dotkernel/dot-log": "^2.0",
9+
"psr/http-message": "^1.0",
10+
"psr/container": "^1.0",
11+
"laminas/laminas-dependency-plugin": "^1.0"
12+
},
13+
"license": "MIT",
14+
"authors": [
15+
{
16+
"name": "DotKernel Team",
17+
"email": "team@dotkernel.com"
18+
}
19+
],
20+
"autoload": {
21+
"psr-4": {
22+
"Dot\\ErrorHandler\\": "src/"
23+
}
24+
},
25+
"minimum-stability": "stable"
2526
}

config/log.global.php.dist

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ return [
77
'writers' => [
88
'FileWriter' => [
99
'name' => 'stream',
10-
'priority' => \Zend\Log\Logger::ALERT,
10+
'priority' => \Laminas\Log\Logger::ALERT,
1111
'options' => [
1212
'stream' => __DIR__.'/../../data/logs/dk-'.date('Y-m-d').'.log',
1313
// explicitly log all messages
@@ -16,12 +16,12 @@ return [
1616
'name' => 'priority',
1717
'options' => [
1818
'operator' => '>=',
19-
'priority' => \Zend\Log\Logger::EMERG,
19+
'priority' => \Laminas\Log\Logger::EMERG,
2020
],
2121
],
2222
],
2323
'formatter' => [
24-
'name' => \Zend\Log\Formatter\Json::class,
24+
'name' => \Laminas\Log\Formatter\Json::class,
2525
],
2626
],
2727
],

src/ErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Psr\Http\Server\MiddlewareInterface;
1111
use Psr\Http\Server\RequestHandlerInterface;
1212
use Throwable;
13-
use Zend\Stratigility\Exception\MissingResponseException;
13+
use Laminas\Stratigility\Exception\MissingResponseException;
1414

1515
use function error_reporting;
1616
use function in_array;
@@ -43,7 +43,7 @@
4343
* itself, and can be used as the basis for returning an error response.
4444
*
4545
* An error response generator must be provided as a constructor argument;
46-
* if not provided, an instance of Zend\Stratigility\Middleware\ErrorResponseGenerator
46+
* if not provided, an instance of Laminas\Stratigility\Middleware\ErrorResponseGenerator
4747
* will be used.
4848
*
4949
* Listeners use the following signature:

src/ErrorHandlerFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/**
3-
* @see https://github.com/zendframework/zend-expressive for the canonical source repository
3+
* @see https://github.com/mezzio/mezzio for the canonical source repository
44
* @copyright Copyright (c) 2016-2017 Zend Technologies USA Inc. (https://www.zend.com)
5-
* @license https://github.com/zendframework/zend-expressive/blob/master/LICENSE.md New BSD License
5+
* @license https://github.com/mezzio/mezzio/blob/master/LICENSE.md New BSD License
66
*/
77

88
declare(strict_types=1);
@@ -11,7 +11,7 @@
1111

1212
use Psr\Container\ContainerInterface;
1313
use Psr\Http\Message\ResponseInterface;
14-
use Zend\Expressive\Middleware\ErrorResponseGenerator;
14+
use Mezzio\Middleware\ErrorResponseGenerator;
1515
// use Dot\ErrorHandler\ErrorHandler;
1616

1717
class ErrorHandlerFactory

src/ErrorHandlerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Psr\Http\Server\MiddlewareInterface;
1111
use Psr\Http\Server\RequestHandlerInterface;
1212
use Throwable;
13-
use Zend\Stratigility\Exception\MissingResponseException;
13+
use Laminas\Stratigility\Exception\MissingResponseException;
1414

1515
use function error_reporting;
1616
use function in_array;
@@ -43,7 +43,7 @@
4343
* itself, and can be used as the basis for returning an error response.
4444
*
4545
* An error response generator must be provided as a constructor argument;
46-
* if not provided, an instance of Zend\Stratigility\Middleware\ErrorResponseGenerator
46+
* if not provided, an instance of Laminas\Stratigility\Middleware\ErrorResponseGenerator
4747
* will be used.
4848
*
4949
* Listeners use the following signature:

src/LogErrorHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use Psr\Http\Server\MiddlewareInterface;
1111
use Psr\Http\Server\RequestHandlerInterface;
1212
use Throwable;
13-
use Zend\Log\Logger;
14-
use Zend\Log\LoggerInterface;
15-
use Zend\Stratigility\Exception\MissingResponseException;
13+
use Laminas\Log\Logger;
14+
use Laminas\Log\LoggerInterface;
15+
use Laminas\Stratigility\Exception\MissingResponseException;
1616

1717
use function error_reporting;
1818
use function in_array;
@@ -45,7 +45,7 @@
4545
* itself, and can be used as the basis for returning an error response.
4646
*
4747
* An error response generator must be provided as a constructor argument;
48-
* if not provided, an instance of Zend\Stratigility\Middleware\ErrorResponseGenerator
48+
* if not provided, an instance of Laminas\Stratigility\Middleware\ErrorResponseGenerator
4949
* will be used.
5050
*
5151
* Listeners use the following signature:

src/LogErrorHandlerFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
use Psr\Container\ContainerInterface;
99
use Psr\Http\Message\ResponseInterface;
1010
use Psr\Http\Server\MiddlewareInterface;
11-
use Zend\Expressive\Middleware\ErrorResponseGenerator;
12-
use Zend\Log\LoggerInterface;
11+
use Mezzio\Middleware\ErrorResponseGenerator;
12+
use Laminas\Log\LoggerInterface;
1313

1414
class LogErrorHandlerFactory
1515
{

0 commit comments

Comments
 (0)