CakeDC 用户插件:我如何安装 cakedc 用户插件,我已阅读文档
https://github.com/cakedc/users/tree/2.0
提取 cakedc 用户插件后,我将其复制到 app/Plugin 文件夹。
我运行此命令并收到错误:
cake migration all -plugin users
为什么会出现此错误?它是 cakephp-2.0,提取用户插件后,我看到文件夹的约定类似于 cakehp-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}
我如何安装这个用户插件并使用它?
https://github.com/cakedc/users/tree/2.0
After extracting the cakedc users plugin i copied it to app/Plugin folder.
I ran this command and got error:
cake migration all -plugin users
Why is this error? It's cakephp-2.0 and after extracting the users plugin, i see the convention of the folders are like cakehp-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}
How can i install this users plugin and use it ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果有人会搜索这个,以下是如何将 CakeDC 的迁移和用户插件与 CakePHP 2.x 一起使用:
1) 确保您从 git 下载了正确的分支 (2.0)。可以通过插件的驼峰式目录名称进行检查
2) 将它们放在 app/Plugins/ 中并具有相应的名称:
Migrations
和Users
3) 确保您通过以下方式加载了插件将它们包含在 app/Config/bootstrap.php 中,例如:
CakePlugin::load('Migrations');
4) 要导入用户插件方案,请转到 app/ 并运行命令
./Console/cake Migrations.migration all --plugin Users
这个顺序对我有用。希望它能帮助别人。如果对此有任何改进 - 欢迎大家。
In case someone will search this, here's how to use Migrations and Users plugins from CakeDC with CakePHP 2.x:
1) Make sure you downloaded correct branches (2.0) from git. It can be checked by camel-cased directory names of plugins
2) Place them inside app/Plugins/ with corresponding names:
Migrations
andUsers
3) make sure you loaded plugins by including them in app/Config/bootstrap.php like:
CakePlugin::load('Migrations');
4) to import Users plugins scheme go to app/ and run command
./Console/cake Migrations.migration all --plugin Users
This sequence worked for me. Hope it will help someone else. If there are any improvements to this - all are welcome.
文档上的语法有点错误。对于迁移,(首先安装 CakeDC Migrations 插件)您应该运行 ..
Syntax is a bit wrong on the docs. For migration, (first install the CakeDC Migrations plugin) you should run ..