Skip to content

Commit d66d3d3

Browse files
committed
fix router plugin
1 parent 3df6df9 commit d66d3d3

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "infrangible/m2-cache-usage",
33
"description": "Infrangible Magento 2 Cache Usage",
44
"type": "magento2-module",
5-
"version": "2.4.1",
5+
"version": "2.4.2",
66
"license": "MIT",
77
"keywords": [
88
"Magento"

src/Plugin/Framework/App/RouterInterface.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
namespace Infrangible\CacheUsage\Plugin\Framework\App;
66

7-
use Magento\Framework\App\ActionInterface;
7+
use Infrangible\CacheUsage\Model\Cache;
88
use Magento\Framework\App\Request\Http;
99
use Magento\Framework\App\Router\Base;
10-
use Infrangible\CacheUsage\Model\Cache;
1110

1211
/**
1312
* @author Andreas Knollmann
14-
* @copyright 2014-2024 Softwareentwicklung Andreas Knollmann
13+
* @copyright 2014-2025 Softwareentwicklung Andreas Knollmann
1514
* @license http://www.opensource.org/licenses/mit-license.php MIT
1615
*/
1716
class RouterInterface
@@ -22,25 +21,13 @@ class RouterInterface
2221
/** @var Http */
2322
protected $request;
2423

25-
/**
26-
* @param Cache $cache
27-
* @param Http $request
28-
*/
2924
public function __construct(Cache $cache, Http $request)
3025
{
3126
$this->cache = $cache;
3227
$this->request = $request;
3328
}
3429

35-
/**
36-
* @param \Magento\Framework\App\RouterInterface $subject
37-
* @param ActionInterface|null $matched
38-
*
39-
* @return ActionInterface|null
40-
*/
41-
public function afterMatch(
42-
\Magento\Framework\App\RouterInterface $subject,
43-
?ActionInterface $matched): ?ActionInterface
30+
public function afterMatch(\Magento\Framework\App\RouterInterface $subject, $matched)
4431
{
4532
if ($matched && $subject instanceof Base) {
4633
$this->cache->setRouteName($this->request->getRouteName());

0 commit comments

Comments
 (0)