Skip to content

Commit

Permalink
Renamed library from Kraken to Dazzle
Browse files Browse the repository at this point in the history
  • Loading branch information
khelle committed Jun 24, 2017
1 parent c32cea9 commit 55af22c
Show file tree
Hide file tree
Showing 18 changed files with 275 additions and 1,477 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.idea
vendor
composer.lock
composer.phar
Empty file added .noninteractive
Empty file.
119 changes: 119 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
filter:
excluded_paths:
- 'test/*'
- 'vendor/*'
checks:
php:
return_doc_comments: true
remove_extra_empty_lines: true

coding_style:
php:
indentation:
general:
use_tabs: false
size: 4
switch:
indent_case: true
spaces:
general:
linefeed_character: newline
before_parentheses:
function_declaration: false
closure_definition: false
function_call: false
if: true
for: true
while: true
switch: true
catch: true
array_initializer: false
around_operators:
assignment: true
logical: true
equality: true
relational: true
bitwise: true
additive: true
multiplicative: true
shift: true
unary_additive: false
concatenation: true
negation: false
before_left_brace:
class: true
function: true
if: true
else: true
for: true
while: true
do: true
switch: true
try: true
catch: true
finally: true
before_keywords:
else: true
while: true
catch: true
finally: true
within:
brackets: false
array_initializer: false
grouping: false
function_call: false
function_declaration: false
if: false
for: false
while: false
switch: false
catch: false
type_cast: false
ternary_operator:
before_condition: true
after_condition: true
before_alternative: true
after_alternative: true
in_short_version: false
other:
before_comma: false
after_comma: true
before_semicolon: false
after_semicolon: true
after_type_cast: true
braces:
classes_functions:
class: new-line
function: new-line
closure: end-of-line
if:
opening: new-line
always: false
else_on_new_line: true
for:
opening: new-line
always: true
while:
opening: new-line
always: true
do_while:
opening: new-line
always: true
while_on_new_line: true
switch:
opening: new-line
try:
opening: new-line
catch_on_new_line: true
finally_on_new_line: true
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower

tools:
external_code_coverage:
timeout: 1800
runs: 1
php_code_coverage: false
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
language: php

dist: trusty
sudo: required

php:
- 5.6
- 7.0
- 7.1

before_install:
- export PHP_MAJOR="$(echo $TRAVIS_PHP_VERSION | cut -d '.' -f 1,2)"

install:
- travis_retry composer self-update
- travis_retry composer install --prefer-source --no-interaction --ignore-platform-reqs
- php -m

script:
- vendor/bin/phpunit -d memory_limit=1024M --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" = "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" = "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release Notes

This changelog references the relevant changes, bug and security fixes done.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing

Contributions are **welcome** and accepted via **Pull Requests** on [GitHub](https://github.com/dazzle-php/throwable).

## Pull Requests

- **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".
- **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.
- **Add tests** - the contribution won't be accepted if it doesn't have tests.
- **Document any change in behaviour** - make sure the `README.md` is kept up to date.
- **Create feature branches** - don't create pull requests from your master branch.
- **One pull request per feature** - for multiple things that you want to do, send also multiple pull requests.
- **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.

## Running Tests

```
$> vendor/bin/phpunit
```
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2015-2017 Kamil Jamróz

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 changes: 21 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
# Kraken Ipc Component
# Dazzle Async ZMQ

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

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

## Description

Ipc is a component that provides various models for implementing inter-process communication via asynchronous
sockets or external services.
Dazzle Socket is a component that implements asynchronous ZMQ socket handling for PHP.

## Feature Highlights

Ipc features:
Dazzlee ZMQ features:

* Asynchronous handling of incoming and outcoming messages,
* Support for TCP, UDP and Unix sockets,
* Support for ZeroMQ extension and ZeroMQ protocols,
* Kraken Framework compatibility,
* ...and more.

## Examples

See more examples in [official documentation][2].

## Requirements

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

```
composer require kraken-php/ipc
$> composer require dazzle-php/zmq
```

## Tests

Tests are provided within our write-only [Framework repository][3].

## Documentation

Documentation for this module can be found in the [official documentation][2].
```
$> vendor/bin/phpunit -d memory_limit=1024M
```

## Contributing

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

## License

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

[1]: http://kraken-php.com
[2]: http://kraken-php.com/docs/api-ipc
[3]: https://github.com/kraken-php/framework
[4]: https://github.com/kraken-php/kraken
[5]: https://github.com/kraken-php
[1]: https://github.com/dazzle-php/zmq/blob/master/CONTRIBUTING.md
[2]: http://opensource.org/licenses/MIT
38 changes: 24 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
{
"name": "kraken-php/ipc",
"description": "Kraken Framework Ipc Component.",
"name": "dazzle-php/zmq",
"description": "Dazzle Asynchronous ZMQ.",
"keywords": [
"kraken", "kraken-php", "ipc", "message-driven", "agent-model", "soa", "service-oriented", "zmq", "zeromq"
"dazzle", "dazzle-php", "ipc", "inter", "inter-process", "message-driven", "sock", "socket", "zmq", "zeromq"
],
"license": "MIT",
"homepage": "http://kraken-php.com",
"support": {
"issues": "https://github.com/kraken-php/framework/issues",
"source": "https://github.com/kraken-php/framework"
"issues": "https://github.com/dazzle-php/zmq/issues",
"source": "https://github.com/dazzle-php/zmq"
},
"authors": [{
"name": "Kamil Jamroz"
}],
"authors": [
{
"name": "Kamil Jamroz",
"homepage": "https://github.com/khelle"
},
{
"name": "The contributors",
"homepage": "http://github.com/dazzle-php/zmq/contributors"
}
],
"require": {
"php": ">=5.6.7",
"kraken-php/event": "0.4.*",
"kraken-php/loop": "0.4.*",
"kraken-php/stream": "0.4.*",
"kraken-php/throwable": "0.4.*"
"dazzle-php/event": "0.5.*",
"dazzle-php/loop": "0.5.*",
"dazzle-php/stream": "0.5.*",
"dazzle-php/throwable": "0.5.*"
},
"require-dev": {
"phpunit/phpunit": ">=4.8.0 <5.4.0"
},
"suggest": {
"ext-zmq": "*"
},
"autoload": {
"psr-4": {
"Kraken\\Ipc\\": "src"
"Dazzle\\Zmq\\": "src/Socket",
"Dazzle\\Zmq\\Test\\": "test"
}
},
"extra": {
Expand Down
33 changes: 33 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="test/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
preserveGlobalState="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
syntaxCheck="true"
colors="true"
verbose="true">

<testsuites>
<testsuite name="TModule">
<directory suffix="Test.php">test/TModule</directory>
</testsuite>

<testsuite name="TUnit">
<directory suffix="Test.php">test/TUnit</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit 55af22c

Please sign in to comment.