Adding App::uses('ClassRegistry', 'Utility'); to Lib/MigrationVersion.php because in 2.3 this file is not already loaded anymore when the console gets called.