dereuromark/cakephp-ide-helper

"bin/cake annotate all" get "Unknown command cake annotate"

nicokaiser79 opened this issue · 4 comments

I have the ide-helper installed by this instruction https://github.com/dereuromark/cakephp-ide-helper/tree/master/docs.
But when I run "bin/cake annotate all" will be "Unknown command 'cake annotate' shown. I have installed CakePhp 4.1.7.
When I run the command "bin/cake plugin loaded" bring that list:

Authentication
Bake
Cake/TwigView
DebugKit
IdeHelper
Migrations

in Application.php in the Method bootstrap I added

$this->addPlugin('IdeHelper');

When i run the command "bin/cake --help" bring that list:

Current Paths:

    app: src\
    root: D:\dev\shop\
    core: D:\dev\shop\vendor\cakephp\cakephp\

Available Commands:

App:

    console
    help

Bake:

    bake
    bake all
    bake behavior
    bake cell
    bake command
    bake component
    bake controller
    bake controller all
    bake fixture
    bake fixture all
    bake form
    bake helper
    bake mailer
    bake middleware
    bake model
    bake model all
    bake plugin
    bake shell
    bake shell_helper
    bake task
    bake template
    bake template all
    bake test

Cake/TwigView:

    twig-view compile

CakePHP:

    cache clear
    cache clear_all
    cache list
    completion
    i18n
    i18n extract
    i18n init
    plugin assets copy
    plugin assets remove
    plugin assets symlink
    plugin load
    plugin loaded
    plugin unload
    routes
    routes check
    routes generate
    schema_cache build
    schema_cache clear
    server
    version

DebugKit:

    benchmark

Migrations:

    bake migration
    bake migration_diff
    bake migration_snapshot
    bake seed
    bake simple_migration
    migrations
    migrations create
    migrations dump
    migrations mark_migrated
    migrations migrate
    migrations orm-cache-build
    migrations orm-cache-clear
    migrations rollback
    migrations seed
    migrations status

To run a command, type cake command_name [args|options]
To get help on a specific command, type cake command_name --help

It is important to add it to the bootstrap for CLI.
But that said, this sounds like a user error and here this is a bug tracker.
I would suggest reaching out to the community ways of getting help on this.
The tool itself is most likely not the issue, as thousands of others do not have this issue.

I moved the plugin to bootstrap cli. According to debugging, the console method is not called in the plugin. How could I proceed to further isolate the problem?

It is weird that the plugin is "loaded", but doesn't show its commands.
I think it might be related to them being "shells" instead of new "commands"
So my guess: You need to upgrade your bootstrapping classes and index.php etc
As those are loading something in the old way maybe.

I have found a solution to the problems described above. It existed in the folder \plugins\ the folder IdeHelper with corresponding files. I deleted this folder. Voila the commands runs greate