Skip to content

Lazy load IllustrationManager - #25404

Merged
trasher merged 2 commits into
glpi-project:12.0/bugfixesfrom
trasher:fix/lazyload-illustrations
Sep 7, 2026
Merged

Lazy load IllustrationManager#25404
trasher merged 2 commits into
glpi-project:12.0/bugfixesfrom
trasher:fix/lazyload-illustrations

Conversation

@trasher

@trasher trasher commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

IllustrationManager requires files to be present at it instanciation; which assumes node deps have been installed.
For the CI of a plugin, I install GLPI and composer deps only, to run check headers command:

Run cd glpi && php bin/console tools:licence_headers_check --plugin glpiinventory

RuntimeException {#7520
  #message: "Failed to read file: /home/runner/work/glpi-inventory-plugin/glpi-inventory-plugin/glpi/public/lib/glpi-project/illustrations/icons.json"
  #code: 0
  #file: "./src/Glpi/UI/IllustrationManager.php"
  #line: 419
  [...]

Of course I could just install npm deps plugin side, but that's not required, and that would take more time jusst for a lint job.
It seems also better this error not to happen in the constructor.

PR also fix a test that failed several times during my tests.

@cedric-anne cedric-anne added this to the 12.0.0 milestone Sep 7, 2026
@trasher
trasher merged commit 734f835 into glpi-project:12.0/bugfixes Sep 7, 2026
13 checks passed
@trasher
trasher deleted the fix/lazyload-illustrations branch September 7, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants