Skip to content

Cleaned up some tests & prepare 3.0 #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 1, 2020
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
2 changes: 2 additions & 0 deletions .github/workflows/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*.yml]
indent_size = 2
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
build:
name: Build
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 10
matrix:
batch:
- { suite: "curl", php: '7.4', package: "php-http/curl-client:dev-master zendframework/zend-diactoros" }
- { suite: "Socket", php: '7.4', package: "php-http/socket-client:dev-master php-http/client-common" }
- { suite: "Guzzle5", php: '7.1', package: "php-http/guzzle5-adapter:dev-master" }
- { suite: "Guzzle6", php: '7.4', package: "php-http/guzzle6-adapter:dev-master" }
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master" }
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master phpunit/phpunit:^8.5.8" }
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master phpunit/phpunit:^7.5.20" }
- { suite: "Buzz", php: '7.4', package: "kriswallsmith/buzz:dev-master" }

steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.batch.php }}
coverage: none
tools: composer:v2

- name: Checkout code
uses: actions/checkout@v2

- name: Download dependencies
run: |
composer require ${{ matrix.batch.package }} --no-update
composer update --prefer-source --no-interaction

- name: Start test server
shell: bash
run: bin/http_test_server > /dev/null 2>&1 &

- name: Run tests
run: ./vendor/bin/phpunit --testsuite ${{ matrix.batch.suite }}
21 changes: 21 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Static analysis

on:
push:
branches:
- master
pull_request:

jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:2.16.4
with:
args: --dry-run --diff-format udiff
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
/phpspec.yml
/phpunit.xml
/vendor/
.phpunit.result.cache
.php_cs.cache
13 changes: 0 additions & 13 deletions .php_cs

This file was deleted.

15 changes: 15 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->name('*.php')
)
;

return $config;
11 changes: 0 additions & 11 deletions .styleci.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [3.0.0] - Unreleased
## [3.0.0] - 2020-10-01

- Only support HTTPlug 2.0 and PSR-18
- HTTPlug 2.0 is now optional (only require it if you need to test async)
- HttpClientTest now relies only on PSR-18 (no need for HTTPlug)
- Added support for PHPUnit 8 and 9

## [2.0.1] - 2018-12-27

Expand Down
14 changes: 1 addition & 13 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="Artax">
<directory>vendor/php-http/artax-adapter/tests</directory>
</testsuite>
<testsuite name="curl">
<directory>vendor/php-http/curl-client/tests</directory>
</testsuite>
Expand All @@ -20,16 +17,7 @@
<directory>vendor/php-http/guzzle6-adapter/tests</directory>
</testsuite>
<testsuite name="Buzz">
<directory>vendor/php-http/buzz-adapter/tests</directory>
</testsuite>
<testsuite name="React">
<directory>vendor/php-http/react-adapter/tests</directory>
</testsuite>
<testsuite name="CakePHP">
<directory>vendor/php-http/cakephp-adapter/tests</directory>
</testsuite>
<testsuite name="Zend">
<directory>vendor/php-http/zend-adapter/tests</directory>
<directory>vendor/kriswallsmith/buzz/tests</directory>
</testsuite>
</testsuites>
<php>
Expand Down