Skip to content

Make the plugin compatible with GLPI 11 and 12 - #72

Open
andrefelipeufcg wants to merge 1 commit into
pluginsGLPI:mainfrom
andrefelipeufcg:glpi-11-12-compatibility
Open

andrefelipeufcg wants to merge 1 commit into
pluginsGLPI:mainfrom
andrefelipeufcg:glpi-11-12-compatibility

Conversation

@andrefelipeufcg

@andrefelipeufcg andrefelipeufcg commented Oct 20, 2026 •

Copy link
Copy Markdown

Related to #59

GLPI 11 and 12 compatibility

This PR only makes the plugin run on both GLPI 11 and GLPI 12 (bumped to 1.4.1). It contains no translation files; those are in a separate PR (pt_BR translation).

Changes

  • setup.php: version 1.4.1, minimum GLPI 11.0.0, maximum 12.0.99.
  • advancedforms.xml: add a 1.4.1 entry with compatibility >=11.0.0; the 1.4.0 entry is unchanged.
  • TicketReservationRequest: remove the redeclared static properties ($itemtype, $items_id, $rightname) and set the inherited ones during plugin init. These are untyped in GLPI 11 and typed in GLPI 12, so redeclaring them with either form is a fatal error on the other version.
  • Tree cascade dropdown (question type, children controller, text condition handler): handle both getDefaultValueItemId()/items_id (GLPI 11) and getDefaultValuesItemIds()/items_ids (GLPI 12).
  • config_form.html.twig: render the _glpi_csrf_token field only on GLPI 11; GLPI 12 no longer uses CSRF tokens.
  • Reservation calendar (reservation_question.html.twig, ReservationQuestionWidget.js): on GLPI 11 use the core FullCalendar v5 with its stylesheet; on GLPI 12 load the bundled FullCalendar v6.

Validation

  • PHP and JavaScript syntax checks pass.
  • Static check of the APIs against GLPI 11.0.11 and 12.0.0 sources.
  • PHPUnit was not run, and 11.0.0 as the minimum has not been tested.

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