Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 1163078

Browse files
authored
Merge pull request #447 from beyondcode/2.x
[2.x] Major refactoring
2 parents e9b9cc4 + f27b690 commit 1163078

File tree

185 files changed

+11169
-3865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+11169
-3865
lines changed

.codecov.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
codecov:
2+
notify:
3+
require_ci_to_pass: yes
4+
5+
coverage:
6+
precision: 2
7+
round: down
8+
range: "70...100"
9+
10+
status:
11+
project: yes
12+
patch: yes
13+
changes: no
14+
15+
comment:
16+
layout: "reach, diff, flags, files, footer"
17+
behavior: default
18+
require_changes: no

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@ end_of_line = lf
1111
insert_final_newline = true
1212
trim_trailing_whitespace = true
1313

14+
[*.{blade.php,yml,yaml}]
15+
indent_size = 2
16+
1417
[*.md]
1518
trim_trailing_whitespace = false

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
tags:
8+
- '*'
9+
pull_request:
10+
branches:
11+
- '*'
12+
13+
jobs:
14+
build:
15+
if: "!contains(github.event.head_commit.message, 'skip ci')"
16+
17+
runs-on: ubuntu-latest
18+
19+
strategy:
20+
matrix:
21+
php:
22+
- '7.3'
23+
- '7.4'
24+
laravel:
25+
- 6.*
26+
- 7.*
27+
- 8.*
28+
prefer:
29+
- 'prefer-lowest'
30+
- 'prefer-stable'
31+
include:
32+
- laravel: '6.*'
33+
testbench: '4.*'
34+
- laravel: '7.*'
35+
testbench: '5.*'
36+
- laravel: '8.*'
37+
testbench: '6.*'
38+
39+
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} --${{ matrix.prefer }}
40+
41+
steps:
42+
- uses: actions/checkout@v1
43+
44+
- name: Setup PHP
45+
uses: shivammathur/setup-php@v2
46+
with:
47+
php-version: ${{ matrix.php }}
48+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
49+
coverage: pcov
50+
51+
- name: Setup Redis
52+
uses: supercharge/[email protected]
53+
with:
54+
redis-version: 6
55+
56+
- uses: actions/cache@v1
57+
name: Cache dependencies
58+
with:
59+
path: ~/.composer/cache/files
60+
key: composer-php-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.prefer }}-${{ hashFiles('composer.json') }}
61+
62+
- name: Install dependencies
63+
run: |
64+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench-browser-kit:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
65+
composer update --${{ matrix.prefer }} --prefer-dist --no-interaction --no-suggest
66+
67+
- name: Run tests for Local
68+
run: |
69+
REPLICATION_MODE=local vendor/bin/phpunit --coverage-text --coverage-clover=coverage_local.xml
70+
71+
- name: Run tests for Redis
72+
run: |
73+
REPLICATION_MODE=redis vendor/bin/phpunit --coverage-text --coverage-clover=coverage_redis.xml
74+
75+
- uses: codecov/codecov-action@v1
76+
with:
77+
fail_ci_if_error: false
78+
file: '*.xml'
79+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/run-tests.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
/vendor
2+
/.idea
13
build
2-
composer.lock
3-
vendor
4+
.phpunit.result.cache
45
coverage
5-
.phpunit.result.cache
6+
composer.phar
7+
composer.lock
8+
.DS_Store
9+
database.sqlite

