Skip to content

Feature/glpi11 compatibility#143

Open
cdbaq wants to merge 3 commits intopluginsGLPI:developfrom
cdbaq:feature/glpi11-compatibility
Open

Feature/glpi11 compatibility#143
cdbaq wants to merge 3 commits intopluginsGLPI:developfrom
cdbaq:feature/glpi11-compatibility

Conversation

@cdbaq
Copy link
Copy Markdown

@cdbaq cdbaq commented Mar 30, 2026

GLPI 11.x Compatibility Migration

Migrates the Barcode plugin from GLPI 10.x (v2.7.1) to GLPI 11.x (v3.0.0).

Tested on: GLPI 11.0.6 | Rocky Linux 10 | PHP 8.4.19 | MariaDB

Changes

File Issue Fix
setup.php Version bound 10.0.99 blocked install Updated to 11.0.0–11.0.99
setup.php csrf_compliant hook removed in GLPI 11 Removed
setup.php Plugin::getWebDir() deprecated Replaced with direct paths
hook.php $DB->query() or die() forbidden Replaced with doQueryOrDie()
hook.php PRIMARY KEY (ID) uppercase bug Fixed to lowercase id
inc/qrcode.class.php Special chars broken in QR content Removed __() from QR text
inc/qrcode.class.php Massive action UI column purpose unclear Added descriptive labels
inc/config.class.php array_keys()[0] deprecated pattern Updated to array_key_first()
front/send.php No filename validation Added strict PDF-only validation
front/document.send.php No MIME validation Added finfo MIME type check
front/checkItemByInv.php No itemtype class validation Added is_subclass_of(CommonDBTM)
composer.json PHP platform forced to 7.4 Updated to >=8.1

Additional

  • Added README.md (EN) with full installation guide
  • Added README_MIGRACION.md (ES) with Spanish installation guide

Co-authored with Claude (Anthropic) — claude.ai
Migration by Cristian David Baquero — Dawing S.A.S. (https://dawing.com.co)

cdbaq added 3 commits March 30, 2026 13:05
Migrated from GLPI 10.x (v2.7.1) to GLPI 11.x (v3.0.0) compatibility.

Tested on: GLPI 11.0.6 | Rocky Linux 10 | PHP 8.4.19 | MariaDB

Changes:
- Update version bounds to 11.0.0-11.0.99
- Remove deprecated csrf_compliant hook (GLPI 11)
- Replace Plugin::getWebDir() with direct paths (deprecated in GLPI 11)
- Fix DB queries: replace query()+die() with doQueryOrDie()
- Fix PRIMARY KEY uppercase bug in hook.php (MariaDB strict mode)
- Fix PHP 8.4 QR content encoding - removed __() from QR embedded text
- Improve massive action UI with descriptive labels per column
- Add security validation in send.php and document.send.php
- Require PHP >= 8.1
- Add README.md (EN) and README_MIGRACION.md (ES)

Co-authored with Claude (Anthropic) - claude.ai
Migration by Cristian David Baquero - Dawing S.A.S. (https://dawing.com.co)
fix: remove nested barcode subdirectory
Migrated from GLPI 10.x (v2.7.1) to GLPI 11.x (v3.0.0) compatibility.

Tested on: GLPI 11.0.6 | Rocky Linux 10 | PHP 8.4.19 | MariaDB

Changes:
- Update version bounds to 11.0.0-11.0.99
- Remove deprecated csrf_compliant hook (GLPI 11)
- Replace Plugin::getWebDir() with direct paths (deprecated in GLPI 11)
- Fix DB queries: replace query()+die() with doQueryOrDie()
- Fix PRIMARY KEY uppercase bug in hook.php (MariaDB strict mode)
- Fix PHP 8.4 QR content encoding - removed __() from QR embedded text
- Improve massive action UI with descriptive labels per column
- Add security validation in send.php and document.send.php
- Require PHP >= 8.1
- Add README.md (EN) and README_MIGRACION.md (ES)

Co-authored with Claude (Anthropic) - claude.ai
Migration by Cristian David Baquero - Dawing S.A.S. (https://dawing.com.co)
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.

1 participant