Skip to content

Commit e26cbc5

Browse files
stonebuzzRom1-B
andauthored
Feature/glpi 11.0 (#22)
* first commit * sanitizer * rector * remove uselss var folder * update gitignore * cs fixer * use public/ folder * remove includes * global * doQuery * get_plugin_web_dir twig template * CFG_GLPI.root_doc * exit -> return * NotFoundException * fix twig cs * start phpstan fix * adapt changelog * clean * remove useless specific CI (with glpi 10) * fix header * fix CS * fix phpunit * fix phpunit * add missing use statement * psaml : add missing front folder * phpstan * fix CS * fix * fix tab icon and url * fix CS * start fix phpunit * fix phphunit * fix * fix phpunit * fix CS * fix * update header * fix header * eslint * fix * fix visibility states condition * fix CS * Fix CI * beta1 * fix unsinged key * clean --------- Co-authored-by: Rom1-B <rom1.biot@gmail.com>
1 parent bd02f05 commit e26cbc5

82 files changed

Lines changed: 1876 additions & 5252 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/auto-tag-new-version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- "main"
7+
- "**/bugfixes"
78
paths:
89
- "setup.php"
910

.github/workflows/ci.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.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"

.github/workflows/release.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,13 @@
1-
name: "Plugin release"
1+
name: "Publish release"
22

33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- '*'
77

88
jobs:
9-
create-release:
10-
name: "Create release"
11-
runs-on: "ubuntu-latest"
9+
publish-release:
1210
permissions:
1311
contents: "write"
14-
steps:
15-
- name: "Extract tag name"
16-
run: |
17-
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
18-
- name: "Checkout"
19-
uses: "actions/checkout@v3"
20-
- name: "Build package"
21-
id: "build-package"
22-
uses: "cconard96/tools/github-actions/build-package@debug/master"
23-
with:
24-
plugin-version: ${{ env.tag_name }}
25-
- name: "Create release"
26-
id: "create-release"
27-
uses: "actions/create-release@v1"
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
with:
31-
tag_name: ${{ env.tag_name }}
32-
release_name: ${{ env.tag_name }}
33-
draft: true
34-
- name: "Attach package to release"
35-
uses: "actions/upload-release-asset@v1"
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
with:
39-
upload_url: ${{ steps.create-release.outputs.upload_url }}
40-
asset_path: ${{ steps.build-package.outputs.package-path }}
41-
asset_name: ${{ steps.build-package.outputs.package-basename }}
42-
asset_content_type: " application/x-bzip2"
12+
name: "Publish release"
13+
uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor
22
.phpunit.result.cache
3+
var/

.ignore-release

Whitespace-only changes.

.php-cs-fixer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
$config = new Config();
1212

1313
$rules = [
14-
'@PER-CS2.0' => true,
15-
'trailing_comma_in_multiline' => ['elements' => ['arguments', 'array_destructuring', 'arrays']], // For PHP 7.4 compatibility
14+
'@PER-CS' => true, // Latest PER rules.
1615
];
1716

1817
return $config
1918
->setRules($rules)
2019
->setFinder($finder)
21-
->setUsingCache(false);
20+
->setCacheFile(__DIR__ . '/var/php-cs-fixer/.php-cs-fixer.cache')
21+
;

.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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [UNRELEASED]
44

5+
- GLPI 11 compatibility
6+
57
### Fixes
68

79
- SQL error when merging the Jamf device linked to a GLPI asset

RoboFile.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)