Plugin Commands

Complete plugin management system with dependency resolution, security scanning, health checks, and cron task support.

List Plugins

The pteroca:plugin:list command displays all registered plugins with their current state and detailed information.

  • Command: pteroca:plugin:list

  • Alias: plugin:list (deprecated, removed in v1.0.0)

Options

  • --state, -s[=STATE]: Filter by state (enabled, disabled, faulted)

Examples

# Recommended (v0.6+)
php bin/console pteroca:plugin:list

# Filter by enabled plugins
php bin/console pteroca:plugin:list --state=enabled

# Deprecated (still works until v1.0.0)
php bin/console plugin:list

Enable Plugin

The pteroca:plugin:enable command enables a plugin with optional dependency resolution and circular dependency detection.

  • Command: pteroca:plugin:enable

  • Alias: plugin:enable (deprecated, removed in v1.0.0)

Arguments

  • plugin (required): Plugin name to enable

Options

  • --with-dependencies, -d: Automatically enable required dependencies

  • --force, -f: Force enable without dependency checks (DANGEROUS)

Examples

Features

  • Dependency resolution with semantic versioning support

  • Circular dependency detection

  • Automatic dependency enabling with --with-dependencies flag

  • Safety checks to prevent invalid plugin states

Disable Plugin

The pteroca:plugin:disable command disables a plugin with optional cascade disable of dependents.

  • Command: pteroca:plugin:disable

  • Alias: plugin:disable (deprecated, removed in v1.0.0)

Arguments

  • plugin (required): Plugin name to disable

Options

  • --cascade, -c: Also disable all plugins that depend on this plugin

Examples

Uninstall Plugin

The pteroca:plugin:uninstall command completely removes a plugin from the system, including database records, settings, and optionally the plugin files.

  • Command: pteroca:plugin:uninstall

  • Alias: plugin:uninstall (deprecated, removed in v1.0.0)

Arguments

  • plugin (required): Plugin name to uninstall

Options

  • --keep-files, -k: Keep plugin files on filesystem, only remove from database

Examples

Interactive Confirmation

The command provides two-step confirmation:

  1. Uninstallation Confirmation: Displays plugin information and confirms the uninstall operation

  2. File Deletion Prompt: Asks whether to delete plugin files from filesystem (unless --keep-files is used)

What It Does

  • Checks for enabled dependent plugins (blocks uninstallation if found)

  • Disables the plugin if it's currently enabled

  • Removes plugin database record

  • Deletes all plugin settings

  • Optionally deletes plugin directory from filesystem

  • Clears cache and rebuilds plugin registry

circle-exclamation

Scan for Plugins

The pteroca:plugin:scan command scans the plugins directory for new or updated plugins and displays discovered plugin manifests.

  • Command: pteroca:plugin:scan

  • Alias: plugin:scan (deprecated, removed in v1.0.0)

Examples

What It Does

  • Scans the plugins directory for valid plugin.json manifests

  • Reports discovered plugins with version and status

  • Identifies invalid manifests

  • Does not automatically enable plugins

Show Plugin Dependencies

The pteroca:plugin:deps command analyzes and displays plugin dependencies, detects circular dependencies, and shows topological load order.

  • Command: pteroca:plugin:deps

  • Alias: plugin:deps (deprecated, removed in v1.0.0)

Arguments

  • plugin (optional): Plugin name (shows all plugins if omitted)

Options

  • --tree, -t: Show full dependency tree

  • --dependents, -d: Show plugins that depend on this plugin

Examples

Features

  • Dependency tree visualization

  • Circular dependency detection

  • Topological load order display

  • Reverse dependency tracking (what depends on this plugin)

Install Plugin Dependencies

The pteroca:plugin:install-deps command installs Composer dependencies for plugins with production flags.

  • Command: pteroca:plugin:install-deps

  • Alias: plugin:install-deps (deprecated, removed in v1.0.0)

