Skip to content

Commit 136d6af

Browse files
Lainowstonebuzz
authored andcommitted
GLPI 11 Compatibility
1 parent 14093d9 commit 136d6af

35 files changed

+1155
-816
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
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"

ajax/assign_me.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include("../../../inc/includes.php");
31+
use Glpi\Exception\Http\BadRequestHttpException;
32+
3233
Session::checkLoginUser();
3334

3435
if (! isset($_REQUEST['tickets_id'])) {
35-
Html::displayErrorAndDie(__("missing parameters", "escalade"));
36+
throw new BadRequestHttpException();
3637
}
3738

3839
PluginEscaladeTicket::assign_me((int) $_REQUEST['tickets_id']);

ajax/central.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include("../../../inc/includes.php");
3231
header("Content-Type: text/html; charset=UTF-8");
3332
Html::header_nocache();
3433

ajax/cloneandlink_ticket.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include("../../../inc/includes.php");
3231
header("Content-Type: text/html; charset=UTF-8");
3332
Html::header_nocache();
3433

3534
Session::checkLoginUser();
3635

37-
if (!isset($_REQUEST['tickets_id'])) {
38-
exit;
36+
if (isset($_REQUEST['tickets_id'])) {
37+
PluginEscaladeTicket::cloneAndLink($_REQUEST['tickets_id']);
3938
}
40-
41-
PluginEscaladeTicket::cloneAndLink($_REQUEST['tickets_id']);

ajax/history.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828
* -------------------------------------------------------------------------
2929
*/
3030

31-
include("../../../inc/includes.php");
3231
header("Content-Type: text/html; charset=UTF-8");
3332
Html::header_nocache();
3433

3534
Session::checkLoginUser();
3635

37-
if (!isset($_REQUEST['tickets_id'])) {
38-
exit;
36+
if (isset($_REQUEST['tickets_id'])) {
37+
PluginEscaladeHistory::getHistory($_REQUEST['tickets_id']);
3938
}
40-
41-
PluginEscaladeHistory::getHistory($_REQUEST['tickets_id']);

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{
22
"require": {
3-
"php": ">=7.4"
3+
"php": ">=8.2"
44
},
55
"require-dev": {
66
"friendsofphp/php-cs-fixer": "^3.76",
77
"friendsoftwig/twigcs": "^6.1",
8+
"glpi-project/phpstan-glpi": "^1.0",
89
"glpi-project/tools": "^0.7.5",
910
"php-parallel-lint/php-parallel-lint": "^1.4",
1011
"phpstan/extension-installer": "^1.4",
1112
"phpstan/phpstan": "^2.1",
12-
"phpstan/phpstan-deprecation-rules": "^2.0"
13+
"phpstan/phpstan-deprecation-rules": "^2.0",
14+
"squizlabs/php_codesniffer": "^3.11"
1315
},
1416
"config": {
1517
"optimize-autoloader": true,
1618
"platform": {
17-
"php": "7.4.0"
19+
"php": "8.2.99"
1820
},
1921
"sort-packages": true,
2022
"allow-plugins": {

0 commit comments

Comments
 (0)