Skip to content

Commit 234992a

Browse files
committed
Renamed library from Kraken to Dazzle
1 parent c32cea9 commit 234992a

18 files changed

+292
-462
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
vendor
3+
composer.lock
4+
composer.phar

.noninteractive

Whitespace-only changes.

.scrutinizer.yml

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
filter:
2+
excluded_paths:
3+
- 'test/*'
4+
- 'vendor/*'
5+
checks:
6+
php:
7+
return_doc_comments: true
8+
remove_extra_empty_lines: true
9+
10+
coding_style:
11+
php:
12+
indentation:
13+
general:
14+
use_tabs: false
15+
size: 4
16+
switch:
17+
indent_case: true
18+
spaces:
19+
general:
20+
linefeed_character: newline
21+
before_parentheses:
22+
function_declaration: false
23+
closure_definition: false
24+
function_call: false
25+
if: true
26+
for: true
27+
while: true
28+
switch: true
29+
catch: true
30+
array_initializer: false
31+
around_operators:
32+
assignment: true
33+
logical: true
34+
equality: true
35+
relational: true
36+
bitwise: true
37+
additive: true
38+
multiplicative: true
39+
shift: true
40+
unary_additive: false
41+
concatenation: true
42+
negation: false
43+
before_left_brace:
44+
class: true
45+
function: true
46+
if: true
47+
else: true
48+
for: true
49+
while: true
50+
do: true
51+
switch: true
52+
try: true
53+
catch: true
54+
finally: true
55+
before_keywords:
56+
else: true
57+
while: true
58+
catch: true
59+
finally: true
60+
within:
61+
brackets: false
62+
array_initializer: false
63+
grouping: false
64+
function_call: false
65+
function_declaration: false
66+
if: false
67+
for: false
68+
while: false
69+
switch: false
70+
catch: false
71+
type_cast: false
72+
ternary_operator:
73+
before_condition: true
74+
after_condition: true
75+
before_alternative: true
76+
after_alternative: true
77+
in_short_version: false
78+
other:
79+
before_comma: false
80+
after_comma: true
81+
before_semicolon: false
82+
after_semicolon: true
83+
after_type_cast: true
84+
braces:
85+
classes_functions:
86+
class: new-line
87+
function: new-line
88+
closure: end-of-line
89+
if:
90+
opening: new-line
91+
always: false
92+
else_on_new_line: true
93+
for:
94+
opening: new-line
95+
always: true
96+
while:
97+
opening: new-line
98+
always: true
99+
do_while:
100+
opening: new-line
101+
always: true
102+
while_on_new_line: true
103+
switch:
104+
opening: new-line
105+
try:
106+
opening: new-line
107+
catch_on_new_line: true
108+
finally_on_new_line: true
109+
upper_lower_casing:
110+
keywords:
111+
general: lower
112+
constants:
113+
true_false_null: lower
114+
115+
tools:
116+
external_code_coverage:
117+
timeout: 1800
118+
runs: 1
119+
php_code_coverage: false

