CakeDC用户插件:我如何安装CakeDC用户插件,我已经阅读了文档


CakeDC users plugin: How can i install cakedc users plugin, i have read the documentation

https://github.com/cakedc/users/tree/2.0

提取cakedc users插件后,我将其复制到app/plugin文件夹。

我运行了这个命令,得到了错误:

cake migration all -plugin users

为什么会出现这个错误?它是cakephp-2.0,在提取用户插件后,我看到文件夹的约定就像cakephp- 1.3

Error: Shell class MigrationShell could not be found.
#0 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('migration')
#1 /var/www/cakephp/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /var/www/cakephp/lib/Cake/Console/cake.php(24): ShellDispatcher::run(Array)
#3 {main}

如何安装和使用这个用户插件?

如果有人搜索这个,这里是如何使用迁移和用户插件从CakePHP 2.x:

1)确保从git下载了正确的分支(2.0)。可以通过插件的驼峰格式目录名

进行检查。

2)将它们放在app/Plugins/中,并使用相应的名称:MigrationsUsers

3)确保在app/Config/bootstrap.php中包含插件,如下所示:CakePlugin::load('Migrations');

4)导入用户插件方案,进入app/,运行命令./Console/cake Migrations.migration all --plugin Users

这个顺序对我有效。希望对别人有所帮助。

  1. 你安装了CakeDC的迁移插件吗?
  2. 你加载插件了吗?

文档中的语法有点错误。对于迁移,(首先安装CakeDC Migrations插件)你应该运行..

Console/cake Migrations.migration run all --plugin Users