Skip to content

Commit

Permalink
Replace Async functionality (#100)
Browse files Browse the repository at this point in the history
* wip: phpgt/promise implementation
for #89

* wip: refactor to gt promise model
still need to handle rejection exceptions

* feature: add badly formed json for testing

* ci: update workflows

* build: update dependencies

* docs: update example to match new functionality

* wip: sign off Http class

* wip: use master branch of async

* wip: fix existing tests

* feature: implement proper blob response type

* wip: tidy request resolver

* wip: tidy curl opt builder

* wip: tidy http class

* stan: improve static analysis over core classes

* test: improve types for native curl handle

* stan: remove unused import

* wip: document BodyResponse internal rejection

* wip: remove alternative method of throwing internal exception

* docs: update examples
  • Loading branch information
g105b authored Jan 20, 2023
1 parent 3b7c868 commit 59a3d1c
Show file tree
Hide file tree
Showing 24 changed files with 794 additions and 1,110 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Composer dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}

- uses: php-actions/composer@v5
- uses: php-actions/composer@v6

- name: Archive build
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./

- name: Upload build archive for test runners
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -31,7 +31,7 @@ jobs:
needs: [composer]

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -40,9 +40,9 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Unit tests
uses: php-actions/phpunit@v2
uses: php-actions/phpunit@v3
with:
php_version: 8.0
php_version: 8.1
php_extensions: xdebug
configuration: test/phpunit/phpunit.xml
bootstrap: vendor/autoload.php
Expand All @@ -52,7 +52,7 @@ jobs:
needs: [composer]

steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-artifact
path: /tmp/github-actions
Expand All @@ -61,6 +61,6 @@ jobs:
run: tar -xvf /tmp/github-actions/build.tar ./

- name: PHP Static Analysis
uses: php-actions/phpstan@v2
uses: php-actions/phpstan@v3
with:
path: src/
path: src/
4 changes: 2 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build:
environment:
php: 8.0.0
php: 8.1.0

nodes:
analysis:
Expand Down Expand Up @@ -29,4 +29,4 @@ checks:
filter:
excluded_paths:
- test/*
- vendor/*
- vendor/*
4 changes: 4 additions & 0 deletions broken.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Some broken JSON",
"description" "This JSON is not correctly formed";
}
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},

"require": {
"php": ">=7.2",
"php": ">=8.1",
"ext-curl": "*",
"ext-json": "*",
"phpgt/http": "*",
"phpgt/curl": "*",

"php-http/httplug": "^2.0",
"react/promise": "2.*",
"react/event-loop": "^1.0"
"phpgt/async": "dev-master",
"phpgt/promise": "dev-master as v2.0.0",
"phpgt/http": "^v1.1",
"phpgt/curl": "^v3.0",
"phpgt/json": "^v1.1",
"php-http/httplug": "^2.3"
},

"require-dev": {
Expand Down
Loading

0 comments on commit 59a3d1c

Please sign in to comment.