Codeception / module-yii2

Codeception module for Yii2 framework
MIT License
16 stars 36 forks source link

Codeception documentation specified this is true #4

Closed SaloEater closed 4 years ago

SaloEater commented 4 years ago

https://codeception.com/docs/modules/Yii2 transaction - (default: true)

SamMousa commented 4 years ago

LGTM

SamMousa commented 4 years ago

Thanks!

Naktibalda commented 4 years ago

I wonder if it had to be a documentation fix instead, this is a breaking change for some users.

14

SamMousa commented 4 years ago

In hindsight you are 100% right.

SaloEater commented 4 years ago

I wonder if it had to be a documentation fix instead, this is a breaking change for some users.

14

To be honest, if someone writes non-transactional test then he almost 100% has errors in his code.

SamMousa commented 4 years ago

No that's not true. It might not be independent and well structured, but it is no indicator for errors...

Naktibalda commented 4 years ago

@SamMousa It isn't too late to change default value to false and document it.

SamMousa commented 4 years ago

That's true, also fine with me.

Naktibalda commented 4 years ago

I looked at the code and there was code which set transaction to the same value as cleanup if transaction wasn't set, and cleanup is set to true by default, so this change only made difference for users who had cleanup: false and no transaction setting in their configuration.

https://github.com/Codeception/module-yii2/blob/1802a03cdc3b01bb6cd818a5a81979bac16cad27/src/Codeception/Module/Yii2.php#L229-L230