File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 name : " Generate CI matrix"
2121 uses : " glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1"
2222 with :
23- glpi-version : " 10 .0.x"
23+ glpi-version : " 11 .0.x"
2424 ci :
2525 name : " GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
2626 needs : " generate-ci-matrix"
Original file line number Diff line number Diff line change 2020 name: " Generate CI matrix"
2121 uses: " glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1"
2222 with :
23- glpi-version: " 10 .0.x"
23+ glpi-version: " 11 .0.x"
2424 ci:
2525 name: " GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}"
2626 needs: " generate-ci-matrix"
Original file line number Diff line number Diff line change 11{
22 "require" : {
3- "php" : " >=7.4 "
3+ "php" : " >=8.2 "
44 },
55 "require-dev" : {
66 "glpi-project/tools" : " ^0.8"
77 },
88 "config" : {
99 "optimize-autoloader" : true ,
1010 "platform" : {
11- "php" : " 7.4.0 "
11+ "php" : " 8.2.99 "
1212 },
1313 "sort-packages" : true
1414 }
Original file line number Diff line number Diff line change 11includes :
2+ - ../../vendor/glpi-project/phpstan-glpi/extension.neon
23 - ../../vendor/phpstan/phpstan-deprecation-rules/rules.neon
4+ - ../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon
35
46parameters :
57 level : max
@@ -10,7 +12,6 @@ parameters:
1012 scanDirectories :
1113 - ../../src
1214 bootstrapFiles :
13- - ../../inc/based_config.php
14- stubFiles :
1515 - ../../stubs/glpi_constants.php
16+ - ../../vendor/autoload.php
1617 treatPhpDocTypesAsCertain : false
Original file line number Diff line number Diff line change 1- <phpunit bootstrap =" tests/bootstrap.php" colors =" true" testdox =" true" >
1+ <phpunit
2+ bootstrap =" tests/bootstrap.php"
3+ colors =" true"
4+ testdox =" true"
5+ cacheDirectory =" var/phpunit"
6+ >
27 <testsuites >
38 <testsuite name =" Tests" >
49 <directory suffix =" Test.php" >tests</directory >
Original file line number Diff line number Diff line change 2929 <version >
3030 <num >{VERSION}</num >
3131 <!-- Add as many compatibility tag you want -->
32- <compatibility >9.4</compatibility >
33- <compatibility >9.3</compatibility >
34- <compatibility >9.2</compatibility >
32+ <compatibility >~11.0.0</compatibility >
3533 </version >
3634 </versions >
3735 <langs >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <psalm
3+ runTaintAnalysis =" true"
4+ >
5+ <projectFiles >
6+ <directory name =" src" />
7+ <file name =" hook.php" />
8+ <file name =" setup.php" />
9+ </projectFiles >
10+ </psalm >
Original file line number Diff line number Diff line change 3131 * -------------------------------------------------------------------------
3232 */
3333
34+ /** @phpstan-ignore theCodingMachineSafe.function (safe to assume this isn't already defined) */
3435define('PLUGIN_{ UNAME} _VERSION', '{ VERSION} ');
3536
3637// Minimal GLPI version, inclusive
37- define("PLUGIN_{ UNAME} _MIN_GLPI_VERSION", "10.0.0");
38+ /** @phpstan-ignore theCodingMachineSafe.function (safe to assume this isn't already defined) */
39+ define("PLUGIN_{ UNAME} _MIN_GLPI_VERSION", "11.0.0");
3840
3941// Maximum GLPI version, exclusive
40- define("PLUGIN_{ UNAME} _MAX_GLPI_VERSION", "10.0.99");
42+ /** @phpstan-ignore theCodingMachineSafe.function (safe to assume this isn't already defined) */
43+ define("PLUGIN_{ UNAME} _MAX_GLPI_VERSION", "11.0.99");
4144
4245/**
4346 * Init hooks of the plugin.
4447 * REQUIRED
4548 */
46- function plugin_init_{ LNAME} (): void
47- {
48- /** @var array< string, array< string, mixed>> $PLUGIN_HOOKS */
49- global $PLUGIN_HOOKS ;
50-
51- $PLUGIN_HOOKS [' csrf_compliant' ][' {LNAME}' ] = true ;
52- }
49+ function plugin_init_{ LNAME} (): void { }
5350
5451/**
5552 * Get the name and the version of the plugin
Original file line number Diff line number Diff line change 3131 * -------------------------------------------------------------------------
3232 */
3333
34- global $ CFG_GLPI , $ PLUGIN_HOOKS ;
35-
36- define ('GLPI_ROOT ' , __DIR__ . '/../../../ ' );
37- define ('GLPI_LOG_DIR ' , __DIR__ . '/files/_logs ' );
38-
39- define ('TU_USER ' , 'glpi ' );
40- define ('TU_PASS ' , 'glpi ' );
41- define ('GLPI_LOG_LVL ' , 'DEBUG ' );
42-
43- require GLPI_ROOT . '/inc/includes.php ' ;
34+ require __DIR__ . '/../../../phpunit/bootstrap.php ' ;
4435
4536if (!Plugin::isPluginActive ("{LNAME} " )) {
4637 throw new RuntimeException ("Plugin {LNAME} is not active in the test database " );
You can’t perform that action at this time.
0 commit comments