Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 0 additions & 54 deletions .changelog

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- "main"
- "develop"
- "support/*"
- "feature/code_quality_rector"
tags:
- "*"
pull_request:
Expand Down
64 changes: 64 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?php

use PhpCsFixer\Finder;
use PhpCsFixer\Config;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

/**
* -------------------------------------------------------------------------
* Carbon plugin for GLPI
*
* @copyright Copyright (C) 2024-2025 Teclib' and contributors.
* @license https://www.gnu.org/licenses/gpl-3.0.txt GPLv3+
* @link https://github.com/pluginsGLPI/carbon
*
* -------------------------------------------------------------------------
*
* LICENSE
*
* This file is part of Carbon plugin for GLPI.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* -------------------------------------------------------------------------
*/

$finder = (new Finder())
->in(__DIR__)
->exclude([
'.git/',
'node_modules/',
'tests/config/',
'tests/files/',
'vendor/',
])
;

return (new Config())
->setUnsupportedPhpVersionAllowed(true) // allow upcoming PHP versions
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile('files/_cache/php-cs-fixer/php-cs-fixer.cache')
->setRules([
'@PER-CS3.0' => true,
'@PHP84Migration' => true,
'fully_qualified_strict_types' => ['import_symbols' => true],
'ordered_imports' => ['imports_order' => ['class', 'const', 'function']],
'no_unused_imports' => true,
'heredoc_indentation' => false, // This rule is mandatory due to a bug in `xgettext`, see https://savannah.gnu.org/bugs/?func=detailitem&item_id=62158
'new_expression_parentheses' => false, // breaks compatibility with PHP < 8.4
'phpdoc_scalar' => true, // Normalize scalar types identifiers in PHPDoc
'phpdoc_types' => true, // Fixes types case in PHPDoc
])
->setFinder($finder)
;
20 changes: 0 additions & 20 deletions .phpcs.xml

This file was deleted.

10 changes: 6 additions & 4 deletions .twig_cs.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

declare(strict_types=1);

use FriendsOfTwig\Twigcs;
use FriendsOfTwig\Twigcs\Finder\TemplateFinder;
use FriendsOfTwig\Twigcs\Config\Config;
use Glpi\Tools\GlpiTwigRuleset;

$finder = Twigcs\Finder\TemplateFinder::create()
$finder = TemplateFinder::create()
->in(__DIR__ . '/templates')
->depth('>= 0')
->name('*.html.twig')
->ignoreVCSIgnored(true);

return Twigcs\Config\Config::create()
return Config::create()
->setFinder($finder)
->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class)
->setRuleSet(GlpiTwigRuleset::class)
;
4 changes: 2 additions & 2 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[main]
host = https://www.transifex.com

[o:teclib:p:glpi-plugin-carbon:r:1_0_0]
[o:teclib:p:glpi-plugin-carbon:r:1_2_0]
file_filter = locales/<lang>.po
source_file = locales/carbon.pot
type = PO
minimum_perc = 1
resource_name = 1.0.0
resource_name = 1.2.0
Loading