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

发布于 2024-12-11 20:14:32 字数 650 浏览 0 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暖风昔人 2024-12-18 20:14:32

如果有人会搜索这个,以下是如何将 CakeDC 的迁移和用户插件与 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

这个顺序对我有用。希望它能帮助别人。如果对此有任何改进 - 欢迎大家。

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 and Users

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.

悲欢浪云 2024-12-18 20:14:32
  1. 您是否安装了 CakeDC 的迁移插件
  2. 加载插件了吗?
  1. Have you installed CakeDC's Migrations plugin?
  2. Have you loaded the plugins?
蓬勃野心 2024-12-18 20:14:32

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

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

Syntax is a bit wrong on the docs. For migration, (first install the CakeDC Migrations plugin) you should run ..

Console/cake Migrations.migration run all --plugin Users
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文