This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pluswerk/feature/11
- Loading branch information
Showing
12 changed files
with
144 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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,28 @@ | ||
name: Tasks | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint-php: | ||
name: "php: ${{ matrix.php }} TYPO3: ${{ matrix.typo3 }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '8.2' ] | ||
typo3: [ '11', '12' ] | ||
steps: | ||
- name: Setup PHP with PECL extension | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ matrix.php }}-composer- | ||
- run: composer require typo3/minimal="^${{ matrix.typo3 }}" --dev --ignore-platform-req=php+ | ||
- run: composer install --no-interaction --no-progress --ignore-platform-req=php+ | ||
- run: ./vendor/bin/grumphp run --ansi |
This file contains 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 |
---|---|---|
@@ -1 +1,5 @@ | ||
.idea/ | ||
composer.lock | ||
public/ | ||
vendor/ | ||
var/ |
This file contains 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 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 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
File renamed without changes
This file contains 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 |
---|---|---|
@@ -1,19 +1,42 @@ | ||
{ | ||
"name": "pluswerk/html_to_pdf", | ||
"type": "typo3-cms-extension", | ||
"description": "Pluswerk: HTML to PDF", | ||
"homepage": "https://www.pluswerk.ag", | ||
"license": "GPL-2.0-or-later", | ||
"type": "typo3-cms-extension", | ||
"homepage": "https://www.pluswerk.ag", | ||
"support": { | ||
"source": "https://www.pluswerk.ag" | ||
}, | ||
"require": { | ||
"php": "~8.2.0", | ||
"composer-runtime-api": "^2.2.2", | ||
"mpdf/mpdf": "^8.0", | ||
"typo3/cms-core": "^11.5.0 || ^12.4.0", | ||
"typo3/cms-frontend": "^11.5.0 || ^12.4.0" | ||
}, | ||
"require-dev": { | ||
"pluswerk/grumphp-config": "^6.7", | ||
"saschaegerer/phpstan-typo3": "^1.8.2", | ||
"ssch/typo3-rector": "^1.1.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Pluswerk\\HtmlToPdf\\": "Classes/" | ||
} | ||
}, | ||
"require": { | ||
"typo3/cms-core": ">=9.5", | ||
"mpdf/mpdf": "^8.0" | ||
"config": { | ||
"allow-plugins": { | ||
"typo3/class-alias-loader": true, | ||
"typo3/cms-composer-installers": true, | ||
"phpro/grumphp": true, | ||
"phpstan/extension-installer": true, | ||
"ergebnis/composer-normalize": true, | ||
"pluswerk/grumphp-config": true | ||
} | ||
}, | ||
"extra": { | ||
"typo3/cms": { | ||
"extension-key": "html_to_pdf" | ||
} | ||
} | ||
} |
This file contains 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 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,16 @@ | ||
imports: | ||
- { resource: vendor/pluswerk/grumphp-config/grumphp.yml } | ||
parameters: | ||
convention.process_timeout: 240 | ||
convention.security_checker_blocking: true | ||
convention.jsonlint_ignore_pattern: { } | ||
convention.xmllint_ignore_pattern: { } | ||
convention.yamllint_ignore_pattern: { } | ||
convention.phpcslint_ignore_pattern: { } | ||
convention.phpcslint_exclude: { } | ||
convention.xlifflint_ignore_pattern: { } | ||
convention.rector_ignore_pattern: { } | ||
convention.rector_enabled: true | ||
convention.rector_config: rector.php | ||
convention.rector_clear-cache: false | ||
convention.phpstan_level: null |
This file contains 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,2 @@ | ||
parameters: | ||
ignoreErrors: [] |
This file contains 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,7 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
- vendor/andersundsehr/phpstan-git-files/extension.php | ||
|
||
parameters: | ||
level: 8 | ||
reportUnmatchedIgnoredErrors: false |
This file contains 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,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\DeadCode\Rector\MethodCall\RemoveEmptyMethodCallRector; | ||
use PLUS\GrumPHPConfig\RectorSettings; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Caching\ValueObject\Storage\FileCacheStorage; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->parallel(); | ||
$rectorConfig->importNames(); | ||
$rectorConfig->importShortClasses(); | ||
$rectorConfig->cacheClass(FileCacheStorage::class); | ||
$rectorConfig->cacheDirectory('./var/cache/rector'); | ||
|
||
$rectorConfig->paths( | ||
array_filter(explode("\n", (string)shell_exec("git ls-files | xargs ls -d 2>/dev/null | grep -E '\.(php|html|typoscript)$'"))) | ||
); | ||
|
||
// define sets of rules | ||
$rectorConfig->sets( | ||
[ | ||
...RectorSettings::sets(true), | ||
...RectorSettings::setsTypo3(false), | ||
] | ||
); | ||
|
||
// remove some rules | ||
// ignore some files | ||
$rectorConfig->skip( | ||
[ | ||
...RectorSettings::skip(), | ||
...RectorSettings::skipTypo3(), | ||
RemoveEmptyMethodCallRector::class, // this with Mpdf takes for ever :/ | ||
/** | ||
* rector should not touch these files | ||
*/ | ||
//__DIR__ . '/src/Example', | ||
//__DIR__ . '/src/Example.php', | ||
] | ||
); | ||
}; |