Skip to content

Conversation

Copy link

Copilot AI commented Feb 11, 2026

Checklist before requesting a review

  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

Adds two Symfony Console commands for toggling plugin question types via CLI, following GLPI's AbstractCommand pattern and the plugins:<key>:<command> naming convention used by CommandLoader.

  • plugins:advancedforms:enable <feature> — enables a question type
  • plugins:advancedforms:disable <feature> — disables a question type

Valid feature keys: enable_question_type_ip_address, enable_question_type_hostname, enable_question_type_hidden, enable_question_type_ldap_select.

Invalid keys return Command::FAILURE with a list of available features.

php bin/console plugins:advancedforms:enable enable_question_type_ip_address
php bin/console plugins:advancedforms:disable enable_question_type_ldap_select

Files added

  • src/Command/EnableFeatureCommand.php
  • src/Command/DisableFeatureCommand.php
  • tests/Command/EnableFeatureCommandTest.php
  • tests/Command/DisableFeatureCommandTest.php

Tests use CommandTester with the existing provideQuestionTypes data provider to cover all four question types plus invalid key rejection.

Screenshots (if appropriate):

N/A — CLI-only change.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add command to enable and disable plugin features Add CLI commands to enable/disable plugin features Feb 11, 2026
Copilot AI requested a review from ccailly February 11, 2026 14:26
@ccailly ccailly closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants