Skip to content

Commit 2b06a3f

Browse files
committed
Merge branch '4.x' into development
# Conflicts: # .gitlab-ci.yml # docker-compose.yml
2 parents 4225f4d + 2d23a5e commit 2b06a3f

20 files changed

+1141
-776
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: ['https://aplus-framework.com/sponsor']

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/close-pull-request.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
pull_request:
6+
schedule:
7+
- cron: '0 4 * * *'
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-20.04
12+
timeout-minutes: 10
13+
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
php: ['8.1']
18+
19+
name: PHP ${{ matrix.php }}
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
tools: composer
30+
coverage: xdebug
31+
32+
- name: Install dependencies
33+
run:
34+
composer update
35+
36+
- name: Composer normalize
37+
run:
38+
composer normalize --dry-run --indent-size=4 --indent-style=space
39+
40+
- name: Coding Standard
41+
run:
42+
vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
43+
44+
- name: PHPMD
45+
run:
46+
vendor/bin/phpmd src xml phpmd.xml
47+
48+
- name: PHPStan
49+
run:
50+
vendor/bin/phpstan analyse -vvv
51+
52+
- name: PHPUnit
53+
run: vendor/bin/phpunit --verbose
54+
55+
- name: Upload coverage results to Coveralls
56+
env:
57+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
run: |
59+
mkdir -p build/logs/
60+
cp build/coverage/clover.xml build/logs/clover.xml
61+
composer global require php-coveralls/php-coveralls
62+
php-coveralls --coverage_clover=build/logs/clover.xml -v
63+
if: matrix.php == '8.1'

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
image: registry.gitlab.com/aplus-framework/images/base:1
2+
image: registry.gitlab.com/aplus-framework/images/base:2
33

44
include:
55
- template: Security/SAST.gitlab-ci.yml
@@ -14,7 +14,7 @@ test:php:
1414
- build/
1515
- vendor/
1616
before_script:
17-
- composer install
17+
- composer update
1818
script:
1919
- composer normalize --dry-run --indent-size=4 --indent-style=space
2020
- vendor/bin/php-cs-fixer fix --diff --dry-run --verbose

.phpstorm.meta.php

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
\CURLOPT_DNS_LOCAL_IP6,
3838
\CURLOPT_DNS_SHUFFLE_ADDRESSES,
3939
\CURLOPT_DNS_USE_GLOBAL_CACHE,
40+
\CURLOPT_DOH_URL,
4041
\CURLOPT_EGDSOCKET,
4142
\CURLOPT_ENCODING,
4243
\CURLOPT_EXPECT_100_TIMEOUT_MS,
@@ -94,6 +95,7 @@
9495
\CURLOPT_PRE_PROXY,
9596
\CURLOPT_PRIVATE,
9697
\CURLOPT_PROGRESSFUNCTION,
98+
\CURLOPT_PROTOCOLS,
9799
\CURLOPT_PROXY,
98100
\CURLOPT_PROXYAUTH,
99101
\CURLOPT_PROXYHEADER,
@@ -181,20 +183,25 @@
181183
\CURLOPT_WRITEFUNCTION,
182184
\CURLOPT_WRITEHEADER,
183185
\CURLOPT_XOAUTH2_BEARER,
184-
// The following options are overwritten in the Client::run()
186+
// The following options are overwritten in the Request::getOptions()
185187
// So, we disable it from code-completion...
186188
//\CURLOPT_CUSTOMREQUEST,
187189
//\CURLOPT_HEADER,
188-
//\CURLOPT_HEADERFUNCTION,
189190
//\CURLOPT_HTTPHEADER,
190191
//\CURLOPT_HTTP_VERSION,
191192
//\CURLOPT_POST,
192193
//\CURLOPT_POSTFIELDS,
193-
//\CURLOPT_PROTOCOLS,
194194
//\CURLOPT_URL,
195+
// The following are overwritten in the Client:
196+
//\CURLOPT_HEADERFUNCTION,
197+
);
198+
expectedArguments(
199+
\Framework\HTTP\Client\Request::getOption(),
200+
0,
201+
argumentsSet('curl_options')
195202
);
196203
expectedArguments(
197-
\Framework\HTTP\Client\Client::setOption(),
204+
\Framework\HTTP\Client\Request::setOption(),
198205
0,
199206
argumentsSet('curl_options')
200207
);

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
# Aplus Framework HTTP Client Library
44

5-
- [Homepage](https://aplus-framework.com/packages/http-client)
5+
- [Home](https://aplus-framework.com/packages/http-client)
66
- [User Guide](https://docs.aplus-framework.com/guides/libraries/http-client/index.html)
77
- [API Documentation](https://docs.aplus-framework.com/packages/http-client.html)
88

9+
[![tests](https://github.com/aplus-framework/http-client/actions/workflows/tests.yml/badge.svg)](https://github.com/aplus-framework/http-client/actions/workflows/tests.yml)
910
[![pipeline](https://gitlab.com/aplus-framework/libraries/http-client/badges/master/pipeline.svg)](https://gitlab.com/aplus-framework/libraries/http-client/-/pipelines?scope=branches)
1011
[![coverage](https://gitlab.com/aplus-framework/libraries/http-client/badges/master/coverage.svg?job=test:php)](https://aplus-framework.gitlab.io/libraries/http-client/coverage/)
1112
[![packagist](https://img.shields.io/packagist/v/aplus/http-client)](https://packagist.org/packages/aplus/http-client)

ci-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
commands=(
5-
"composer install"
5+
"composer update"
66
"composer normalize --dry-run --indent-size=4 --indent-style=space"
77
"vendor/bin/php-cs-fixer fix --diff --dry-run --verbose"
88
"vendor/bin/phpmd src xml phpmd.xml"

composer.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aplus/http-client",
3-
"description": "Aplus HTTP Client Library",
3+
"description": "Aplus Framework HTTP Client Library",
44
"license": "MIT",
55
"type": "library",
66
"keywords": [
@@ -34,20 +34,20 @@
3434
}
3535
],
3636
"require": {
37-
"php": ">=8.0",
37+
"php": ">=8.1",
3838
"ext-curl": "*",
3939
"ext-fileinfo": "*",
4040
"ext-json": "*",
41-
"aplus/helpers": "^2.2",
42-
"aplus/http": "^4.3"
41+
"aplus/helpers": "^3.0",
42+
"aplus/http": "^5.0"
4343
},
4444
"require-dev": {
4545
"ext-xdebug": "*",
46-
"aplus/coding-standard": "^1.9",
47-
"ergebnis/composer-normalize": "^2.15",
46+
"aplus/coding-standard": "^1.12",
47+
"ergebnis/composer-normalize": "^2.25",
4848
"jetbrains/phpstorm-attributes": "^1.0",
49-
"phpmd/phpmd": "^2.10",
50-
"phpstan/phpstan": "^0.12",
49+
"phpmd/phpmd": "^2.12",
50+
"phpstan/phpstan": "^1.5",
5151
"phpunit/phpunit": "^9.5"
5252
},
5353
"minimum-stability": "dev",
@@ -63,6 +63,9 @@
6363
}
6464
},
6565
"config": {
66+
"allow-plugins": {
67+
"ergebnis/composer-normalize": true
68+
},
6669
"optimize-autoloader": true,
6770
"preferred-install": "dist",
6871
"sort-packages": true

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22
services:
33
package:
4-
image: registry.gitlab.com/aplus-framework/images/package:1
4+
image: registry.gitlab.com/aplus-framework/images/package:2
55
container_name: package-http-client
66
working_dir: /package
77
volumes:

0 commit comments

Comments
 (0)