summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-01 16:59:06 +0300
committerValery Piashchynski <[email protected]>2020-12-01 16:59:06 +0300
commit84c8234ec01ad1d5ea5f0a8c7dbca9a3012bcb2b (patch)
treed70f1d5fb0f36821825d0805d71f22940ec6a1af
parent2ac6d3192fbd43f0911d7c87f394fd0839b0fcfa (diff)
parent70910821a0ffb10316f9970a2fec4c3379d10675 (diff)
Merge branch 'release_2.0' into plugin/headers
# Conflicts: # static_pool_test.go
-rwxr-xr-x.github/workflows/ci-build.yml4
-rwxr-xr-xbors.toml2
-rwxr-xr-xcomposer.json2
-rwxr-xr-xcomposer.lock1192
-rw-r--r--plugins/http/tests/handler_test.go11
-rw-r--r--plugins/http/tests/http_test.go41
-rw-r--r--plugins/static/tests/static_plugin_test.go16
-rwxr-xr-xstatic_pool_test.go18
8 files changed, 65 insertions, 1221 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index 6a7af214..c64f0f11 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:
@@ -55,7 +55,7 @@ jobs:
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
- run: composer install --prefer-dist --no-interaction --no-suggest # --prefer-source
+ run: composer install --prefer-dist --no-interaction
# - name: Analyze PHP sources
# run: composer analyze
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..4b68d498 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/composer.lock b/composer.lock
deleted file mode 100755
index ded194f5..00000000
--- a/composer.lock
+++ /dev/null
@@ -1,1192 +0,0 @@
-{
- "_readme": [
- "This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "439018483d4d3a37c3d369d2587b8311",
- "packages": [
- {
- "name": "laminas/laminas-diactoros",
- "version": "2.4.1",
- "source": {
- "type": "git",
- "url": "https://github.com/laminas/laminas-diactoros.git",
- "reference": "36ef09b73e884135d2059cc498c938e90821bb57"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/36ef09b73e884135d2059cc498c938e90821bb57",
- "reference": "36ef09b73e884135d2059cc498c938e90821bb57",
- "shasum": ""
- },
- "require": {
- "laminas/laminas-zendframework-bridge": "^1.0",
- "php": "^7.1",
- "psr/http-factory": "^1.0",
- "psr/http-message": "^1.0"
- },
- "conflict": {
- "phpspec/prophecy": "<1.9.0"
- },
- "provide": {
- "psr/http-factory-implementation": "1.0",
- "psr/http-message-implementation": "1.0"
- },
- "replace": {
- "zendframework/zend-diactoros": "^2.2.1"
- },
- "require-dev": {
- "ext-curl": "*",
- "ext-dom": "*",
- "ext-gd": "*",
- "ext-libxml": "*",
- "http-interop/http-factory-tests": "^0.5.0",
- "laminas/laminas-coding-standard": "~1.0.0",
- "php-http/psr7-integration-tests": "^1.0",
- "phpunit/phpunit": "^7.5.18"
- },
- "type": "library",
- "extra": {
- "laminas": {
- "config-provider": "Laminas\\Diactoros\\ConfigProvider",
- "module": "Laminas\\Diactoros"
- }
- },
- "autoload": {
- "files": [
- "src/functions/create_uploaded_file.php",
- "src/functions/marshal_headers_from_sapi.php",
- "src/functions/marshal_method_from_sapi.php",
- "src/functions/marshal_protocol_version_from_sapi.php",
- "src/functions/marshal_uri_from_sapi.php",
- "src/functions/normalize_server.php",
- "src/functions/normalize_uploaded_files.php",
- "src/functions/parse_cookie_header.php",
- "src/functions/create_uploaded_file.legacy.php",
- "src/functions/marshal_headers_from_sapi.legacy.php",
- "src/functions/marshal_method_from_sapi.legacy.php",
- "src/functions/marshal_protocol_version_from_sapi.legacy.php",
- "src/functions/marshal_uri_from_sapi.legacy.php",
- "src/functions/normalize_server.legacy.php",
- "src/functions/normalize_uploaded_files.legacy.php",
- "src/functions/parse_cookie_header.legacy.php"
- ],
- "psr-4": {
- "Laminas\\Diactoros\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "description": "PSR HTTP Message implementations",
- "homepage": "https://laminas.dev",
- "keywords": [
- "http",
- "laminas",
- "psr",
- "psr-17",
- "psr-7"
- ],
- "support": {
- "chat": "https://laminas.dev/chat",
- "docs": "https://docs.laminas.dev/laminas-diactoros/",
- "forum": "https://discourse.laminas.dev",
- "issues": "https://github.com/laminas/laminas-diactoros/issues",
- "rss": "https://github.com/laminas/laminas-diactoros/releases.atom",
- "source": "https://github.com/laminas/laminas-diactoros"
- },
- "funding": [
- {
- "url": "https://funding.communitybridge.org/projects/laminas-project",
- "type": "community_bridge"
- }
- ],
- "time": "2020-09-03T14:29:41+00:00"
- },
- {
- "name": "laminas/laminas-zendframework-bridge",
- "version": "1.1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/laminas/laminas-zendframework-bridge.git",
- "reference": "6ede70583e101030bcace4dcddd648f760ddf642"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642",
- "reference": "6ede70583e101030bcace4dcddd648f760ddf642",
- "shasum": ""
- },
- "require": {
- "php": "^5.6 || ^7.0 || ^8.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3",
- "squizlabs/php_codesniffer": "^3.5"
- },
- "type": "library",
- "extra": {
- "laminas": {
- "module": "Laminas\\ZendFrameworkBridge"
- }
- },
- "autoload": {
- "files": [
- "src/autoload.php"
- ],
- "psr-4": {
- "Laminas\\ZendFrameworkBridge\\": "src//"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "description": "Alias legacy ZF class names to Laminas Project equivalents.",
- "keywords": [
- "ZendFramework",
- "autoloading",
- "laminas",
- "zf"
- ],
- "support": {
- "forum": "https://discourse.laminas.dev/",
- "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues",
- "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom",
- "source": "https://github.com/laminas/laminas-zendframework-bridge"
- },
- "funding": [
- {
- "url": "https://funding.communitybridge.org/projects/laminas-project",
- "type": "community_bridge"
- }
- ],
- "time": "2020-09-14T14:23:00+00:00"
- },
- {
- "name": "psr/container",
- "version": "1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/container.git",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Container\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common Container Interface (PHP FIG PSR-11)",
- "homepage": "https://github.com/php-fig/container",
- "keywords": [
- "PSR-11",
- "container",
- "container-interface",
- "container-interop",
- "psr"
- ],
- "support": {
- "issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/master"
- },
- "time": "2017-02-14T16:28:37+00:00"
- },
- {
- "name": "psr/http-factory",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-factory.git",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
- "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0.0",
- "psr/http-message": "^1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interfaces for PSR-7 HTTP message factories",
- "keywords": [
- "factory",
- "http",
- "message",
- "psr",
- "psr-17",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-factory/tree/master"
- },
- "time": "2019-04-30T12:38:16+00:00"
- },
- {
- "name": "psr/http-message",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP messages",
- "homepage": "https://github.com/php-fig/http-message",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ],
- "support": {
- "source": "https://github.com/php-fig/http-message/tree/master"
- },
- "time": "2016-08-06T14:39:51+00:00"
- },
- {
- "name": "spiral/goridge",
- "version": "v2.4.5",
- "source": {
- "type": "git",
- "url": "https://github.com/spiral/goridge-php.git",
- "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/spiral/goridge-php/zipball/a7373de7f86a5452f8ad61bd1340dc158626f7f8",
- "reference": "a7373de7f86a5452f8ad61bd1340dc158626f7f8",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "php": ">=7.2"
- },
- "require-dev": {
- "phpstan/phpstan": "^0.12.23",
- "phpunit/phpunit": "~8.0",
- "spiral/code-style": "^1.0"
- },
- "type": "goridge",
- "autoload": {
- "psr-4": {
- "Spiral\\Goridge\\": "src/"
- },
- "files": [
- "src/functions.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Anton Titov / Wolfy-J",
- "email": "[email protected]"
- }
- ],
- "description": "High-performance PHP-to-Golang RPC bridge",
- "support": {
- "issues": "https://github.com/spiral/goridge-php/issues",
- "source": "https://github.com/spiral/goridge-php/tree/v2.4.5"
- },
- "time": "2020-08-14T14:28:30+00:00"
- },
- {
- "name": "symfony/console",
- "version": "v5.1.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/console.git",
- "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e",
- "reference": "e0b2c29c0fa6a69089209bbe8fcff4df2a313d0e",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php73": "^1.8",
- "symfony/polyfill-php80": "^1.15",
- "symfony/service-contracts": "^1.1|^2",
- "symfony/string": "^5.1"
- },
- "conflict": {
- "symfony/dependency-injection": "<4.4",
- "symfony/dotenv": "<5.1",
- "symfony/event-dispatcher": "<4.4",
- "symfony/lock": "<4.4",
- "symfony/process": "<4.4"
- },
- "provide": {
- "psr/log-implementation": "1.0"
- },
- "require-dev": {
- "psr/log": "~1.0",
- "symfony/config": "^4.4|^5.0",
- "symfony/dependency-injection": "^4.4|^5.0",
- "symfony/event-dispatcher": "^4.4|^5.0",
- "symfony/lock": "^4.4|^5.0",
- "symfony/process": "^4.4|^5.0",
- "symfony/var-dumper": "^4.4|^5.0"
- },
- "suggest": {
- "psr/log": "For using the console logger",
- "symfony/event-dispatcher": "",
- "symfony/lock": "",
- "symfony/process": ""
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Console\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Console Component",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/console/tree/v5.1.8"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-24T12:01:57+00:00"
- },
- {
- "name": "symfony/polyfill-ctype",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
- "reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-ctype": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Ctype\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Gert de Pagter",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for ctype functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "ctype",
- "polyfill",
- "portable"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/polyfill-intl-grapheme",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
- "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c",
- "reference": "c7cf3f858ec7d70b89559d6e6eb1f7c2517d479c",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's grapheme_* functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "grapheme",
- "intl",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/polyfill-intl-normalizer",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
- "reference": "727d1096295d807c309fb01a851577302394c897"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/727d1096295d807c309fb01a851577302394c897",
- "reference": "727d1096295d807c309fb01a851577302394c897",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-intl": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
- },
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for intl's Normalizer class and related functions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "intl",
- "normalizer",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
- "reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/polyfill-php73",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php73.git",
- "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/8ff431c517be11c78c48a39a66d37431e26a6bed",
- "reference": "8ff431c517be11c78c48a39a66d37431e26a6bed",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php73\\": ""
- },
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php73/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/polyfill-php80",
- "version": "v1.20.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php80.git",
- "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
- "reference": "e70aa8b064c5b72d3df2abd5ab1e90464ad009de",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "1.20-dev"
- },
- "thanks": {
- "name": "symfony/polyfill",
- "url": "https://github.com/symfony/polyfill"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php80\\": ""
- },
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ion Bazan",
- "email": "[email protected]"
- },
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ],
- "support": {
- "source": "https://github.com/symfony/polyfill-php80/tree/v1.20.0"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-23T14:02:19+00:00"
- },
- {
- "name": "symfony/service-contracts",
- "version": "v2.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/service-contracts.git",
- "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d15da7ba4957ffb8f1747218be9e1a121fd298a1",
- "reference": "d15da7ba4957ffb8f1747218be9e1a121fd298a1",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "psr/container": "^1.0"
- },
- "suggest": {
- "symfony/service-implementation": ""
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.2-dev"
- },
- "thanks": {
- "name": "symfony/contracts",
- "url": "https://github.com/symfony/contracts"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\Contracts\\Service\\": ""
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Generic abstractions related to writing services",
- "homepage": "https://symfony.com",
- "keywords": [
- "abstractions",
- "contracts",
- "decoupling",
- "interfaces",
- "interoperability",
- "standards"
- ],
- "support": {
- "source": "https://github.com/symfony/service-contracts/tree/master"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-09-07T11:33:47+00:00"
- },
- {
- "name": "symfony/string",
- "version": "v5.1.8",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/string.git",
- "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/string/zipball/a97573e960303db71be0dd8fda9be3bca5e0feea",
- "reference": "a97573e960303db71be0dd8fda9be3bca5e0feea",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/polyfill-ctype": "~1.8",
- "symfony/polyfill-intl-grapheme": "~1.0",
- "symfony/polyfill-intl-normalizer": "~1.0",
- "symfony/polyfill-mbstring": "~1.0",
- "symfony/polyfill-php80": "~1.15"
- },
- "require-dev": {
- "symfony/error-handler": "^4.4|^5.0",
- "symfony/http-client": "^4.4|^5.0",
- "symfony/translation-contracts": "^1.1|^2",
- "symfony/var-exporter": "^4.4|^5.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\String\\": ""
- },
- "files": [
- "Resources/functions.php"
- ],
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony String component",
- "homepage": "https://symfony.com",
- "keywords": [
- "grapheme",
- "i18n",
- "string",
- "unicode",
- "utf-8",
- "utf8"
- ],
- "support": {
- "source": "https://github.com/symfony/string/tree/v5.1.8"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2020-10-24T12:01:57+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "phpstan/phpstan",
- "version": "0.12.56",
- "source": {
- "type": "git",
- "url": "https://github.com/phpstan/phpstan.git",
- "reference": "007fd5d700c41e1bb27795fae15a2383f8fa4ba1"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/007fd5d700c41e1bb27795fae15a2383f8fa4ba1",
- "reference": "007fd5d700c41e1bb27795fae15a2383f8fa4ba1",
- "shasum": ""
- },
- "require": {
- "php": "^7.1|^8.0"
- },
- "conflict": {
- "phpstan/phpstan-shim": "*"
- },
- "bin": [
- "phpstan",
- "phpstan.phar"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "0.12-dev"
- }
- },
- "autoload": {
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "PHPStan - PHP Static Analysis Tool",
- "support": {
- "issues": "https://github.com/phpstan/phpstan/issues",
- "source": "https://github.com/phpstan/phpstan/tree/0.12.56"
- },
- "funding": [
- {
- "url": "https://github.com/ondrejmirtes",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/phpstan",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan",
- "type": "tidelift"
- }
- ],
- "time": "2020-11-16T22:59:18+00:00"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": {
- "php": "^7.2",
- "ext-json": "*",
- "ext-curl": "*"
- },
- "platform-dev": [],
- "plugin-api-version": "2.0.0"
-}
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) {
diff --git a/plugins/http/tests/http_test.go b/plugins/http/tests/http_test.go
index 71859937..73bb53a0 100644
--- a/plugins/http/tests/http_test.go
+++ b/plugins/http/tests/http_test.go
@@ -71,8 +71,9 @@ func TestHTTPInit(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 5)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -164,6 +165,7 @@ func TestHTTPInformerReset(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("HTTPInformerTest", informerTest)
t.Run("HTTPEchoTestBefore", echoHTTP)
t.Run("HTTPResetTest", resetTest)
@@ -253,8 +255,9 @@ func TestSSL(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -281,6 +284,7 @@ func TestSSL(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("SSLEcho", sslEcho)
t.Run("SSLNoRedirect", sslNoRedirect)
t.Run("fCGIecho", fcgiEcho)
@@ -379,8 +383,9 @@ func TestSSLRedirect(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+
+ tt := time.NewTimer(time.Second * 10)
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -407,6 +412,7 @@ func TestSSLRedirect(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("SSLRedirect", sslRedirect)
wg.Wait()
}
@@ -464,8 +470,8 @@ func TestSSLPushPipes(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -492,6 +498,7 @@ func TestSSLPushPipes(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("SSLPush", sslPush)
wg.Wait()
}
@@ -551,10 +558,9 @@ func TestFastCGI_RequestUri(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
- t.Run("FastCGIServiceRequestUri", fcgiReqURI)
+ tt := time.NewTimer(time.Second * 10)
go func() {
- tt := time.NewTimer(time.Second * 10)
defer wg.Done()
for {
select {
@@ -581,6 +587,8 @@ func TestFastCGI_RequestUri(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
+ t.Run("FastCGIServiceRequestUri", fcgiReqURI)
wg.Wait()
}
@@ -635,8 +643,9 @@ func TestH2CUpgrade(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -663,6 +672,7 @@ func TestH2CUpgrade(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("H2cUpgrade", h2cUpgrade)
wg.Wait()
}
@@ -722,8 +732,9 @@ func TestH2C(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -750,6 +761,7 @@ func TestH2C(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("H2c", h2c)
wg.Wait()
}
@@ -810,8 +822,9 @@ func TestHttpMiddleware(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 15)
+
go func() {
- tt := time.NewTimer(time.Second * 15)
defer wg.Done()
for {
select {
@@ -838,6 +851,7 @@ func TestHttpMiddleware(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("MiddlewareTest", middleware)
wg.Wait()
}
@@ -913,8 +927,9 @@ func TestHttpEchoErr(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -941,6 +956,7 @@ func TestHttpEchoErr(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("HttpEchoError", echoError)
wg.Wait()
}
@@ -994,8 +1010,9 @@ func TestHttpEnvVariables(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 5)
defer wg.Done()
for {
select {
@@ -1022,6 +1039,7 @@ func TestHttpEnvVariables(t *testing.T) {
}
}()
+ time.Sleep(time.Second * 1)
t.Run("EnvVariablesTest", envVarsTest)
wg.Wait()
}
@@ -1069,7 +1087,6 @@ func TestHttpBrokenPipes(t *testing.T) {
assert.Error(t, err)
}
-
func get(url string) (string, *http.Response, error) {
r, err := http.Get(url)
if err != nil {
diff --git a/plugins/static/tests/static_plugin_test.go b/plugins/static/tests/static_plugin_test.go
index a9cb1fd1..d0403160 100644
--- a/plugins/static/tests/static_plugin_test.go
+++ b/plugins/static/tests/static_plugin_test.go
@@ -57,8 +57,9 @@ func TestStaticPlugin(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 10)
defer wg.Done()
for {
select {
@@ -85,6 +86,7 @@ func TestStaticPlugin(t *testing.T) {
}
}()
+ time.Sleep(time.Second)
t.Run("ServeSample", serveStaticSample)
t.Run("StaticNotForbid", staticNotForbid)
t.Run("StaticHeaders", staticHeaders)
@@ -163,8 +165,9 @@ func TestStaticDisabled(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 10)
defer wg.Done()
for {
select {
@@ -191,6 +194,7 @@ func TestStaticDisabled(t *testing.T) {
}
}()
+ time.Sleep(time.Second)
t.Run("StaticDisabled", staticDisabled)
wg.Wait()
}
@@ -234,8 +238,9 @@ func TestStaticFilesDisabled(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 10)
defer wg.Done()
for {
select {
@@ -262,6 +267,7 @@ func TestStaticFilesDisabled(t *testing.T) {
}
}()
+ time.Sleep(time.Second)
t.Run("StaticFilesDisabled", staticFilesDisabled)
wg.Wait()
}
@@ -314,8 +320,9 @@ func TestStaticFilesForbid(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(1)
+ tt := time.NewTimer(time.Second * 10)
+
go func() {
- tt := time.NewTimer(time.Second * 10)
defer wg.Done()
for {
select {
@@ -342,6 +349,7 @@ func TestStaticFilesForbid(t *testing.T) {
}
}()
+ time.Sleep(time.Second)
t.Run("StaticTestFilesDir", staticTestFilesDir)
t.Run("StaticNotFound", staticNotFound)
t.Run("StaticFilesForbid", staticFilesForbid)
diff --git a/static_pool_test.go b/static_pool_test.go
index 77e554e5..747f26c4 100755
--- a/static_pool_test.go
+++ b/static_pool_test.go
@@ -6,6 +6,7 @@ import (
"os/exec"
"runtime"
"strconv"
+ "strings"
"sync"
"testing"
"time"
@@ -16,8 +17,8 @@ import (
var cfg = PoolConfig{
NumWorkers: int64(runtime.NumCPU()),
- AllocateTimeout: time.Second,
- DestroyTimeout: time.Second,
+ AllocateTimeout: time.Second * 5,
+ DestroyTimeout: time.Second * 5,
}
func Test_NewPool(t *testing.T) {
@@ -171,15 +172,16 @@ func Test_StaticPool_Broken_Replace(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, p)
- wg := &sync.WaitGroup{}
- wg.Add(1)
+ block := make(chan struct{})
p.AddListener(func(event interface{}) {
if wev, ok := event.(WorkerEvent); ok {
if wev.Event == EventWorkerLog {
- assert.Contains(t, string(wev.Payload.([]byte)), "undefined_function()")
- wg.Done()
- return
+ e := string(wev.Payload.([]byte))
+ if strings.ContainsAny(e, "undefined_function()") {
+ block <- struct{}{}
+ return
+ }
}
}
})
@@ -189,7 +191,7 @@ func Test_StaticPool_Broken_Replace(t *testing.T) {
assert.Nil(t, res.Context)
assert.Nil(t, res.Body)
- wg.Wait()
+ <-block
p.Destroy(ctx)
}