.travis.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: php
2+
3+
dist: trusty
4+
sudo: required
5+
6+
php:
7+
- 5.6
8+
- 7.0
9+
- 7.1
10+
11+
before_install:
12+
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1,2)"
13+
14+
install:
15+
- travis_retry composer self-update
16+
- travis_retry composer install --prefer-source --no-interaction --ignore-platform-reqs
17+
- php -m
18+
19+
script:
20+
- vendor/bin/phpunit -d memory_limit=1024M --coverage-text --coverage-clover=coverage.clover
21+
22+
after_script:
23+
- if [ "$TRAVIS_PHP_VERSION" = "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
24+
- if [ "$TRAVIS_PHP_VERSION" = "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Release Notes
2+
3+
This changelog references the relevant changes, bug and security fixes done.

CONTRIBUTING.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and accepted via **Pull Requests** on [GitHub](https://github.com/dazzle-php/throwable).
4+
5+
## Pull Requests
6+
7+
- **Naming convention** - all pull requests fixing a problem should match "Fix #issue Message" pattern, the new features and non-fix changes should match "Resolve #issue Message", the rest should contain only "Message".
8+
- **Follow our template of code** - all contributions have to follow [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) with an exception of control structures, which have to have opening parenthesis always placed in the next line instead of the same.
9+
- **Add tests** - the contribution won't be accepted if it doesn't have tests.
10+
- **Document any change in behaviour** - make sure the `README.md` is kept up to date.
11+
- **Create feature branches** - don't create pull requests from your master branch.
12+
- **One pull request per feature** - for multiple things that you want to do, send also multiple pull requests.
13+
- **Keep coherent history** - make sure each individual commit in your pull request is meaningful. If you had to make multiple commits during development cycle, please squash them before submitting.
14+
15+
## Running Tests
16+
17+
```
18+
$> vendor/bin/phpunit
19+
```

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2015-2017 Kamil Jamróz
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

+21-32
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
1-
# Kraken Ipc Component
1+
# Dazzle Async Socket
22

3-
[![Build Status](https://travis-ci.org/kraken-php/framework.svg)](https://travis-ci.org/kraken-php/framework)
4-
[![Total Downloads](https://poser.pugx.org/kraken-php/ipc/downloads)](https://packagist.org/packages/kraken-php/ipc)
5-
[![Latest Stable Version](https://poser.pugx.org/kraken-php/ipc/v/stable)](https://packagist.org/packages/kraken-php/ipc)
6-
[![Latest Unstable Version](https://poser.pugx.org/kraken-php/ipc/v/unstable)](https://packagist.org/packages/kraken-php/ipc)
7-
[![License](https://poser.pugx.org/kraken-php/framework/license)](https://packagist.org/packages/kraken-php/framework)
8-
[![Kraken Compatible](https://img.shields.io/badge/kraken-compatible-6b02af.svg)](https://github.com/kraken-php/framework)
3+
[![Build Status](https://travis-ci.org/dazzle-php/socket.svg)](https://travis-ci.org/dazzle-php/socket)
4+
[![Code Coverage](https://scrutinizer-ci.com/g/dazzle-php/socket/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/dazzle-php/socket/?branch=master)
5+
[![Code Quality](https://scrutinizer-ci.com/g/dazzle-php/socket/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dazzle-php/socket/?branch=master)
6+
[![Latest Stable Version](https://poser.pugx.org/dazzle-php/socket/v/stable)](https://packagist.org/packages/dazzle-php/socket)
7+
[![Latest Unstable Version](https://poser.pugx.org/dazzle-php/socket/v/unstable)](https://packagist.org/packages/dazzle-php/socket)
8+
[![License](https://poser.pugx.org/dazzle-php/socket/license)](https://packagist.org/packages/dazzle-php/socket/license)
99

10-
> **Note:** This repository is a part of [Kraken Framework][3], but **can be used freely as standalone library**. If you
11-
are interested in more asynchronous components for PHP, check out the rest of [Kraken repository][5] or see our
12-
[asynchronous application skeleton][4] example.
10+
<br>
11+
<p align="center">
12+
<img src="https://avatars0.githubusercontent.com/u/29509136?v=3&s=150" />
13+
</p>
1314

1415
## Description
1516

16-
Ipc is a component that provides various models for implementing inter-process communication via asynchronous
17-
sockets or external services.
17+
Dazzle Socket is a component that implements asynchronous tcp, udp and unix socket handling for PHP. The library also provides interface for implementing self inter-process communication via external services.
1818

1919
## Feature Highlights
2020

21-
Ipc features:
21+
Dazzle Socket features:
2222

2323
* Asynchronous handling of incoming and outcoming messages,
2424
* Support for TCP, UDP and Unix sockets,
25-
* Support for ZeroMQ extension and ZeroMQ protocols,
26-
* Kraken Framework compatibility,
2725
* ...and more.
2826

29-
## Examples
30-
31-
See more examples in [official documentation][2].
32-
3327
## Requirements
3428

3529
* PHP-5.6 or PHP-7.0+,
@@ -38,27 +32,22 @@ See more examples in [official documentation][2].
3832
## Installation
3933

4034
```
41-
composer require kraken-php/ipc
35+
$> composer require dazzle-php/socket
4236
```
4337

4438
## Tests
4539

46-
Tests are provided within our write-only [Framework repository][3].
47-
48-
## Documentation
49-
50-
Documentation for this module can be found in the [official documentation][2].
40+
```
41+
$> vendor/bin/phpunit -d memory_limit=1024M
42+
```
5143

5244
## Contributing
5345

54-
This library is read-only subtree split of Kraken Framework. To make contributions, please go to [Framework repository][3].
46+
Thank you for considering contributing to this repository! The contribution guide can be found in the [contribution tips][1].
5547

5648
## License
5749

58-
This library licensed under the MIT license, see more information in [Kraken Framework][3] license section.
50+
Dazzle Framework is open-sourced software licensed under the [MIT license][2].
5951

60-
[1]: http://kraken-php.com
61-
[2]: http://kraken-php.com/docs/api-ipc
62-
[3]: https://github.com/kraken-php/framework
63-
[4]: https://github.com/kraken-php/kraken
64-
[5]: https://github.com/kraken-php
52+
[1]: https://github.com/dazzle-php/socket/blob/master/CONTRIBUTING.md
53+
[2]: http://opensource.org/licenses/MIT

composer.json

+23-16
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
{
2-
"name": "kraken-php/ipc",
3-
"description": "Kraken Framework Ipc Component.",
2+
"name": "dazzle-php/socket",
3+
"description": "Dazzle Asynchronous Socket.",
44
"keywords": [
5-
"kraken", "kraken-php", "ipc", "message-driven", "agent-model", "soa", "service-oriented", "zmq", "zeromq"
5+
"dazzle", "dazzle-php", "ipc", "inter", "inter-process", "message-driven", "sock", "socket", "tcp", "udp", "unix"
66
],
77
"license": "MIT",
8-
"homepage": "http://kraken-php.com",
98
"support": {
10-
"issues": "https://github.com/kraken-php/framework/issues",
11-
"source": "https://github.com/kraken-php/framework"
9+
"issues": "https://github.com/dazzle-php/socket/issues",
10+
"source": "https://github.com/dazzle-php/socket"
1211
},
13-
"authors": [{
14-
"name": "Kamil Jamroz"
15-
}],
12+
"authors": [
13+
{
14+
"name": "Kamil Jamroz",
15+
"homepage": "https://github.com/khelle"
16+
},
17+
{
18+
"name": "The contributors",
19+
"homepage": "http://github.com/dazzle-php/socket/contributors"
20+
}
21+
],
1622
"require": {
1723
"php": ">=5.6.7",
18-
"kraken-php/event": "0.4.*",
19-
"kraken-php/loop": "0.4.*",
20-
"kraken-php/stream": "0.4.*",
21-
"kraken-php/throwable": "0.4.*"
24+
"dazzle-php/event": "0.5.*",
25+
"dazzle-php/loop": "0.5.*",
26+
"dazzle-php/stream": "0.5.*",
27+
"dazzle-php/throwable": "0.5.*"
2228
},
23-
"suggest": {
24-
"ext-zmq": "*"
29+
"require-dev": {
30+
"phpunit/phpunit": ">=4.8.0 <5.4.0"
2531
},
2632
"autoload": {
2733
"psr-4": {
28-
"Kraken\\Ipc\\": "src"
34+
"Dazzle\\Socket\\": "src/Socket",
35+
"Dazzle\\Socket\\Test\\": "test"
2936
}
3037
},
3138
"extra": {

phpunit.xml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="test/bootstrap.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
convertErrorsToExceptions="true"
6+
convertNoticesToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
processIsolation="false"
9+
preserveGlobalState="false"
10+
stopOnError="false"
11+
stopOnFailure="false"
12+
stopOnIncomplete="false"
13+
stopOnSkipped="false"
14+
syntaxCheck="true"
15+
colors="true"
16+
verbose="true">
17+
18+
<testsuites>
19+
<testsuite name="TModule">
20+
<directory suffix="Test.php">test/TModule</directory>
21+
</testsuite>
22+
23+
<testsuite name="TUnit">
24+
<directory suffix="Test.php">test/TUnit</directory>
25+
</testsuite>
26+
</testsuites>
27+
28+
<filter>
29+
<whitelist>
30+
<directory suffix=".php">src</directory>
31+
</whitelist>
32+
</filter>
33+
</phpunit>

0 commit comments

Comments
 (0)