mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-29 18:27:44 +08:00
Init nsq component.
This commit is contained in:
parent
2138249246
commit
44d58d7766
@ -167,6 +167,7 @@
|
||||
"Hyperf\\ModelCache\\": "src/model-cache/src/",
|
||||
"Hyperf\\ModelListener\\": "src/model-listener/src/",
|
||||
"Hyperf\\Nats\\": "src/nats/src/",
|
||||
"Hyperf\\Nsq\\": "src/nsq/src/",
|
||||
"Hyperf\\Paginator\\": "src/paginator/src/",
|
||||
"Hyperf\\Pool\\": "src/pool/src/",
|
||||
"Hyperf\\Process\\": "src/process/src/",
|
||||
@ -235,6 +236,7 @@
|
||||
"HyperfTest\\ModelCache\\": "src/model-cache/tests/",
|
||||
"HyperfTest\\ModelListener\\": "src/model-listener/tests/",
|
||||
"HyperfTest\\Nats\\": "src/nats/tests/",
|
||||
"HyperfTest\\Nsq\\": "src/nsq/tests/",
|
||||
"HyperfTest\\Paginator\\": "src/paginator/tests/",
|
||||
"HyperfTest\\Pool\\": "src/pool/tests/",
|
||||
"HyperfTest\\Process\\": "src/process/tests/",
|
||||
@ -298,6 +300,7 @@
|
||||
"Hyperf\\ModelCache\\ConfigProvider",
|
||||
"Hyperf\\ModelListener\\ConfigProvider",
|
||||
"Hyperf\\Nats\\ConfigProvider",
|
||||
"Hyperf\\Nsq\\ConfigProvider",
|
||||
"Hyperf\\Paginator\\ConfigProvider",
|
||||
"Hyperf\\Pool\\ConfigProvider",
|
||||
"Hyperf\\Process\\ConfigProvider",
|
||||
|
@ -79,6 +79,7 @@
|
||||
<directory suffix=".php">./src/json-rpc/src</directory>
|
||||
<directory suffix=".php">./src/logger/src</directory>
|
||||
<directory suffix=".php">./src/model-cache/src</directory>
|
||||
<directory suffix=".php">./src/nsq/src</directory>
|
||||
<directory suffix=".php">./src/paginator/src</directory>
|
||||
<directory suffix=".php">./src/redis/src</directory>
|
||||
<directory suffix=".php">./src/rpc/src</directory>
|
||||
|
1
src/nsq/.gitattributes
vendored
Normal file
1
src/nsq/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
/tests export-ignore
|
21
src/nsq/LICENSE
Normal file
21
src/nsq/LICENSE
Normal 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.
|
53
src/nsq/composer.json
Normal file
53
src/nsq/composer.json
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "hyperf/nsq",
|
||||
"description": "A nsq library for Hyperf.",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"php",
|
||||
"swoole",
|
||||
"hyperf",
|
||||
"nsq"
|
||||
],
|
||||
"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\\Nsq\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"HyperfTest\\Nsq\\": "tests/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
},
|
||||
"hyperf": {
|
||||
"config": "Hyperf\\Nsq\\ConfigProvider"
|
||||
}
|
||||
},
|
||||
"bin": [
|
||||
],
|
||||
"scripts": {
|
||||
"cs-fix": "php-cs-fixer fix $1",
|
||||
"test": "phpunit --colors=always"
|
||||
}
|
||||
}
|
21
src/nsq/src/ConfigProvider.php
Normal file
21
src/nsq/src/ConfigProvider.php
Normal 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\Nsq;
|
||||
|
||||
class ConfigProvider
|
||||
{
|
||||
public function __invoke(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
27
src/nsq/tests/NsqTest.php
Normal file
27
src/nsq/tests/NsqTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?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 HyperfTest\Nsq;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @coversNothing
|
||||
*/
|
||||
class NsqTest extends TestCase
|
||||
{
|
||||
public function testExample()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user