Arguments

  • plugin (optional): Plugin name to install dependencies for (omit for --all)

Options

  • --all, -a: Install dependencies for all plugins with composer.json

  • --clean, -c: Remove vendor/ directory before installation

Examples

Composer Flags Used

  • --no-dev: Production dependencies only

  • --no-plugins: Disable Composer plugins

  • --no-scripts: Don't run scripts

Validates

  • composer.json file existence

  • composer.json syntax

Publish Plugin Assets

The pteroca:plugin:assets:publish command publishes assets (CSS, JS, images) from plugin directories to the public folder.

  • Command: pteroca:plugin:assets:publish

  • Alias: plugin:assets:publish (deprecated, removed in v1.0.0)

Options

  • --plugin, -p[=PLUGIN]: Publish assets for specific plugin (publishes all enabled plugins if omitted)

Examples

Rebuild Plugin Cache

The plugin:rebuild-cache command rebuilds the enabled plugins cache to ensure the system has the latest plugin state information.

  • Command: plugin:rebuild-cache

Examples

When to Use

Use this command when:

  • Plugins are not being detected after enabling/disabling

  • Plugin state seems inconsistent

  • After manually modifying plugin files

  • After database changes affecting plugin records

  • As part of troubleshooting plugin issues

What It Does

  • Clears the current enabled plugins cache

  • Rebuilds the cache from the database

  • Updates the plugin registry with current state

  • Ensures all enabled plugins are properly indexed

circle-info

This command is automatically run when enabling or disabling plugins, but can be useful for troubleshooting or after manual changes.

Check Plugin Health

The pteroca:plugin:health:check command runs health checks on plugins and reports overall health percentage.

  • Command: pteroca:plugin:health:check

  • Alias: plugin:health:check (deprecated, removed in v1.0.0)

Arguments

  • plugin-name (optional): Plugin name to check (checks all enabled plugins if omitted)

Options

  • --all, -a: Check all plugins including disabled ones

Examples

Security Scan

The pteroca:plugin:security:scan command scans plugins for security vulnerabilities and reports findings by severity level.

  • Command: pteroca:plugin:security:scan

  • Alias: plugin:security:scan (deprecated, removed in v1.0.0)

Arguments

  • plugin-name (optional): Plugin name to scan (scans all enabled plugins if omitted)

Options

  • --severity, -s[=LEVEL]: Filter by severity level (critical, high, medium, low)

  • --all, -a: Scan all plugins including disabled ones

Examples

Security Checks

What it scans for:

  • Dangerous code patterns

  • SQL injection risks

  • Path traversal vulnerabilities

  • Insecure file operations

  • Command injection risks

List Cron Tasks

The pteroca:plugin:cron:list command displays all registered plugin cron tasks with status, schedule, and next run time.

  • Command: pteroca:plugin:cron:list

  • Alias: plugin:cron:list (deprecated, removed in v1.0.0)

Options

  • --enabled-only: Show only enabled tasks

  • --plugin, -p[=PLUGIN]: Filter by plugin name

Examples

Run Cron Tasks

The pteroca:plugin:cron:run command executes due cron tasks or a specific task, with execution reporting.

  • Command: pteroca:plugin:cron:run

  • Alias: plugin:cron:run (deprecated, removed in v1.0.0)

Arguments

  • task (optional): Specific task name to run (format: plugin-name:task-name)

Options

  • --force, -f: Force run even if task is not due

  • --dry-run: Show what would run without executing

Examples

Reset Plugin

The pteroca:plugin:reset command resets a faulted plugin back to registered state to allow re-enabling after issues are fixed. This command also fixes plugins stuck in the discovered state (detected by the system but unable to register).

  • Command: pteroca:plugin:reset

  • Alias: plugin:reset (deprecated, removed in v1.0.0)

Arguments

  • plugin (required): Plugin name to reset

Examples

Last updated