Skip to content

Commit 9feb119

Browse files
committed
php 8.3
1 parent 55cbb6d commit 9feb119

File tree

6 files changed

+51
-60
lines changed

6 files changed

+51
-60
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@ on:
66
- cron: '0 0 * * *'
77

88
jobs:
9-
php80:
10-
name: PHP 8.0
11-
runs-on: ubuntu-20.04
9+
php81:
10+
name: PHP 8.1
11+
runs-on: ubuntu-22.04
1212
steps:
1313
- name: checkout
1414
uses: actions/checkout@v3
1515
- name: composer test
16-
uses: docker://chubbyphp/ci-php80:latest
16+
uses: docker://chubbyphp/ci-php81:latest
1717
env:
1818
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
20-
php81:
21-
name: PHP 8.1
22-
runs-on: ubuntu-20.04
20+
php82:
21+
name: PHP 8.2
22+
runs-on: ubuntu-22.04
2323
steps:
2424
- name: checkout
2525
uses: actions/checkout@v3
2626
- name: composer test
27-
uses: docker://chubbyphp/ci-php81:latest
27+
uses: docker://chubbyphp/ci-php82:latest
2828
env:
2929
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
31-
php82:
32-
name: PHP 8.2
33-
runs-on: ubuntu-20.04
31+
php83:
32+
name: PHP 8.3
33+
runs-on: ubuntu-22.04
3434
steps:
3535
- name: checkout
3636
uses: actions/checkout@v3
3737
- name: composer test
38-
uses: docker://chubbyphp/ci-php82:latest
38+
uses: docker://chubbyphp/ci-php83:latest
3939
env:
4040
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4141
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.DS_Store
22
.idea/
3+
.phpunit.cache
34
.vscode/
45
build/
56
composer.lock
67
vendor/
7-
.phpunit.result.cache

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/chubbyphp/chubbyphp-static-file/workflows/CI/badge.svg?branch=master)](https://github.com/chubbyphp/chubbyphp-static-file/actions?query=workflow%3ACI)
44
[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-static-file/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-static-file?branch=master)
5-
[![Infection MSI](https://badge.stryker-mutator.io/github.com/chubbyphp/chubbyphp-static-file/master)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-static-file/master)
5+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyphp%2Fchubbyphp-static-file%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-static-file/master)[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)
66
[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/v/stable.png)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)
77
[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/downloads.png)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)
88
[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-static-file/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-static-file)
@@ -26,18 +26,18 @@ A minimal static file middleware for PSR 15.
2626

2727
## Requirements
2828

29-
* php: ^8.0
30-
* [psr/http-factory][2]: ^1.0.1
31-
* [psr/http-message][3]: ^1.0.1
32-
* [psr/http-server-handler][4]: ^1.0.1
33-
* [psr/http-server-middleware][5]: ^1.0.1
29+
* php: ^8.1
30+
* [psr/http-factory][2]: ^1.0.2
31+
* [psr/http-message][3]: ^1.1|^2.0
32+
* [psr/http-server-handler][4]: ^1.0.2
33+
* [psr/http-server-middleware][5]: ^1.0.2
3434

3535
## Installation
3636

3737
Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-static-file][1].
3838

3939
```sh
40-
composer require chubbyphp/chubbyphp-static-file "^1.2"
40+
composer require chubbyphp/chubbyphp-static-file "^1.3"
4141
```
4242

4343
## Usage

composer.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,20 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^8.0",
18-
"psr/http-factory": "^1.0.1",
19-
"psr/http-message": "^1.0.1",
20-
"psr/http-server-handler": "^1.0.1",
21-
"psr/http-server-middleware": "^1.0.1"
17+
"php": "^8.1",
18+
"psr/http-factory": "^1.0.2",
19+
"psr/http-message": "^1.1|^2.0",
20+
"psr/http-server-handler": "^1.0.2",
21+
"psr/http-server-middleware": "^1.0.2"
2222
},
2323
"require-dev": {
2424
"chubbyphp/chubbyphp-dev-helper": "dev-master",
2525
"chubbyphp/chubbyphp-mock": "^1.6.1",
26-
"infection/infection": "^0.26.5",
27-
"php-coveralls/php-coveralls": "^2.5.2",
28-
"phploc/phploc": "^7.0.2",
29-
"phpstan/extension-installer": "^1.1",
30-
"phpstan/phpstan": "^1.4.8",
31-
"phpunit/phpunit": "^9.5.17"
26+
"infection/infection": "^0.27.8",
27+
"php-coveralls/php-coveralls": "^2.7.0",
28+
"phpstan/extension-installer": "^1.3.1",
29+
"phpstan/phpstan": "^1.10.45",
30+
"phpunit/phpunit": "^10.4.2"
3231
},
3332
"autoload": {
3433
"psr-4": { "Chubbyphp\\StaticFile\\": "src/" }
@@ -45,7 +44,7 @@
4544
},
4645
"extra": {
4746
"branch-alias": {
48-
"dev-master": "1.2-dev"
47+
"dev-master": "1.3-dev"
4948
}
5049
},
5150
"scripts": {
@@ -56,14 +55,12 @@
5655
"@test:integration",
5756
"@test:infection",
5857
"@test:static-analysis",
59-
"@test:loc",
6058
"@test:cs"
6159
],
6260
"test:cs": "mkdir -p build && PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --cache-file=build/phpcs.cache",
63-
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=88 --verbose --coverage=build/phpunit",
61+
"test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=90 --verbose --coverage=build/phpunit",
6462
"test:integration": "vendor/bin/phpunit --testsuite=Integration --cache-result-file=build/phpunit/result.cache",
6563
"test:lint": "mkdir -p build && find src tests -name '*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l | tee build/phplint.log",
66-
"test:loc": "mkdir -p build && vendor/bin/phploc src | tee build/phploc.log",
6764
"test:static-analysis": "mkdir -p build && bash -c 'vendor/bin/phpstan analyse src --no-progress --level=8 --error-format=junit | tee build/phpstan.junit.xml; if [ ${PIPESTATUS[0]} -ne \"0\" ]; then exit 1; fi'",
6865
"test:unit": "vendor/bin/phpunit --testsuite=Unit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-result-file=build/phpunit/result.cache"
6966
}

phpunit.xml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
executionOrder="random"
10-
processIsolation="false"
11-
stopOnFailure="false"
12-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
13-
<coverage>
14-
<include>
15-
<directory>./src</directory>
16-
</include>
17-
</coverage>
18-
<testsuites>
19-
<testsuite name="Integration">
20-
<directory>./tests/Integration</directory>
21-
</testsuite>
22-
<testsuite name="Unit">
23-
<directory>./tests/Unit</directory>
24-
</testsuite>
25-
</testsuites>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" colors="true" executionOrder="random" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<coverage/>
4+
<testsuites>
5+
<testsuite name="Integration">
6+
<directory>./tests/Integration</directory>
7+
</testsuite>
8+
<testsuite name="Unit">
9+
<directory>./tests/Unit</directory>
10+
</testsuite>
11+
</testsuites>
12+
<source>
13+
<include>
14+
<directory>./src</directory>
15+
</include>
16+
<exclude>
17+
<file>./src/mimetypes.php</file>
18+
</exclude>
19+
</source>
2620
</phpunit>

tests/Unit/StaticFileMiddlewareTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ public function testBaseDirectory(): void
263263
self::assertSame($response, $middleware->process($request, $handler));
264264
}
265265

266-
public function provideFiles(): array
266+
public function provideFiles(): iterable
267267
{
268268
return [
269269
[

0 commit comments

Comments
 (0)