Skip to content

Commit 16f07f0

Browse files
LainowRom1-B
andauthored
Feature/glpi 11 0 (#52)
* GLPI 11 Compatibility * Update inc/inventoryaction.class.php Co-authored-by: Romain B. <[email protected]> * Update phpstan.neon Co-authored-by: Romain B. <[email protected]> * beta3 * psalm * beta4 * psalm + rector * release GLPI 11.0 --------- Co-authored-by: Romain B. <[email protected]> Co-authored-by: Rom1-B <[email protected]>
1 parent a0ba9b7 commit 16f07f0

32 files changed

+506
-2582
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"

.twig_cs.dist.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
declare(strict_types=1);
44

5-
use FriendsOfTwig\Twigcs;
5+
use FriendsOfTwig\Twigcs\Finder\TemplateFinder;
6+
use FriendsOfTwig\Twigcs\Config\Config;
7+
use Glpi\Tools\GlpiTwigRuleset;
68

7-
$finder = Twigcs\Finder\TemplateFinder::create()
9+
$finder = TemplateFinder::create()
810
->in(__DIR__ . '/templates')
911
->name('*.html.twig')
1012
->ignoreVCSIgnored(true);
1113

12-
return Twigcs\Config\Config::create()
14+
return Config::create()
1315
->setFinder($finder)
14-
->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class)
16+
->setRuleSet(GlpiTwigRuleset::class)
1517
;

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## [UNRELEASE]
8+
## [1.1.0] - 2025-09-29
9+
10+
### Added
11+
12+
- GLPI 11 compatibility
913

1014
### Fixed
1115

ajax/agent.php

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

31-
use Glpi\Http\Response;
31+
use Glpi\Exception\Http\NotFoundHttpException;
32+
33+
use function Safe\json_encode;
3234

3335
$AJAX_INCLUDE = 1;
34-
include('../../../inc/includes.php');
36+
include(__DIR__ . '/../../../inc/includes.php');
3537
header('Content-Type: application/json; charset=UTF-8');
3638
Html::header_nocache();
3739

@@ -42,9 +44,7 @@
4244
if (isset($_POST['action']) && isset($_POST['id'])) {
4345
$agent = new Agent();
4446
if (!$agent->getFromDB($_POST['id'])) {
45-
Response::sendError(404, 'Unable to load agent #' . $_POST['id']);
46-
47-
return;
47+
throw new NotFoundHttpException();
4848
};
4949
$answer = [];
5050

composer.json

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
{
22
"require": {
3-
"php": ">=7.4"
3+
"php": ">=8.2"
44
},
55
"require-dev": {
6-
"friendsofphp/php-cs-fixer": "^3.86",
7-
"friendsoftwig/twigcs": "^6.1",
8-
"glpi-project/tools": "^0.8.0",
9-
"php-parallel-lint/php-parallel-lint": "^1.4",
10-
"phpstan/extension-installer": "^1.4",
11-
"phpstan/phpstan": "^2.1",
12-
"phpstan/phpstan-deprecation-rules": "^2.0"
6+
"glpi-project/tools": "^0.8"
137
},
148
"config": {
159
"optimize-autoloader": true,
1610
"platform": {
17-
"php": "7.4.99"
11+
"php": "8.2.99"
1812
},
19-
"sort-packages": true,
20-
"allow-plugins": {
21-
"phpstan/extension-installer": true
22-
}
13+
"sort-packages": true
2314
},
2415
"autoload-dev": {
2516
"psr-4": {

0 commit comments

Comments
 (0)