-
Notifications
You must be signed in to change notification settings - Fork 28
full support to PHP 8.0 + add support for CurlHandle resource objects #71
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
|
||
# Run this workflow every time a new commit pushed to your repository | ||
on: | ||
push: | ||
|
||
jobs: | ||
tests: | ||
if: "! contains(toJSON(github.event.commits.*.msg), 'skip') && ! contains(toJSON(github.event.commits.*.msg), 'ci')" #skip ci... | ||
runs-on: ${{ matrix.operating-system }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
operating-system: [ubuntu-16.04,ubuntu-18.04,ubuntu-20.04] | ||
php-versions: ['7.2', '7.3', '7.4', '8.0'] | ||
include: | ||
- operating-system: ubuntu-16.04 | ||
php-versions: '7.1' | ||
COMPOSER_FLAGS: '--prefer-stable --prefer-lowest' | ||
COVERAGE: 'true' | ||
PHPUNIT_FLAGS: '--coverage-clover build/coverage.xml' | ||
|
||
name: PHP ${{ matrix.php-versions }} - ${{ matrix.operating-system }} | ||
|
||
env: | ||
extensions: curl json libxml dom | ||
key: cache-v1 # can be any string, change to clear the extension cache. | ||
|
||
steps: | ||
# Checks out a copy of your repository on the ubuntu machine | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup cache environment | ||
id: extcache | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.extensions }} | ||
key: ${{ env.key }} | ||
|
||
- name: Cache PHP Extensions | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.extcache.outputs.dir }} | ||
key: ${{ steps.extcache.outputs.key }} | ||
restore-keys: ${{ steps.extcache.outputs.key }} | ||
|
||
- name: Cache Composer Dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.composer/cache/files | ||
key: dependencies-composer-${{ hashFiles('composer.json') }} | ||
|
||
- name: Setup PHP Action | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: ${{ env.extensions }} | ||
coverage: xdebug | ||
tools: pecl, composer | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Composer self update | ||
run: composer self-update | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This step should definitely not be here. |
||
|
||
- name: Install Composer dependencies | ||
run: composer update ${{ matrix.COMPOSER_FLAGS }} --prefer-source --no-interaction | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prefer-source will be very slow |
||
|
||
- name: boot test server | ||
run: vendor/bin/http_test_server > /dev/null 2>&1 & | ||
|
||
- name: Apply tests | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. run? |
||
run: composer test | ||
|
||
- name: Apply coverage | ||
if: ${{ matrix.COVERAGE == 'true' }} | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,14 @@ | |
"psr-18" | ||
], | ||
"homepage": "http://php-http.org", | ||
"authors": [ | ||
{ | ||
"name": "Михаил Красильников", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"authors": [{ | ||
"name": "Михаил Красильников", | ||
"email": "[email protected]" | ||
}], | ||
"prefer-stable": true, | ||
"minimum-stability": "dev", | ||
"require": { | ||
"php": "^7.1", | ||
"php": "^7.1 || ^8.0", | ||
"ext-curl": "*", | ||
"php-http/discovery": "^1.6", | ||
"php-http/httplug": "^2.0", | ||
|
@@ -28,8 +26,8 @@ | |
}, | ||
"require-dev": { | ||
"guzzlehttp/psr7": "^1.0", | ||
"php-http/client-integration-tests": "^2.0", | ||
"phpunit/phpunit": "^7.5", | ||
"php-http/client-integration-tests": "^3.0", | ||
"phpunit/phpunit": "^7.5 || ^9.4", | ||
"laminas/laminas-diactoros": "^2.0" | ||
}, | ||
"autoload": { | ||
|
@@ -56,4 +54,4 @@ | |
"dev-master": "2.x-dev" | ||
} | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.