mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Compare commits
4 Commits
v2.8.0-alp
...
v2.7.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3af493758 | ||
|
|
7b9ebbbb5f | ||
|
|
ea735fc0a0 | ||
|
|
06227e97d0 |
17
CHANGELOG.md
17
CHANGELOG.md
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [2.7.2] - 2021-07-30
|
||||||
|
### Added
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* [#1128](https://github.com/shlinkio/shlink/issues/1128) Increased memory limit reserved for the docker image, preventing it from crashing on GeoLite db download.
|
||||||
|
|
||||||
|
|
||||||
## [2.7.1] - 2021-05-30
|
## [2.7.1] - 2021-05-30
|
||||||
### Added
|
### Added
|
||||||
* *Nothing*
|
* *Nothing*
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
"endroid/qr-code": "^4.0",
|
"endroid/qr-code": "^4.0",
|
||||||
"geoip2/geoip2": "^2.9",
|
"geoip2/geoip2": "^2.9",
|
||||||
"guzzlehttp/guzzle": "^7.0",
|
"guzzlehttp/guzzle": "^7.0",
|
||||||
|
"guzzlehttp/psr7": "^1.7",
|
||||||
"happyr/doctrine-specification": "^2.0",
|
"happyr/doctrine-specification": "^2.0",
|
||||||
"jaybizzle/crawler-detect": "^1.2",
|
"jaybizzle/crawler-detect": "^1.2",
|
||||||
"laminas/laminas-config": "^3.3",
|
"laminas/laminas-config": "^3.3",
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
log_errors_max_len=0
|
log_errors_max_len=0
|
||||||
zend.assertions=1
|
zend.assertions=1
|
||||||
assert.exception=1
|
assert.exception=1
|
||||||
|
memory_limit=256M
|
||||||
|
|||||||
@@ -6,11 +6,18 @@ namespace Shlinkio\Shlink\Rest\Middleware;
|
|||||||
|
|
||||||
use Laminas\Diactoros\Response\EmptyResponse;
|
use Laminas\Diactoros\Response\EmptyResponse;
|
||||||
use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
|
use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
|
||||||
|
use Psr\Http\Message\ResponseFactoryInterface;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
class EmptyResponseImplicitOptionsMiddlewareFactory
|
class EmptyResponseImplicitOptionsMiddlewareFactory
|
||||||
{
|
{
|
||||||
public function __invoke(): ImplicitOptionsMiddleware
|
public function __invoke(): ImplicitOptionsMiddleware
|
||||||
{
|
{
|
||||||
return new ImplicitOptionsMiddleware(fn () => new EmptyResponse());
|
return new ImplicitOptionsMiddleware(new class implements ResponseFactoryInterface {
|
||||||
|
public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
|
||||||
|
{
|
||||||
|
return new EmptyResponse();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace ShlinkioTest\Shlink\Rest\Middleware;
|
|||||||
use Laminas\Diactoros\Response\EmptyResponse;
|
use Laminas\Diactoros\Response\EmptyResponse;
|
||||||
use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
|
use Mezzio\Router\Middleware\ImplicitOptionsMiddleware;
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
use Psr\Http\Message\ResponseFactoryInterface;
|
||||||
use ReflectionObject;
|
use ReflectionObject;
|
||||||
use Shlinkio\Shlink\Rest\Middleware\EmptyResponseImplicitOptionsMiddlewareFactory;
|
use Shlinkio\Shlink\Rest\Middleware\EmptyResponseImplicitOptionsMiddlewareFactory;
|
||||||
|
|
||||||
@@ -34,6 +35,10 @@ class EmptyResponseImplicitOptionsMiddlewareFactoryTest extends TestCase
|
|||||||
$ref = new ReflectionObject($instance);
|
$ref = new ReflectionObject($instance);
|
||||||
$prop = $ref->getProperty('responseFactory');
|
$prop = $ref->getProperty('responseFactory');
|
||||||
$prop->setAccessible(true);
|
$prop->setAccessible(true);
|
||||||
self::assertInstanceOf(EmptyResponse::class, $prop->getValue($instance)());
|
|
||||||
|
/** @var ResponseFactoryInterface $value */
|
||||||
|
$value = $prop->getValue($instance);
|
||||||
|
|
||||||
|
self::assertInstanceOf(EmptyResponse::class, $value->createResponse());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user