diff --git a/.twig_cs.dist.php b/.twig_cs.dist.php new file mode 100644 index 0000000..352fe0a --- /dev/null +++ b/.twig_cs.dist.php @@ -0,0 +1,15 @@ +in(__DIR__ . '/templates') + ->name('*.html.twig') + ->ignoreVCSIgnored(true); + +return Twigcs\Config\Config::create() + ->setFinder($finder) + ->setRuleSet(\Glpi\Tools\GlpiTwigRuleset::class) +; diff --git a/composer.json b/composer.json index 305c824..abb3b8e 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.73", + "friendsoftwig/twigcs": "^6.1", "glpi-project/tools": "^0.7.4", "php-parallel-lint/php-parallel-lint": "^1.4", "phpstan/extension-installer": "^1.4", @@ -21,5 +22,10 @@ "allow-plugins": { "phpstan/extension-installer": true } + }, + "autoload-dev": { + "psr-4": { + "Glpi\\Tools\\": "../../tools/src/" + } } } diff --git a/composer.lock b/composer.lock index 2ddd4ce..2df0c14 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "99a69b03ea27d0c309ebe6770cd4c902", + "content-hash": "8fd215cf6d5e2da742e395d9b0ebd8be", "packages": [ { "name": "symfony/deprecation-contracts", @@ -229,16 +229,16 @@ }, { "name": "tecnickcom/tcpdf", - "version": "6.8.2", + "version": "6.9.1", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "f7a781073e1645062f163e058139e2f89355d420" + "reference": "ed27e28a4c478f7f4015b5e7e7b1912af9e85f2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/f7a781073e1645062f163e058139e2f89355d420", - "reference": "f7a781073e1645062f163e058139e2f89355d420", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/ed27e28a4c478f7f4015b5e7e7b1912af9e85f2b", + "reference": "ed27e28a4c478f7f4015b5e7e7b1912af9e85f2b", "shasum": "" }, "require": { @@ -251,8 +251,6 @@ "config", "include", "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", "tcpdf_barcodes_1d.php", "tcpdf_barcodes_2d.php", "include/tcpdf_colors.php", @@ -290,7 +288,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.8.2" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.9.1" }, "funding": [ { @@ -298,7 +296,7 @@ "type": "custom" } ], - "time": "2025-01-26T14:03:12+00:00" + "time": "2025-04-03T06:38:07+00:00" } ], "packages-dev": [ @@ -702,16 +700,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.73.1", + "version": "v3.75.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "ffcb8200a42045e65049af7910cfd022f631b064" + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/ffcb8200a42045e65049af7910cfd022f631b064", - "reference": "ffcb8200a42045e65049af7910cfd022f631b064", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", + "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", "shasum": "" }, "require": { @@ -794,7 +792,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.73.1" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" }, "funding": [ { @@ -802,7 +800,62 @@ "type": "github" } ], - "time": "2025-03-19T23:42:16+00:00" + "time": "2025-03-31T18:40:42+00:00" + }, + { + "name": "friendsoftwig/twigcs", + "version": "v6.1.0", + "source": { + "type": "git", + "url": "https://github.com/friendsoftwig/twigcs.git", + "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/friendsoftwig/twigcs/zipball/3c36d606c4f19db0dd2a01b735ec7a8151b7f182", + "reference": "3c36d606c4f19db0dd2a01b735ec7a8151b7f182", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-hash": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "symfony/console": "^4.4 || ^5.3 || ^6.0", + "symfony/filesystem": "^4.4 || ^5.3 || ^6.0", + "symfony/finder": "^4.4 || ^5.3 || ^6.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.5.20", + "symfony/phpunit-bridge": "^6.2.3" + }, + "bin": [ + "bin/twigcs" + ], + "type": "library", + "autoload": { + "psr-4": { + "FriendsOfTwig\\Twigcs\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tristan Maindron", + "email": "tmaindron@gmail.com" + } + ], + "description": "Checkstyle automation for Twig", + "support": { + "issues": "https://github.com/friendsoftwig/twigcs/issues", + "source": "https://github.com/friendsoftwig/twigcs/tree/v6.1.0" + }, + "time": "2023-01-04T16:01:24+00:00" }, { "name": "glpi-project/tools", @@ -971,16 +1024,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.10", + "version": "2.1.11", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f" + "reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f", - "reference": "051a3b6b9b80df4ba3a7f801a8b53ad7d8f1c15f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/8ca5f79a8f63c49b2359065832a654e1ec70ac30", + "reference": "8ca5f79a8f63c49b2359065832a654e1ec70ac30", "shasum": "" }, "require": { @@ -1025,7 +1078,7 @@ "type": "github" } ], - "time": "2025-03-23T14:57:55+00:00" + "time": "2025-03-24T13:45:00+00:00" }, { "name": "phpstan/phpstan-deprecation-rules",