Migrate glpi-project/tools to core#22465
Migrate glpi-project/tools to core#22465cedric-anne merged 7 commits intoglpi-project:11.0/bugfixesfrom
Conversation
b0d64a4 to
4aa5600
Compare
AdrienClairembault
left a comment
There was a problem hiding this comment.
I think you'll need to rebase and update the header (2026)
657aa2b to
5554081
Compare
b82e036 to
275e8e7
Compare
|
This PR is very huge. Should not be splat into smaller parts easier to follow and review? |
cedric-anne
left a comment
There was a problem hiding this comment.
Except added tests are failing, it seems technically OK. I will do some manuel tests to compare results with the scripts from glpi-project/tools.
Fixed it was due to the fact that the pot file didn't exist in test and previous code would not run the file creation (php would only run the file_exist in the if condition) |
|
I'll probably test in the day, but I won't review any lines of code - nor past comments; there are too much of them. I already make a quick check and see nothing notable. I'd really prefer this one to be merged after 11.0.5 has been released; so we have time to fix potential issues, without quick fix to do on release day. Problems caused by the tools lib are not new; this can wait one or two extra week. |
|
@Rom1-B @stonebuzz could you please test on your side the plugin release process from this PR? |
|
This should also be updated accordingly. https://github.com/glpi-project/plugin-translation-workflows |
Done in PRs :
They should be merged once this one is deployed as it will be based on the source code here (for now I tested them using a fork) |
5cfa07d to
4b117f7
Compare
cedric-anne
left a comment
There was a problem hiding this comment.
We can merge this PR without breaking existing plugins ci/release/translation workflows.
These workflows will be updated to keep using glpi-project/tools from the plugins vendor if they are found, and with a fallback to the new commands introduced here. This will permit to migrate plugins one at a time, and will give the ability to put back the glpi-project/tools dependency to a migrated plugin to temporarly bypass any issue present in the new commands.
7215ccd to
e8e4b7d
Compare
cedric-anne
left a comment
There was a problem hiding this comment.
After thinking about the way the plugin export command would be used, I think it could be drastically simplified:
- with a unique
destparameter that corresponds to the path of the destination filee.g. --dest=~/build/glpi-myplugin-preversion-20260129.tar.bz2; - in combination with the
--auto-compresstar option, instead of-jto allow usage of other compression formats (e.g..tar.gz); - using the
git checkout-indexcommand, like we do in themake_release.shscript, instead ofgit ls-tree + git archive + untar; - moving the "banned files" cleaning at the end of the process, right before the archive creation.
3a6b3b2 to
331aa06
Compare
331aa06 to
0dc4cb9
Compare
Checklist before requesting a review
Please delete options that are not relevant.
Description
Migrate https://github.com/glpi-project/tools into the core with also a converted python/bash scripts so all are runned as Symfony Command.
Doing that migration will avoid the dependencies exception libraries could have when they were requiring a different glpi-project/tools
For the future we could put glpi-project/tools as archived but we can't remove it from packagist as plugin supporting prior to GLPI 11.0.5 version would have to still install that library.
It's can be release in 11.0.5 as it was currently only a dev dependencies, so in worth case if the user try to run a command it will just not work.
It will force local dev env to be up to date (or at least be in 11.0.5-dev)
Template https://github.com/pluginsGLPI/empty should also be updated to remove that composer dependency once this PR is merged.
TODOs
PHPStan Rules(already present in core MissingGlobalVarTypeRule)What was done
LicenceHeadersCheckCommand.phpandCompileTwigTemplatesCommand.php(no major edit - namespace and print changes)plugin-releasepython file to PHPextract-localbash file to PHPInterconnected PR (merge order) :
Plugins CI
Whatsapp plugin got a dedicated PR to test the modification (see in the feed under for the link)