phalcon / migrations

Generate or migrate database changes via migrations.
https://docs.phalcon.io/latest/en/db-migrations
BSD 3-Clause "New" or "Revised" License
27 stars 24 forks source link

Add support for Phalcon 5 #128

Closed destyk closed 2 years ago

destyk commented 2 years ago

Currently I have PHP 8.0, Phalcon 5.0.0-alpha7 and phalcon-migration.phar version 2.2.4 installed on my server.

My config file looks like this:

use Phalcon\Config;

return new Config([
    //...
]);

When I start generating the migration, I get the response:

Phalcon Migrations                                                                                                                                                     

Fatal Error: Class "Phalcon\Config" not found

But if I change the Phalcon\Config class to Phalcon\Config\Config (which is supported in Phalcon 5), I get this response:

Phalcon Migrations                                                                                                                                                     

Fatal Error: Phalcon\Migrations\Console\Commands\Migration::loadConfig(): Return value must be of type Phalcon\Config, Phalcon\Config\Config returned

Hopefully Phalcon 5 support will be added soon!

Jeckerson commented 2 years ago

Available since v3.0.0 - https://github.com/phalcon/migrations/releases/tag/v3.0.0