Skip to content

Commit 5adfd1e

Browse files
committed
v2.4 wip
1 parent c621bb3 commit 5adfd1e

File tree

12 files changed

+84
-47
lines changed

12 files changed

+84
-47
lines changed

.gitattributes

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
.gitattributes export-ignore
2-
.github export-ignore
3-
.gitignore export-ignore
4-
docs export-ignore
5-
Makefile export-ignore
6-
phpcs.xml export-ignore
7-
phpstan.neon export-ignore
8-
phpunit.xml export-ignore
9-
README.md export-ignore
10-
tests export-ignore
1+
.gitattributes export-ignore
2+
.github/ export-ignore
3+
.gitignore export-ignore
4+
docs/ export-ignore
5+
examples/ export-ignore
6+
Makefile export-ignore
7+
phpcs.xml export-ignore
8+
phpstan.neon export-ignore
9+
phpunit.xml export-ignore
10+
README.md export-ignore
11+
tests/ export-ignore

.github/workflows/acceptance.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,8 @@ jobs:
8585
restore-keys: ${{ runner.os }}-composer-
8686
- name: Install dependencies
8787
run: composer install --prefer-dist
88-
- name: Code coverage build
89-
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover build/logs/clover.xml
90-
- name: Code coverage upload
91-
env:
92-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93-
run: vendor/bin/php-coveralls -v
88+
- name: Code coverage
89+
run: vendor/bin/phpunit --coverage-clover coverage/clover.xml -d --min-coverage=100
9490

9591
stan:
9692
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.DS_Store
22
.phpunit.result.cache
3+
build/
34
composer.lock
45
composer.phar
56
coverage/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Sören Jensen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ cs: composer.lock
1414
stan: composer.lock
1515
./vendor/bin/phpstan analyse --memory-limit 256M
1616

17-
coverage: composer.lock build
18-
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
19-
./vendor/bin/php-coveralls -v
20-
21-
coverage-summary: composer.lock
22-
XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html=coverage
17+
coverage: composer.lock
18+
./vendor/bin/phpunit --coverage-clover coverage/clover.xml --coverage-html=coverage -d --min-coverage=100
2319

2420
composer.phar:
2521
curl -s http://getcomposer.org/installer | php
@@ -29,11 +25,7 @@ composer.lock: composer.phar
2925

3026
vendor/bin/phpunit: install
3127

32-
build:
33-
mkdir build
34-
3528
clean:
3629
rm composer.lock
3730
rm -r vendor
3831
rm -r coverage
39-
rm -r build

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"phpstan/phpstan": "^2.0",
3434
"phpunit/phpunit": "^10.0 | ^11.0 | ^12.0",
3535
"phrity/net-uri": "^2.0",
36+
"robiningelbrecht/phpunit-coverage-tools": "^1.9",
3637
"squizlabs/php_codesniffer": "^3.5"
3738
}
3839
}

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ parameters:
77
exceptions:
88
check:
99
tooWideThrowType: true
10-
implicitThrows: false
10+
implicitThrows: false

phpunit.xml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,20 @@
1111
displayDetailsOnTestsThatTriggerNotices="true"
1212
displayDetailsOnTestsThatTriggerWarnings="true"
1313
>
14-
<coverage/>
15-
<testsuites>
16-
<testsuite name="Unit tests">
17-
<directory suffix=".php">tests/suites/</directory>
18-
</testsuite>
19-
</testsuites>
20-
<source>
21-
<include>
22-
<directory suffix=".php">src/</directory>
23-
</include>
24-
</source>
14+
<testsuites>
15+
<testsuite name="Unit tests">
16+
<directory suffix=".php">tests/suites</directory>
17+
</testsuite>
18+
</testsuites>
19+
<source>
20+
<include>
21+
<directory suffix=".php">src/</directory>
22+
</include>
23+
</source>
24+
<extensions>
25+
<bootstrap class="RobinIngelbrecht\PHPUnitCoverageTools\PhpUnitExtension">
26+
<parameter name="exitOnLowCoverage" value="1"/>
27+
<parameter name="cleanUpCloverXml" value="0"/>
28+
</bootstrap>
29+
</extensions>
2530
</phpunit>

src/SocketStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* SocketStream class.
99
*/
10-
class SocketStream extends Stream
10+
class SocketStream extends Stream implements StreamInterface
1111
{
1212
// ---------- Configuration ---------------------------------------------------------------------------------------
1313

src/Stream.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use InvalidArgumentException;
66
use Phrity\Util\ErrorHandler;
7-
use Psr\Http\Message\StreamInterface;
87
use Stringable;
98
use Throwable;
109

0 commit comments

Comments
 (0)