【问题标题】:CakePHP 3 Migrations Plugin Error when running bin/cake Migrations migrate运行 bin/cake Migrations migrate 时 CakePHP 3 Migrations Plugin 错误
【发布时间】:2016-03-03 10:02:53
【问题描述】:

我几乎每次使用 CakePHP 时都会使用 Migrations,而且我从未遇到任何问题。

不过,这一次我在尝试执行以下命令时遇到了问题

bin/cake Migrations migrate

我使用

创建了文件
bin/cake bake migrations CreateTaxes state:string[5] ...

文件创建成功,但是当我运行命令迁移时,出现以下错误:

PHP Fatal error:  Class Migrations\CakeAdapter contains 1 abstract method 
and must therefore be declared abstract or implement the remaining methods 
(Phinx\Db\Adapter\AdapterInterface::getVersionLog) in 
/var/www/taxes/website/vendor/cakephp/migrations/src/CakeAdapter.php
on line 670

我无法弄清楚为什么它会抛出此错误并且不允许命令完成。我已经查看了 CakeAdapter.phpAdapterInterface.php 的 Phinx。

【问题讨论】:

    标签: cakephp-3.0


    【解决方案1】:

    这实际上是一个现已修复的错误。 https://github.com/cakephp/migrations/issues/202

    【讨论】:

    • 感谢回复,我也遇到这个问题了 kk
    • 不客气!这很奇怪……我很高兴 CakePHPMigrations 的开发人员很快就修复了它。
    猜你喜欢
    • 2016-04-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-29
    • 2014-05-03
    • 1970-01-01
    • 2017-01-07
    • 2016-03-15
    相关资源
    最近更新 更多