Draft
Conversation
9 tasks
Contributor
GLPI tools is not included in GLPI, that's still something to be done. |
Contributor
Author
|
My mistake this one should be in draft until glpi-project/glpi#22465 is merged. I put it in the interconnect merge order but forgot to flat this as draft for now. Edit could still be checked but only merged by following the order (and after glpi release) Looks like I can't change the status from GitHub Mobile app |
Rom1-B
reviewed
Jan 26, 2026
tests/bootstrap.php
Outdated
Comment on lines
34
to
41
| $current_plugin_folder = basename(realpath(__DIR__ . '/../')); | ||
|
|
||
| require __DIR__ . '/../../../tests/bootstrap.php'; | ||
| require dirname(__DIR__) . '/vendor/autoload.php'; | ||
|
|
||
| if (!Plugin::isPluginActive("{LNAME}")) { | ||
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); | ||
| if (!Plugin::isPluginActive($current_plugin_folder)) { | ||
| echo("Plugin $current_plugin_folder is not active in the test database" . PHP_EOL); | ||
| die(); |
Contributor
There was a problem hiding this comment.
Throwing an exception seems better than die()?
Suggested change
| $current_plugin_folder = basename(realpath(__DIR__ . '/../')); | |
| require __DIR__ . '/../../../tests/bootstrap.php'; | |
| require dirname(__DIR__) . '/vendor/autoload.php'; | |
| if (!Plugin::isPluginActive("{LNAME}")) { | |
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); | |
| if (!Plugin::isPluginActive($current_plugin_folder)) { | |
| echo("Plugin $current_plugin_folder is not active in the test database" . PHP_EOL); | |
| die(); | |
| require __DIR__ . '/../../../tests/bootstrap.php'; | |
| require dirname(__DIR__) . '/vendor/autoload.php'; | |
| if (!Plugin::isPluginActive("{LNAME}")) { | |
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); |
Contributor
There was a problem hiding this comment.
Far better, yes. Also die() returns 0; which is not an error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GLPI tools is now natively inside GLPI 11 core, we can remove it's dependency.
Based on what was done on the whatsapp plugin, I've updated the autoload and test bootstrap.
Nightly images will run it and otherwise it will be available on GLPI 11.0.6
Interconnected PR (merge order) :