Skip to content

Commit 942ce7e

Browse files
committed
Add FilterRuleSelect to the aliased classes.
1 parent 1ccb84c commit 942ce7e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/deprecated-autoload.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020

2121
use MetaModels\AttributeSelectBundle\Attribute\AttributeTypeFactory;
2222
use MetaModels\AttributeSelectBundle\Attribute\Select;
23+
use MetaModels\AttributeSelectBundle\FilterRule\FilterRuleSelect;
2324

2425
// This hack is to load the "old locations" of the classes.
2526
spl_autoload_register(
2627
function ($class) {
2728
static $classes = [
28-
'MetaModels\Attribute\Select\Select' => Select::class,
29-
'MetaModels\Attribute\Select\AttributeTypeFactory' => AttributeTypeFactory::class
29+
'MetaModels\Attribute\Select\Select' => Select::class,
30+
'MetaModels\Attribute\Select\AttributeTypeFactory' => AttributeTypeFactory::class,
31+
'MetaModels\Filter\Rules\FilterRuleSelect' => FilterRuleSelect::class,
3032
];
3133

3234
if (isset($classes[$class])) {

tests/DeprecatedAutoloaderTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
use MetaModels\AttributeSelectBundle\Attribute\Select;
2424
use MetaModels\AttributeSelectBundle\Attribute\AttributeTypeFactory;
25+
use MetaModels\AttributeSelectBundle\FilterRule\FilterRuleSelect;
2526
use PHPUnit\Framework\TestCase;
2627

2728
/**
@@ -38,7 +39,8 @@ class DeprecatedAutoloaderTest extends TestCase
3839
*/
3940
private static $classes = [
4041
'MetaModels\AttributeSelectBundle\Attribute\Select' => Select::class,
41-
'MetaModels\AttributeSelectBundle\Attribute\AttributeTypeFactory' => AttributeTypeFactory::class
42+
'MetaModels\AttributeSelectBundle\Attribute\AttributeTypeFactory' => AttributeTypeFactory::class,
43+
'MetaModels\Filter\Rules\FilterRuleSelect' => FilterRuleSelect::class
4244
];
4345

4446
/**

0 commit comments

Comments
 (0)