nystudio107 / craft-retour

Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website
https://nystudio107.com/plugins/retour
Other
38 stars 26 forks source link

Migration to 4.x craft broken, Db::dropIndexIfExists() #268

Closed Romanavr closed 1 year ago

Romanavr commented 1 year ago

Describe the bug

In the function Db::dropIndexIfExists() the last arugment (4) has incorrect type. It must be instance of Connection but the migration class itself given. Check PR https://github.com/nystudio107/craft-retour/pull/269 please

To reproduce

Try to apply migration on craft 4.x

Expected behaviour

Migration should run without errors $this->db should be given in the last argument

Screenshots

Exception: craft\helpers\Db::dropIndexIfExists(): Argument #4 ($db) must be of type ?craft\db\Connection, nystudio107\retour\migrations\m181216_043222_rebuild_indexes given, called in /mysite/vendor/nystudio107/craft-retour/src/migrations/m181216_043222_rebuild_indexes.php on line 29 (/mysite/vendor/craftcms/cms/src/helpers/Db.php:1178)

Versions

khalwat commented 1 year ago

Fixed via: https://github.com/nystudio107/craft-retour/pull/269

Thanks!