Migration 2.3.9 to 3.0.0 failed

This Middleware isn’t needed anymore and hasn’t been needed for quite a while, you can edit your settings-custom.php and remove the middleware declaration, and then delete the file.

We have some basic information about upgrading custom modules to v3. It does not specifically mention middleware and we can update that.