summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.github/workflows/ci-build.yml2
-rwxr-xr-xbors.toml2
-rwxr-xr-xcomposer.json2
-rw-r--r--plugins/http/tests/handler_test.go11
4 files changed, 13 insertions, 4 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index 6a7af214..d1b524c0 100755
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- php: [ 7.4 ]
+ php: [ 7.4, 8.0 ]
go: [ 1.14, 1.15 ]
os: [ ubuntu-20.04 ]
env:
diff --git a/bors.toml b/bors.toml
index 17543f78..fbbfa9db 100755
--- a/bors.toml
+++ b/bors.toml
@@ -1,6 +1,8 @@
status = [
'Build (PHP 7.4, Go 1.15, OS ubuntu-latest)',
'Build (PHP 7.4, Go 1.14, OS ubuntu-latest)',
+ 'Build (PHP 8, Go 1.15, OS ubuntu-latest)',
+ 'Build (PHP 8, Go 1.14, OS ubuntu-latest)',
'runner / golangci-lint', ]
diff --git a/composer.json b/composer.json
index 283eaab1..d809d0dd 100755
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,7 @@
}
],
"require": {
- "php": "^7.2",
+ "php": "^7.4 || 8.0",
"ext-json": "*",
"ext-curl": "*",
"spiral/goridge": "^2.4.2",
diff --git a/plugins/http/tests/handler_test.go b/plugins/http/tests/handler_test.go
index b898c265..0c6a39ef 100644
--- a/plugins/http/tests/handler_test.go
+++ b/plugins/http/tests/handler_test.go
@@ -614,8 +614,15 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
form := url.Values{}
- form.Add("key", "value1")
+ form.Add("key", "value")
form.Add("key", "value2")
+ form.Add("name[]", "name1")
+ form.Add("name[]", "name2")
+ form.Add("name[]", "name3")
+ form.Add("arr[x][y][z]", "y")
+ form.Add("arr[x][y][e]", "f")
+ form.Add("arr[c]p", "l")
+ form.Add("arr[c]z", "")
req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, strings.NewReader(form.Encode()))
assert.NoError(t, err)
@@ -637,7 +644,7 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, 200, r.StatusCode)
- assert.Equal(t, `{"key":"value2","arr":{"x":{"y":null}}}`, string(b))
+ assert.Equal(t, `{"arr":{"c":{"p":"l","z":""},"x":{"y":{"e":"f","z":"y"}}},"key":"value2","name":["name1","name2","name3"]}`, string(b))
}
func TestHandler_FormData_POST_Form_UrlEncoded_Charset(t *testing.T) {