-
Notifications
You must be signed in to change notification settings - Fork 21
Fix multiple small issues #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
AdrienClairembault
wants to merge
55
commits into
pluginsGLPI:feature/glpi-11.0
from
AdrienClairembault:fix-misc
Closed
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
6932d60
Feature GLP11
stonebuzz 17b17ae
Use same PHP requirements as GLPI 11.0
AdrienClairembault 057adef
Fix spelling mistakes and punctuation inconsistencies
AdrienClairembault 81e7612
Fix incorrect license
AdrienClairembault 4790cd9
Add global modified to sed command when replacing $LNAME
AdrienClairembault cc49ec5
Rename master to main
AdrienClairembault 8a265bd
Fix headers
AdrienClairembault f06ea48
Remove punctuation for short description
AdrienClairembault e3a3707
Add trailling comas to comply with our default phpcsfixer configuration
AdrienClairembault 20e86c2
Fix another typo
AdrienClairembault 99e5548
Add typehints
AdrienClairembault 8f68e77
Add makefile
AdrienClairembault b1ab662
Unignore compose.lock
AdrienClairembault 82884d5
Update glpi-project/tools
AdrienClairembault 2a0e8ad
Add cy integration
AdrienClairembault 40322de
Add src folder
AdrienClairembault ec213bc
Add phpunit
AdrienClairembault f52639f
Add PHPStan
AdrienClairembault ddd0bfd
Add PHP-CS-Fixer
AdrienClairembault 4716717
Add psalm
AdrienClairembault 5fde1f6
Apply PHPStan
AdrienClairembault 6584ae0
Add rector
AdrienClairembault 2474616
Fix missing file in sed command
AdrienClairembault b3affb7
Use core dependencies
AdrienClairembault 83fee41
Fix phpstan ignore on wrong line
AdrienClairembault 69aef8b
Use ignoreVCSIgnored
AdrienClairembault f6f4042
Simplify makefile
AdrienClairembault 7eba56a
Update phpstan configuration following latest main changes
AdrienClairembault 503ad92
Remove useless exclusions
AdrienClairembault 64088b9
Keep .git exclusion
AdrienClairembault f3960e6
Rector tweaks
AdrienClairembault 41aa052
Remove git exclusion
AdrienClairembault 76d2d44
Use PER3
AdrienClairembault af3274c
Set glpi-project to ^0.7
AdrienClairembault 53bbe9b
Remove composer.lock
AdrienClairembault 593a3db
Ignore lock file
AdrienClairembault 9200c03
Fix phpunit.xml indentation
AdrienClairembault 88661bb
Remove specific value for processIsolation that is already used by
AdrienClairembault c5c0fc2
Add g flag for sed
AdrienClairembault aede47b
Fix screenshots links
AdrienClairembault 422f750
Update phpdoc
AdrienClairembault ce862fc
Use absolute path
AdrienClairembault 3379600
Remove rector
AdrienClairembault ffaecb6
Simplify bootstrap
AdrienClairembault 30e5d7e
fixup! Simplify bootstrap
AdrienClairembault 88cd0b8
an attempt to run CI
cedric-anne d360119
force CI
cedric-anne d62a0c4
fix script
cedric-anne 411b2aa
fix script
cedric-anne 0d261e0
fix script
cedric-anne 5da5248
fix script
cedric-anne 1509567
excludes from rsync
cedric-anne 2b3e569
do not change dir in tests
cedric-anne a9f39e1
excludes from rsync
cedric-anne c35a94c
revert force CI
cedric-anne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: "Continuous integration" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| tags: | ||
| - "*" | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| generate-ci-matrix: | ||
| name: "Generate CI matrix" | ||
| uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" | ||
| with: | ||
| glpi-version: "11.0.x" | ||
| ci: | ||
| name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" | ||
| needs: "generate-ci-matrix" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }} | ||
| uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1" | ||
| with: | ||
| plugin-key: "empty" | ||
| glpi-version: "${{ matrix.glpi-version }}" | ||
| php-version: "${{ matrix.php-version }}" | ||
| db-image: "${{ matrix.db-image }}" | ||
| init-script: "./.github/workflows/create-plugin.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: "Continuous integration" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| tags: | ||
| - "*" | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| generate-ci-matrix: | ||
| name: "Generate CI matrix" | ||
| uses: "glpi-project/plugin-ci-workflows/.github/workflows/generate-ci-matrix.yml@v1" | ||
| with: | ||
| glpi-version: "11.0.x" | ||
| ci: | ||
| name: "GLPI ${{ matrix.glpi-version }} - php:${{ matrix.php-version }} - ${{ matrix.db-image }}" | ||
| needs: "generate-ci-matrix" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }} | ||
| uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1" | ||
| with: | ||
| plugin-key: "{LNAME}" | ||
| glpi-version: "${{ matrix.glpi-version }}" | ||
| php-version: "${{ matrix.php-version }}" | ||
| db-image: "${{ matrix.db-image }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/bin/bash | ||
| # | ||
| # ------------------------------------------------------------------------- | ||
| # {NAME} plugin for GLPI | ||
| # Copyright (C) {YEAR} by the {NAME} Development Team. | ||
| # ------------------------------------------------------------------------- | ||
| # | ||
| # MIT License | ||
| # | ||
| # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| # of this software and associated documentation files (the "Software"), to deal | ||
| # in the Software without restriction, including without limitation the rights | ||
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| # copies of the Software, and to permit persons to whom the Software is | ||
| # furnished to do so, subject to the following conditions: | ||
| # | ||
| # The above copyright notice and this permission notice shall be included in all | ||
| # copies or substantial portions of the Software. | ||
| # | ||
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| # SOFTWARE. | ||
| # | ||
| # -------------------------------------------------------------------------- | ||
| # | ||
|
|
||
| set -e -u -o pipefail | ||
|
|
||
| # `rsync` is required by the `plugin.sh` script | ||
| sudo apt update | ||
| sudo apt install --assume-yes --no-install-recommends --quiet rsync | ||
|
|
||
| # move self to `template` then create an `empty` plugin` | ||
| (cd .. && mv empty template && cd template && ./plugin.sh empty "1.0.0") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,6 @@ dist/ | |
| node_modules/ | ||
| vendor/ | ||
| .gh_token | ||
| composer.lock | ||
| *.min.* | ||
|
|
||
| var | ||
| composer.lock | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * ------------------------------------------------------------------------- | ||
| * {NAME} plugin for GLPI | ||
| * ------------------------------------------------------------------------- | ||
| * | ||
| * MIT License | ||
| * | ||
| * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| * of this software and associated documentation files (the "Software"), to deal | ||
| * in the Software without restriction, including without limitation the rights | ||
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| * copies of the Software, and to permit persons to whom the Software is | ||
| * furnished to do so, subject to the following conditions: | ||
| * | ||
| * The above copyright notice and this permission notice shall be included in all | ||
| * copies or substantial portions of the Software. | ||
| * | ||
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| * SOFTWARE. | ||
| * ------------------------------------------------------------------------- | ||
| * @copyright Copyright (C) {YEAR} by the {NAME} plugin team. | ||
| * @license MIT https://opensource.org/licenses/mit-license.php | ||
| * @link https://github.com/pluginsGLPI/{LNAME} | ||
| * ------------------------------------------------------------------------- | ||
| */ | ||
|
|
||
| use PhpCsFixer\Config; | ||
| use PhpCsFixer\Finder; | ||
|
|
||
| $finder = Finder::create() | ||
| ->in(__DIR__) | ||
| ->ignoreVCSIgnored(true) | ||
| ->name('*.php'); | ||
|
|
||
| $config = new Config(); | ||
|
|
||
| $rules = [ | ||
| '@PER-CS' => true, // Latest PER rules. | ||
| ]; | ||
|
|
||
| return $config | ||
| ->setRules($rules) | ||
| ->setFinder($finder) | ||
| ->setCacheFile(__DIR__ . '/var/php-cs-fixer/.php-cs-fixer.cache') | ||
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../../PluginsMakefile.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| includes: | ||
| - ../../vendor/glpi-project/phpstan-glpi/extension.neon | ||
| - ../../vendor/phpstan/phpstan-deprecation-rules/rules.neon | ||
| - ../../vendor/thecodingmachine/phpstan-safe-rule/phpstan-safe-rule.neon | ||
|
|
||
| parameters: | ||
| level: max | ||
| paths: | ||
| - src | ||
| - hook.php | ||
| - setup.php | ||
| scanDirectories: | ||
| - ../../src | ||
| bootstrapFiles: | ||
| - ../../stubs/glpi_constants.php | ||
| - ../../vendor/autoload.php | ||
| treatPhpDocTypesAsCertain: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <phpunit | ||
| bootstrap="tests/bootstrap.php" | ||
| colors="true" | ||
| cacheDirectory="var/phpunit" | ||
| > | ||
| <testsuites> | ||
| <testsuite name="Tests"> | ||
| <directory suffix="Test.php">tests</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <php> | ||
| <ini name="memory_limit" value="2G"/> | ||
| </php> | ||
| </phpunit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| runTaintAnalysis="true" | ||
| > | ||
| <projectFiles> | ||
| <directory name="src"/> | ||
| <file name="hook.php"/> | ||
| <file name="setup.php"/> | ||
| </projectFiles> | ||
| </psalm> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.