Allow Users to login into Yii2 with Wordpress password hashes

I have had a job to rebuild a project from WordPress to Yii2. It was a task to migrate users from WordPress database to Yii2 project’s database, so I have written this code to allow users to be logged in with WordPress hashes too:

There was no any solutions to have it realized on my research at the time, and it looks like there are no any solutions for today too, so I wonder why do I have a small amount of reviews on github about, the code can be useful, so I show it here for possible common tasks as I have had. May be a someone will save an own time…

Hello,

Why don’t you

  1. Make it an extension that extends yii\base\Security, and
  2. Update it to follow the latest source code of yii\base\Security.php ?