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
9 changes: 7 additions & 2 deletions .github/workflows/grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest]
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.3', '8.4', '8.5']
composer-deps: ['highest', 'lowest']
composer-versions: ['composer:v2']
fail-fast: false
Expand All @@ -30,19 +30,24 @@ jobs:
php -m
composer --version
- name: Set env vars for latest PHP version
if: matrix.php-versions == '8.4'
if: matrix.php-versions == '8.5'
run: |
export COMPOSER_IGNORE_PLATFORM_REQ=php+
- name: Install dependencies (highest)
if: matrix.composer-deps == 'highest'
run: composer update --prefer-dist --no-progress --no-suggest
env:
COMPOSER_IGNORE_PLATFORM_REQ: php+
- name: Install dependencies (lowest)
if: matrix.composer-deps == 'lowest'
run: composer update --prefer-dist --no-progress --no-suggest --prefer-lowest
env:
COMPOSER_IGNORE_PLATFORM_REQ: php+
- name: Set git variables
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global protocol.file.allow always
- name: Run the tests
run: php vendor/bin/grumphp run --no-interaction
continue-on-error: ${{ matrix.php-versions == '8.5' }}
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
"require-dev": {
"guzzlehttp/psr7": "^2.7",
"psr/http-message": "^2.0",
"vimeo/psalm": "^5.26",
"php-cs-fixer/shim": "^3.64",
"phpunit/phpunit": "^10.5.36",
"phpro/grumphp-shim": "^2.8"
"vimeo/psalm": "^6.13",
"php-cs-fixer/shim": "^3.88",
"phpunit/phpunit": "^12.4",
"phpro/grumphp-shim": "^2.17",
"webmozart/assert": "^1.12"
},
"license": "MIT",
"autoload": {
Expand All @@ -30,7 +31,7 @@
}
],
"require": {
"php": "^8.1"
"php": "~8.3.0 || ~8.4.0 || ~8.5.0"
},
"config": {
"allow-plugins": {
Expand Down
3 changes: 2 additions & 1 deletion grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
grumphp:
tasks:
phpunit: ~
phpunit:
coverage-xml: clover-coverage.xml
psalm: ~
phpcsfixer:
config: .php-cs-fixer.php
Expand Down
11 changes: 6 additions & 5 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
requireCoverageMetadata="true"
beStrictAboutCoverageMetadata="false"
beStrictAboutOutputDuringTests="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnPhpunitDeprecations="true"
failOnPhpunitDeprecation="true"
failOnPhpunitWarning="true"
failOnRisky="true"
failOnWarning="true">
failOnWarning="true"
>
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
<source restrictNotices="true" restrictWarnings="true" ignoreIndirectDeprecations="true">
<include>
<directory>src</directory>
</include>
</source>

<coverage includeUncoveredFiles="true">
<report>
<clover outputFile="clover-coverage.xml"/>
Expand Down
4 changes: 3 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0"?>
<psalm
errorLevel="1"
phpVersion="8.1"
phpVersion="8.3"
resolveFromConfigFile="true"
checkForThrowsDocblock="true"
findUnusedPsalmSuppress="true"
findUnusedCode="false"
ensureOverrideAttribute="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config ../vendor/vimeo/psalm/config.xsd"
Expand Down
4 changes: 0 additions & 4 deletions tests/static-analysis/resource-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
use Phpro\ResourceStream\ResourceStream;

/**
* @psalm-suppress UnusedParam
*
* @param ResourceStream<closed-resource> $stream
*/
function assertClosed(ResourceStream $stream): void
{
}

/**
* @psalm-suppress UnusedParam
*
* @param ResourceStream<resource> $stream
*/
function assertOpened(ResourceStream $stream): void
Expand Down
Loading