File tree Expand file tree Collapse file tree 5 files changed +61
-4
lines changed
Model/ResourceModel/Catalog Expand file tree Collapse file tree 5 files changed +61
-4
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Baldwin \UrlDataIntegrityChecker \MagentoCoreBugFixes ;
6
+
7
+ /**
8
+ * Silly workaround for core Magento bug introduced in 2.4.2
9
+ * - https://github.com/magento/magento2/issues/32292
10
+ * - https://github.com/baldwin-agency/magento2-module-url-data-integrity-checker/issues/16
11
+ */
12
+ class FakeSelectForMagentoIssue32292
13
+ {
14
+ /**
15
+ * @return array<mixed>
16
+ */
17
+ public function getPart (string $ part ): array
18
+ {
19
+ return [];
20
+ }
21
+ }
Original file line number Diff line number Diff line change 5
5
namespace Baldwin \UrlDataIntegrityChecker \Model \ResourceModel \Catalog \Category ;
6
6
7
7
use Baldwin \UrlDataIntegrityChecker \Checker \Catalog \Category \UrlKey as UrlKeyChecker ;
8
+ use Baldwin \UrlDataIntegrityChecker \MagentoCoreBugFixes \FakeSelectForMagentoIssue32292 as FakeSelect ;
8
9
use Baldwin \UrlDataIntegrityChecker \Storage \StorageInterface ;
9
10
use Magento \Framework \Api \AttributeInterface ;
10
11
use Magento \Framework \Api \AttributeValue ;
18
19
class UrlKeyCollection extends DataCollection implements SearchResultInterface
19
20
{
20
21
private $ storage ;
22
+ private $ fakeSelect ;
21
23
22
24
public function __construct (
23
25
EntityFactoryInterface $ entityFactory ,
24
- StorageInterface $ storage
26
+ StorageInterface $ storage ,
27
+ FakeSelect $ fakeSelect
25
28
) {
26
29
parent ::__construct ($ entityFactory );
27
30
28
31
$ this ->storage = $ storage ;
32
+ $ this ->fakeSelect = $ fakeSelect ;
29
33
}
30
34
31
35
/**
@@ -141,4 +145,9 @@ public function setTotalCount($totalCount)
141
145
{
142
146
throw new LocalizedException (__ ('Not implemented: setTotalCount! ' ));
143
147
}
148
+
149
+ public function getSelect (): FakeSelect
150
+ {
151
+ return $ this ->fakeSelect ;
152
+ }
144
153
}
Original file line number Diff line number Diff line change 5
5
namespace Baldwin \UrlDataIntegrityChecker \Model \ResourceModel \Catalog \Category ;
6
6
7
7
use Baldwin \UrlDataIntegrityChecker \Checker \Catalog \Category \UrlPath as UrlPathChecker ;
8
+ use Baldwin \UrlDataIntegrityChecker \MagentoCoreBugFixes \FakeSelectForMagentoIssue32292 as FakeSelect ;
8
9
use Baldwin \UrlDataIntegrityChecker \Storage \StorageInterface ;
9
10
use Magento \Framework \Api \AttributeInterface ;
10
11
use Magento \Framework \Api \AttributeValue ;
18
19
class UrlPathCollection extends DataCollection implements SearchResultInterface
19
20
{
20
21
private $ storage ;
22
+ private $ fakeSelect ;
21
23
22
24
public function __construct (
23
25
EntityFactoryInterface $ entityFactory ,
24
- StorageInterface $ storage
26
+ StorageInterface $ storage ,
27
+ FakeSelect $ fakeSelect
25
28
) {
26
29
parent ::__construct ($ entityFactory );
27
30
28
31
$ this ->storage = $ storage ;
32
+ $ this ->fakeSelect = $ fakeSelect ;
29
33
}
30
34
31
35
/**
@@ -141,4 +145,9 @@ public function setTotalCount($totalCount)
141
145
{
142
146
throw new LocalizedException (__ ('Not implemented: setTotalCount! ' ));
143
147
}
148
+
149
+ public function getSelect (): FakeSelect
150
+ {
151
+ return $ this ->fakeSelect ;
152
+ }
144
153
}
Original file line number Diff line number Diff line change 5
5
namespace Baldwin \UrlDataIntegrityChecker \Model \ResourceModel \Catalog \Product ;
6
6
7
7
use Baldwin \UrlDataIntegrityChecker \Checker \Catalog \Product \UrlKey as UrlKeyChecker ;
8
+ use Baldwin \UrlDataIntegrityChecker \MagentoCoreBugFixes \FakeSelectForMagentoIssue32292 as FakeSelect ;
8
9
use Baldwin \UrlDataIntegrityChecker \Storage \StorageInterface ;
9
10
use Magento \Framework \Api \AttributeInterface ;
10
11
use Magento \Framework \Api \AttributeValue ;
18
19
class UrlKeyCollection extends DataCollection implements SearchResultInterface
19
20
{
20
21
private $ storage ;
22
+ private $ fakeSelect ;
21
23
22
24
public function __construct (
23
25
EntityFactoryInterface $ entityFactory ,
24
- StorageInterface $ storage
26
+ StorageInterface $ storage ,
27
+ FakeSelect $ fakeSelect
25
28
) {
26
29
parent ::__construct ($ entityFactory );
27
30
28
31
$ this ->storage = $ storage ;
32
+ $ this ->fakeSelect = $ fakeSelect ;
29
33
}
30
34
31
35
/**
@@ -141,4 +145,9 @@ public function setTotalCount($totalCount)
141
145
{
142
146
throw new LocalizedException (__ ('Not implemented: setTotalCount! ' ));
143
147
}
148
+
149
+ public function getSelect (): FakeSelect
150
+ {
151
+ return $ this ->fakeSelect ;
152
+ }
144
153
}
Original file line number Diff line number Diff line change 5
5
namespace Baldwin \UrlDataIntegrityChecker \Model \ResourceModel \Catalog \Product ;
6
6
7
7
use Baldwin \UrlDataIntegrityChecker \Checker \Catalog \Product \UrlPath as UrlPathChecker ;
8
+ use Baldwin \UrlDataIntegrityChecker \MagentoCoreBugFixes \FakeSelectForMagentoIssue32292 as FakeSelect ;
8
9
use Baldwin \UrlDataIntegrityChecker \Storage \StorageInterface ;
9
10
use Magento \Framework \Api \AttributeInterface ;
10
11
use Magento \Framework \Api \AttributeValue ;
18
19
class UrlPathCollection extends DataCollection implements SearchResultInterface
19
20
{
20
21
private $ storage ;
22
+ private $ fakeSelect ;
21
23
22
24
public function __construct (
23
25
EntityFactoryInterface $ entityFactory ,
24
- StorageInterface $ storage
26
+ StorageInterface $ storage ,
27
+ FakeSelect $ fakeSelect
25
28
) {
26
29
parent ::__construct ($ entityFactory );
27
30
28
31
$ this ->storage = $ storage ;
32
+ $ this ->fakeSelect = $ fakeSelect ;
29
33
}
30
34
31
35
/**
@@ -141,4 +145,9 @@ public function setTotalCount($totalCount)
141
145
{
142
146
throw new LocalizedException (__ ('Not implemented: setTotalCount! ' ));
143
147
}
148
+
149
+ public function getSelect (): FakeSelect
150
+ {
151
+ return $ this ->fakeSelect ;
152
+ }
144
153
}
You can’t perform that action at this time.
0 commit comments