.scrutinizer.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
filter:
2-
excluded_paths: [tests/*]
2+
excluded_paths: [tests/*]
33

44
checks:
5-
php:
6-
remove_extra_empty_lines: true
7-
remove_php_closing_tag: true
8-
remove_trailing_whitespace: true
9-
fix_use_statements:
10-
remove_unused: true
11-
preserve_multiple: false
12-
preserve_blanklines: true
13-
order_alphabetically: true
14-
fix_php_opening_tag: true
15-
fix_linefeed: true
16-
fix_line_ending: true
17-
fix_identation_4spaces: true
18-
fix_doc_comments: true
5+
php:
6+
remove_extra_empty_lines: true
7+
remove_php_closing_tag: true
8+
remove_trailing_whitespace: true
9+
fix_use_statements:
10+
remove_unused: true
11+
preserve_multiple: false
12+
preserve_blanklines: true
13+
order_alphabetically: true
14+
fix_php_opening_tag: true
15+
fix_linefeed: true
16+
fix_line_ending: true
17+
fix_identation_4spaces: true
18+
fix_doc_comments: true
1919

.styleci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
preset: laravel
2-
3-
disabled:
4-
- single_class_element_per_statement
1+
preset: laravel

CHANGELOG.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE.md renamed to LICENSE

File renamed without changes.

composer.json

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "beyondcode/laravel-websockets",
3-
"description": "An easy to use WebSocket server",
3+
"description": "An easy to launch a Pusher-compatible WebSockets server for Laravel.",
44
"keywords": [
55
"beyondcode",
6-
"laravel-websockets"
6+
"laravel-websockets",
7+
"laravel",
8+
"php"
79
],
8-
"homepage": "https://github.com/beyondcode/laravel-websockets",
910
"license": "MIT",
11+
"homepage": "https://github.com/beyondcode/laravel-websockets",
1012
"authors": [
1113
{
1214
"name": "Marcel Pociot",
@@ -19,48 +21,58 @@
1921
"email": "[email protected]",
2022
"homepage": "https://spatie.be",
2123
"role": "Developer"
24+
},
25+
{
26+
"name": "Alex Renoki",
27+
"homepage": "https://github.com/rennokki",
28+
"role": "Developer"
2229
}
2330
],
2431
"require": {
25-
"php": "^7.2",
26-
"ext-json": "*",
2732
"cboden/ratchet": "^0.4.1",
33+
"clue/redis-react": "^2.3",
34+
"doctrine/dbal": "^2.9",
35+
"evenement/evenement": "^2.0|^3.0",
2836
"facade/ignition-contracts": "^1.0",
2937
"guzzlehttp/psr7": "^1.5",
30-
"illuminate/broadcasting": "^6.0|^7.0|^8.0",
31-
"illuminate/console": "^6.0|^7.0|^8.0",
32-
"illuminate/http": "^6.0|^7.0|^8.0",
33-
"illuminate/routing": "^6.0|^7.0|^8.0",
34-
"illuminate/support": "^6.0|^7.0|^8.0",
35-
"pusher/pusher-php-server": "^3.0|^4.0",
36-
"react/dns": "^1.1",
37-
"react/http": "^1.1",
38+
"illuminate/broadcasting": "^6.3|^7.0|^8.0",
39+
"illuminate/console": "^6.3|7.0|^8.0",
40+
"illuminate/http": "^6.3|^7.0|^8.0",
41+
"illuminate/queue": "^6.3|^7.0|^8.0",
42+
"illuminate/routing": "^6.3|^7.0|^8.0",
43+
"illuminate/support": "^6.3|^7.0|^8.0",
44+
"pusher/pusher-php-server": "^4.0",
45+
"react/promise": "^2.0",
3846
"symfony/http-kernel": "^4.0|^5.0",
3947
"symfony/psr-http-message-bridge": "^1.1|^2.0"
4048
},
4149
"require-dev": {
42-
"mockery/mockery": "^1.3",
43-
"orchestra/testbench": "^4.0|^5.0|^6.0",
50+
"clue/block-react": "^1.4",
51+
"laravel/legacy-factories": "^1.1",
52+
"orchestra/testbench-browser-kit": "^4.0|^5.0|^6.0",
53+
"orchestra/database": "^4.0|^5.0|^6.0",
4454
"phpunit/phpunit": "^8.0|^9.0"
4555
},
56+
"suggest": {
57+
"ext-pcntl": "Running the server needs pcntl to listen to command signals and soft-shutdown."
58+
},
4659
"autoload": {
4760
"psr-4": {
48-
"BeyondCode\\LaravelWebSockets\\": "src"
61+
"BeyondCode\\LaravelWebSockets\\": "src/"
4962
}
5063
},
5164
"autoload-dev": {
5265
"psr-4": {
53-
"BeyondCode\\LaravelWebSockets\\Tests\\": "tests"
66+
"BeyondCode\\LaravelWebSockets\\Test\\": "tests"
5467
}
5568
},
5669
"scripts": {
57-
"test": "vendor/bin/phpunit",
58-
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
59-
70+
"test": "vendor/bin/phpunit"
6071
},
6172
"config": {
6273
"sort-packages": true
6374
},
75+
"minimum-stability": "dev",
6476
"extra": {
6577
"laravel": {
6678
"providers": [

0 commit comments

Comments
 (0)