BackwardCompatibilityCheck icon indicating copy to clipboard operation
BackwardCompatibilityCheck copied to clipboard

Removing `Generator` in `iterable|Generator` is not break BC

Open vjik opened this issue 1 year ago • 1 comments

iterable included Generator, so removing Generator doesn't change anything and don't break BC.

Example: https://3v4l.org/SENSO

But current result:

[BC] CHANGED: The parameter $rows of Yiisoft\Db\QueryBuilder\AbstractQueryBuilder#batchInsert() changed from iterable|Generator to a non-contravariant iterable
[BC] CHANGED: The parameter $rows of Yiisoft\Db\QueryBuilder\AbstractQueryBuilder#batchInsert() changed from iterable|Generator to iterable

vjik avatar Nov 12 '23 07:11 vjik

Probably needs a test addition here: https://github.com/Roave/BackwardCompatibilityCheck/tree/2ffdcbbd51b677c3d615caabbdafbdbc04e940f7/test/unit/DetectChanges/Variance

Ocramius avatar Nov 12 '23 20:11 Ocramius