Skip to content

Commit 7d4fa7a

Browse files
committed
update: rename component namespace
1 parent d599478 commit 7d4fa7a

10 files changed

Lines changed: 24 additions & 26 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Swoft Tcp Protocol
1+
# Swoft Tcp
22

33
[![Latest Stable Version](http://img.shields.io/packagist/v/swoft/tcp-protocol.svg)](https://packagist.org/packages/swoft/tcp-protocol)
44
[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg?maxAge=2592000)](https://secure.php.net/)
55
[![Swoft Doc](https://img.shields.io/badge/docs-passing-green.svg?maxAge=2592000)](https://www.swoft.org/docs)
66
[![Swoft License](https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000)](https://github.com/swoft-cloud/swoft/blob/master/LICENSE)
77

8-
Swoft Tcp Protocol Component
8+
Swoft Tcp Common Component
99

1010
## Install
1111

1212
- composer command
1313

1414
```bash
15-
composer require swoft/tcp-protocol
15+
composer require swoft/tcp
1616
```
1717

1818
## Resources

composer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@
1515
"swoft/stdlib": "~2.0.0"
1616
},
1717
"autoload": {
18-
"classmap": [
19-
],
2018
"psr-4": {
21-
"Swoft\\Tcp\\Protocol\\": "src/"
19+
"Swoft\\Tcp\\": "src/"
2220
}
2321
},
2422
"require-dev": {
2523
"phpunit/phpunit": "^7.5"
2624
},
2725
"autoload-dev": {
2826
"psr-4": {
29-
"SwoftTest\\Tcp\\Protocol\\Unit\\": "test/unit/",
30-
"SwoftTest\\Tcp\\Protocol\\Testing\\": "test/testing/"
27+
"SwoftTest\\Tcp\\Unit\\": "test/unit/",
28+
"SwoftTest\\Tcp\\Testing\\": "test/testing/"
3129
}
3230
},
3331
"scripts": {

src/AutoLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol;
3+
namespace Swoft\Tcp;
44

55
use Swoft\Helper\ComposerJSON;
66
use Swoft\SwoftComponent;

src/Contract/PackerInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol\Contract;
3+
namespace Swoft\Tcp\Contract;
44

5-
use Swoft\Tcp\Protocol\Package;
5+
use Swoft\Tcp\Package;
66

77
/**
88
* Interface PackerInterface - Data packer interface

src/Exception/ProtocolException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol\Exception;
3+
namespace Swoft\Tcp\Exception;
44

55
use RuntimeException;
66

src/Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol;
3+
namespace Swoft\Tcp;
44

55
use ReflectionException;
66
use Swoft\Bean\Exception\ContainerException;

src/Packer/JsonPacker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol\Packer;
3+
namespace Swoft\Tcp\Packer;
44

55
use ReflectionException;
66
use Swoft\Bean\Annotation\Mapping\Bean;
77
use Swoft\Bean\Exception\ContainerException;
88
use Swoft\Stdlib\Helper\JsonHelper;
9-
use Swoft\Tcp\Protocol\Contract\PackerInterface;
10-
use Swoft\Tcp\Protocol\Package;
9+
use Swoft\Tcp\Contract\PackerInterface;
10+
use Swoft\Tcp\Package;
1111

1212
/**
1313
* Class JsonPacker

src/Packer/SimpleTokenPacker.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol\Packer;
3+
namespace Swoft\Tcp\Packer;
44

55
use function explode;
66
use ReflectionException;
77
use Swoft\Bean\Annotation\Mapping\Bean;
88
use Swoft\Bean\Exception\ContainerException;
9-
use Swoft\Tcp\Protocol\Contract\PackerInterface;
10-
use Swoft\Tcp\Protocol\Package;
9+
use Swoft\Tcp\Contract\PackerInterface;
10+
use Swoft\Tcp\Package;
1111
use function trim;
1212

1313
/**

src/Protocol.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php declare(strict_types=1);
22

3-
namespace Swoft\Tcp\Protocol;
3+
namespace Swoft\Tcp;
44

55
use Swoft;
66
use Swoft\Bean\Exception\ContainerException;
7-
use Swoft\Tcp\Protocol\Contract\PackerInterface;
8-
use Swoft\Tcp\Protocol\Exception\ProtocolException;
9-
use Swoft\Tcp\Protocol\Packer\JsonPacker;
10-
use Swoft\Tcp\Protocol\Packer\SimpleTokenPacker;
7+
use Swoft\Tcp\Contract\PackerInterface;
8+
use Swoft\Tcp\Exception\ProtocolException;
9+
use Swoft\Tcp\Packer\JsonPacker;
10+
use Swoft\Tcp\Packer\SimpleTokenPacker;
1111
use function array_keys;
1212
use function array_merge;
1313

test/unit/PackageTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php declare(strict_types=1);
22

3-
namespace SwoftTest\Tcp\Protocol\Unit;
3+
namespace SwoftTest\Tcp\Unit;
44

55
use PHPUnit\Framework\TestCase;
6-
use Swoft\Tcp\Protocol\Package;
6+
use Swoft\Tcp\Package;
77

88
/**
99
* Class PackageTest

0 commit comments

Comments
 (0)