Added super-globals component.

This commit is contained in:
李铭昕 2020-01-01 19:28:06 +08:00
parent e61f54fc18
commit c1518cea62
5 changed files with 99 additions and 0 deletions

View File

@ -181,6 +181,7 @@
"Hyperf\\Session\\": "src/session/src/",
"Hyperf\\Snowflake\\": "src/snowflake/src/",
"Hyperf\\Socket\\": "src/socket/src/",
"Hyperf\\SuperGlobals\\": "src/super-globals/src/",
"Hyperf\\Swagger\\": "src/swagger/src/",
"Hyperf\\SwooleEnterprise\\": "src/swoole-enterprise/src/",
"Hyperf\\SwooleTracker\\": "src/swoole-tracker/src/",
@ -246,6 +247,7 @@
"HyperfTest\\Session\\": "src/session/tests/",
"HyperfTest\\Snowflake\\": "src/snowflake/tests/",
"HyperfTest\\Socket\\": "src/socket/tests/",
"HyperfTest\\SuperGlobals\\": "src/super-globals/tests/",
"HyperfTest\\Task\\": "src/task/tests/",
"HyperfTest\\Testing\\": "src/testing/tests/",
"HyperfTest\\Translation\\": "src/translation/tests/",
@ -309,6 +311,7 @@
"Hyperf\\Session\\ConfigProvider",
"Hyperf\\Snowflake\\ConfigProvider",
"Hyperf\\Socket\\ConfigProvider",
"Hyperf\\SuperGlobals\\ConfigProvider",
"Hyperf\\Swagger\\ConfigProvider",
"Hyperf\\SwooleEnterprise\\ConfigProvider",
"Hyperf\\SwooleTracker\\ConfigProvider",

1
src/super-globals/.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
/tests export-ignore

21
src/super-globals/LICENSE Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Hyperf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,53 @@
{
"name": "hyperf/super-globals",
"description": "A superglobals library for Hyperf.",
"license": "MIT",
"keywords": [
"php",
"swoole",
"hyperf",
"superglobals"
],
"support": {
},
"require": {
"php": ">=7.2",
"hyperf/contract": "~1.1.0",
"hyperf/utils": "~1.1.0"
},
"require-dev": {
"malukenho/docheader": "^0.1.6",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.0.0",
"friendsofphp/php-cs-fixer": "^2.9"
},
"suggest": {
},
"autoload": {
"psr-4": {
"Hyperf\\SuperGlobals\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"HyperfTest\\SuperGlobals\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
},
"hyperf": {
"config": "Hyperf\\SuperGlobals\\ConfigProvider"
}
},
"bin": [
],
"scripts": {
"cs-fix": "php-cs-fixer fix $1",
"test": "phpunit --colors=always"
}
}

View File

@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://doc.hyperf.io
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\SuperGlobals;
class ConfigProvider
{
public function __invoke(): array
{
return [];
}
}