Skip to content

Commit

Permalink
Merge branch 'hotfix/2.5.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenth committed Sep 18, 2020
2 parents 4078f11 + 058649b commit 5e654bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.5.5

* Suppress logging when redirect rules file is empty

# 2.5.4

* Add support for symfony/stopwatch:^5.0 (version 4.0 is still supported)
Expand Down
4 changes: 3 additions & 1 deletion classes/RedirectMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
use Vdlp\Redirect\Classes\Contracts\CacheManagerInterface;
use Vdlp\Redirect\Classes\Contracts\RedirectConditionInterface;
use Vdlp\Redirect\Classes\Contracts\RedirectManagerInterface;
use Vdlp\Redirect\Classes\Exceptions\InvalidScheme;
use Vdlp\Redirect\Classes\Exceptions\NoMatchForRequest;
use Vdlp\Redirect\Classes\Exceptions\UnableToLoadRules;
use Vdlp\Redirect\Models\Settings;

final class RedirectMiddleware
Expand Down Expand Up @@ -94,7 +96,7 @@ public function handle(Request $request, Closure $next)
} else {
$rule = $this->redirectManager->match($requestUri, $request->getScheme());
}
} catch (NoMatchForRequest $e) {
} catch (NoMatchForRequest | UnableToLoadRules | InvalidScheme $e) {
$rule = false;
} catch (Throwable $e) {
$this->log->error(sprintf(
Expand Down
2 changes: 2 additions & 0 deletions updates/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,5 @@
- "Improve / fixes redirect rule caching -- See: https://github.com/vdlp/oc-redirect-plugin/releases/tag/2.5.3"
2.5.4:
- "Add support for symfony/stopwatch:^5.0 (version 4.0 is still supported) -- See: https://github.com/vdlp/oc-redirect-plugin/releases/tag/2.5.4"
2.5.5:
- "Suppress logging when redirect rules file is empty -- See: https://github.com/vdlp/oc-redirect-plugin/releases/tag/2.5.5"

0 comments on commit 5e654bc

Please sign in to comment.