Skip to content

Commit e95255f

Browse files
committed
[BUGFIX] Update RedirectDemandService constructor
Related #42
1 parent 1a1fd12 commit e95255f

4 files changed

Lines changed: 29 additions & 13 deletions

File tree

Classes/Service/RedirectDemandService.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ class RedirectDemandService
1717

1818
protected ?Demand $demand = null;
1919

20-
private RedirectRepository $redirectRepository;
21-
private EventDispatcherInterface $eventDispatcher;
22-
23-
public function __construct()
20+
public function __construct(
21+
private readonly RedirectRepository $redirectRepository,
22+
private readonly EventDispatcherInterface $eventDispatcher
23+
)
2424
{
25-
$this->redirectRepository = GeneralUtility::makeInstance(RedirectRepository::class);
26-
$this->eventDispatcher = GeneralUtility::makeInstance(EventDispatcherInterface::class);
2725
}
2826

2927
public function getData(): array
@@ -83,7 +81,7 @@ public function preparePagination(Demand $demand = null): array
8381
{
8482
$pagination = [];
8583
if ($demand) {
86-
$count = $this->redirectRepository->countRedirectsByByDemand($demand);
84+
$count = $this->redirectRepository->countRedirectsByDemand($demand);
8785
$numberOfPages = ceil($count / $demand->getLimit());
8886
$endRecord = $demand->getOffset() + $demand->getLimit();
8987
if ($endRecord > $count) {

Configuration/Services.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
services:
2+
_defaults:
3+
autowire: true
4+
autoconfigure: true
5+
public: true
6+
7+
Ayacoo\RedirectTab\:
8+
resource: '../Classes/*'
9+
exclude:
10+
- '../Classes/Domain/Model/*'
11+
- '../Classes/Form/*'
12+
- '../Classes/Event/*'

composer.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ayacoo/redirect-tab",
33
"type": "typo3-cms-extension",
4-
"version": "3.1.5",
4+
"version": "3.1.6",
55
"description": "Show TYPO3 redirects in the page properties",
66
"authors": [
77
{
@@ -13,8 +13,8 @@
1313
"license": "GPL-2.0-or-later",
1414
"require": {
1515
"php": ">= 8.1 < 8.5",
16-
"typo3/cms-core": "^12.4",
17-
"typo3/cms-redirects": "^12.4"
16+
"typo3/cms-core": "^12.4.42",
17+
"typo3/cms-redirects": "^12.4.42"
1818
},
1919
"autoload": {
2020
"psr-4": {
@@ -30,5 +30,11 @@
3030
"cms-package-dir": "{$vendor-dir}/typo3/cms",
3131
"web-dir": ".Build/Web"
3232
}
33+
},
34+
"config": {
35+
"allow-plugins": {
36+
"typo3/class-alias-loader": true,
37+
"typo3/cms-composer-installers": true
38+
}
3339
}
3440
}

ext_emconf.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
'author_email' => 'info@ayacoo.de',
99
'state' => 'stable',
1010
'clearCacheOnLoad' => 0,
11-
'version' => '3.1.5',
11+
'version' => '3.1.6',
1212
'constraints' => [
1313
'depends' => [
14-
'typo3' => '12.4.0-12.9.99',
15-
'redirects' => '12.4.0-12.9.99',
14+
'typo3' => '12.4.42-12.9.99',
15+
'redirects' => '12.4.42-12.9.99',
1616
'php' => '8.1.0-8.4.99',
1717
],
1818
'conflicts' => [

0 commit comments

Comments
 (0)