Getting started
Complete Installation. This example adds PhpStorm metadata for an existing CakePHP Authentication integration. It does not change authentication behavior.
Check your Authentication setup
Authentication must be installed and loaded in the CLI application for plugin aliases such as Authentication.Form to appear. Keep your existing $this->addPlugin('Authentication') registration available when running commands, or list Authentication in the parent plugin’s IdeHelper.plugins configuration. Application authenticator classes can be scanned without plugin aliases.
Register one task
In config/app_local.php, add this entry to the configuration array returned by the file. Put the use declaration above the return statement:
use IdeHelperExtra\Authentication\Generator\Task\AuthServiceLoadAuthenticatorTask;
return [
// Keep your other application configuration here.
'IdeHelper' => [
'generatorTasks' => [
AuthServiceLoadAuthenticatorTask::class => AuthServiceLoadAuthenticatorTask::class,
],
],
];Merge this task into any existing IdeHelper.generatorTasks configuration. Other parent tasks remain enabled unless you disable them explicitly.
Generate the metadata
The parent’s default tasks also inspect database metadata. Use your application’s configured database connection, or disable its database tasks as described in the parent docs.
From the application root:
bin/cake generate phpstormThe parent command writes .phpstorm.meta.php/.ide-helper.meta.php inside the application root. Regenerate it after adding or renaming classes. The plugin scans authenticator files in your application and discoverable plugin paths; src/Authenticator/CustomAuthenticator.php supplies the name Custom when its class can be resolved. Plugin classes use aliases such as Authentication.Form.
Check completion
In PhpStorm, open code that calls your authentication service:
$service->loadAuthenticator('Custom');Replace Custom with the name of an authenticator your application actually provides. The generated metadata supplies its corresponding class as the return type. Keep the metadata file inside the indexed project. If completion is missing, inspect it for AuthenticationService::loadAuthenticator(0) and your class name, then check the parent editor setup.
Extra provides PhpStorm metadata, not a runtime authenticator or a replacement for the Authentication plugin. For filter-name completion, configure the Search task instead.