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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/phpspec.ci.yml export-ignore
/phpspec.yml.dist export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/spec/ export-ignore
/tests/ export-ignore
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']

steps:
- name: Checkout code
Expand All @@ -27,6 +27,9 @@ jobs:

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress
env:
# PHPUnit 7.5 is the last version supporting PHP 7.1, it has a security advisory that blocks installation
COMPOSER_NO_BLOCKING: ${{ matrix.php == '7.1' && '1' || '' }}

- name: Execute tests
run: composer test
Expand All @@ -36,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.4', '8.0', '8.5']
php: ['7.1', '7.4', '8.0', '8.5', '8.6']

steps:
- name: Checkout code
Expand All @@ -50,9 +53,10 @@ jobs:
coverage: none

- name: Install dependencies
run: |
composer require "sebastian/comparator:^3.0.2" --no-interaction --no-update
composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress
run: composer update --prefer-dist --prefer-stable --prefer-lowest --no-interaction --no-progress
env:
# PHPUnit 7.5 is the last version supporting PHP 7.1, it has a security advisory that blocks installation
COMPOSER_NO_BLOCKING: ${{ matrix.php == '7.1' && '1' || '' }}

- name: Execute tests
run: composer test
Expand All @@ -68,14 +72,12 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.5'
tools: composer:v2
coverage: xdebug

- name: Install dependencies
run: |
composer require "friends-of-phpspec/phpspec-code-coverage:^4.3.2" --no-interaction --no-update
composer update --prefer-dist --no-interaction --no-progress
run: composer update --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: composer test-ci
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v7

- name: Remove phpspec
run: composer remove --dev friends-of-phpspec/phpspec-code-coverage phpspec/phpspec

- name: PHPStan
uses: docker://oskarstark/phpstan-ga
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.php-cs-fixer.cache
/build/
/composer.lock
/phpspec.yml
/phpunit.xml
/.phpunit.cache/
/.phpunit.result.cache
/vendor/
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in([__DIR__.'/src', __DIR__.'/tests'])
->name('*.php')
;

Expand Down
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@
"psr/http-message": "^1.0 || ^2.0"
},
"require-dev": {
"friends-of-phpspec/phpspec-code-coverage": "^4.1 || ^5.0 || ^6.0 || ^7.0",
"phpspec/phpspec": "^5.1 || ^6.0 || ^7.0 || ^8.3"
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.6 || ^10.5 || ^11.5 || ^12.5"
},
"autoload": {
"psr-4": {
"Http\\Client\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Http\\Client\\Tests\\": "tests/"
}
},
"scripts": {
"test": "vendor/bin/phpspec run",
"test-ci": "vendor/bin/phpspec run -c phpspec.ci.yml"
"test": "vendor/bin/phpunit",
"test-ci": "vendor/bin/phpunit --coverage-filter src --coverage-clover build/coverage.xml"
}
}
10 changes: 0 additions & 10 deletions phpspec.ci.yml

This file was deleted.

5 changes: 0 additions & 5 deletions phpspec.yml.dist

This file was deleted.

21 changes: 1 addition & 20 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
parameters:
ignoreErrors:
-
message: "#^Method Http\\\\Client\\\\Exception\\\\HttpException\\:\\:create\\(\\) has no return type specified\\.$#"
count: 1
path: src/Exception/HttpException.php

-
message: "#^Unsafe usage of new static\\(\\)\\.$#"
count: 1
path: src/Exception/HttpException.php

-
message: "#^Method Http\\\\Client\\\\Exception\\\\NetworkException\\:\\:setRequest\\(\\) has no return type specified\\.$#"
count: 1
path: src/Exception/NetworkException.php

-
message: "#^Method Http\\\\Client\\\\Exception\\\\RequestException\\:\\:setRequest\\(\\) has no return type specified\\.$#"
count: 1
path: src/Exception/RequestException.php
ignoreErrors: []
12 changes: 12 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="HTTPlug Test Suite">
<directory>tests/</directory>
</testsuite>
</testsuites>
</phpunit>
45 changes: 0 additions & 45 deletions spec/Exception/HttpExceptionSpec.php

This file was deleted.

44 changes: 0 additions & 44 deletions spec/Exception/NetworkExceptionSpec.php

This file was deleted.

44 changes: 0 additions & 44 deletions spec/Exception/RequestExceptionSpec.php

This file was deleted.

18 changes: 0 additions & 18 deletions spec/Exception/TransferExceptionSpec.php

This file was deleted.

Loading
Loading