console-commands

Implement and register Symfony console commands for OrangeHRM entry points.

1.1k|746|Updated Jan 5, 2017
One-click install
npx skills add https://github.com/orangehrm/orangehrm --skill console-commands-orangehrm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: console-commands
Source: https://github.com/orangehrm/orangehrm/tree/main/.agents/skills/console-commands
Command: npx skills add https://github.com/orangehrm/orangehrm --skill console-commands-orangehrm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill resolves common confusion around OrangeHRM's two separate Symfony console entry points, frequent registration errors that cause commands to not appear in the expected console, and uncertainty about where to place new development or production-facing commands.

Core Features & Use Cases

  • Dual Console Guidance: Clear rules for choosing between the production bin/console (for ops, scheduled jobs, cache management) and developer-only devTools/core/console.php (for linting, test setup, doc generation) entry points.
  • End-to-End Command Implementation: Step-by-step instructions for building new commands using OrangeHRM's custom Command base class, including trait composition for service access, input/output handling, and naming conventions.
  • Troubleshooting Support: Reference for common pitfalls like missing interface implementations, dependency mismatches between consoles, and silent command name typos, plus recipes for interactive commands, sub-command invocation, and conditional dev-only registration.
  • Use Case: For example, if you are building a new scheduled job for production, this Skill guides you to extend the correct base class, register it via your plugin's configuration, and verify it appears in bin/console without breaking existing composer post-install steps.

Quick Start

Use this Skill to add a new production console command for your OrangeHRM plugin by extending the framework's base Command class, implementing the required getCommandName method, and registering it in your plugin's configuration class.

Frequently Asked Questions about console-commands

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register a Symfony console command in an OrangeHRM plugin?

To register a Symfony console command in an OrangeHRM plugin, extend the framework's Command base class, implement the required getCommandName method, and declare it in your plugin's configuration class to ensure visibility.

Why does my OrangeHRM console command not appear in the expected console?

Your OrangeHRM console command might be missing due to unimplemented plugin registration interfaces, silent command name typos, or placing a production command in the developer-only devTools entry point instead of bin/console.

What is the difference between bin/console and devTools/core/console.php in OrangeHRM?

In OrangeHRM, bin/console is the production entry point for scheduled jobs and cache management, whereas devTools/core/console.php is a developer-only tool used for linting, test setup, and documentation generation.

How do I add a production scheduled job command to OrangeHRM?

To add a production scheduled job command to OrangeHRM, extend the framework's base Command class, follow command naming conventions, register it via your plugin configuration, and verify it appears in bin/console without breaking composer post-install steps.

Can I create developer-only console commands for test setup in OrangeHRM?

Yes, you can create developer-only commands for test setup and linting by registering them through the devTools/core/console.php entry point using conditional dev-only registration techniques.

What are common limitations when composing Symfony console commands for OrangeHRM?

Limitations include dependency mismatches between the two distinct console entry points, failing to implement required plugin registration interfaces, and encountering silent runtime errors from incorrect command naming.