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
17 changes: 15 additions & 2 deletions .github/workflows/on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter
extensions: bcmath, ctype, curl, dom, gd, gettext, iconv, imagick, json, ldap, mbstring, mysql, opcache, openssl, pcntl, pdo, posix, redis, soap, sockets, sqlite, tokenizer, xmlwriter, xdebug
ini-values: post_max_size=512M, max_execution_time=360
coverage: xdebug
tools: php-cs-fixer, phpunit:${{ matrix.phpunit-versions }}, composer:v2
Expand All @@ -26,5 +26,18 @@ jobs:
run: |
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config minimum-stability dev
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer config prefer-stable true
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install --dev --no-interaction --no-progress
COMPOSER_ROOT_VERSION=dev-FRAMEWORK_6_0 composer install --no-interaction --no-progress

- name: Run PHPUnit
run: vendor/bin/phpunit --testdox

- name: Run php-cs-fixer
run: vendor/bin/php-cs-fixer check -vvv

- name: Run phpstan (mandatory level)
run: vendor/bin/phpstan --no-progress

- name: Run phpstan (level 9, allowed to fail)
run: vendor/bin/phpstan --no-progress --level=9
continue-on-error: true

2 changes: 2 additions & 0 deletions .horde.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ dependencies:
dev:
composer:
phpunit/phpunit: ^12
friendsofphp/php-cs-fixer: ^3
phpstan/phpstan: ^2
nocommands:
- bin/demo-client.php
17 changes: 12 additions & 5 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<?php
$potentialDirs = ['/lib', '/src', '/tests'];

$finder = (new PhpCsFixer\Finder());

foreach ($potentialDirs as $dir) {
$full = __DIR__ . $dir;
if (is_dir($full)) {
$finder->in($full);
}
}

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
;

return (new PhpCsFixer\Config())
->setRules([
'@PER-CS' => true,
'@PHP82Migration' => true,
'php_unit_test_class_requires_covers' => true,
'@PHP82Migration' => true,
'php_unit_test_class_requires_covers' => true,
])
->setFinder($finder)
;
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
},
"require-dev": {
"horde/injector": "dev-FRAMEWORK_6_0",
"rector/rector": "dev-main",
"phpunit/phpunit": "^12"
"rector/rector": "^2",
"phpunit/phpunit": "^12",
"friendsofphp/php-cs-fixer": "^3",
"phpstan/phpstan": "^2"
}
}
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
level: 5
errorFormat: github
treatPhpDocTypesAsCertain: false
paths:
- src
Expand Down
Loading