module-yii2 icon indicating copy to clipboard operation
module-yii2 copied to clipboard

Unable to load yii\elasticsearch\ActiveRecord-based fixtures

Open Mikk36 opened this issue 6 months ago • 4 comments

https://github.com/Codeception/module-yii2/blob/1188aa19b1eaee3514b6d4cbbd9c58261d1aaaa2/src/Codeception/Module/Yii2.php#L606 This strong return type prevents from returning any other ActiveRecord, which isn't based on the yii\db\ActiveRecord. Could this be relaxed?

Mikk36 avatar Jun 10 '25 12:06 Mikk36

Which types do you need?

samdark avatar Jun 10 '25 16:06 samdark

It looks like yii\elasticsearch\ActiveRecord extends yii\db\BaseActiveRecord, so that would suffice.

Mikk36 avatar Jun 10 '25 17:06 Mikk36

https://github.com/yiisoft/yii2/blob/master/framework/test/BaseActiveFixture.php#L45

That one is wrong too then.

SamMousa avatar Jun 10 '25 19:06 SamMousa

@Mikk36 i'm open to a PR that relaxes it to baseactiverecord.

SamMousa avatar Sep 25 '25 08:09 SamMousa