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

Commit

Permalink
Merge pull request #447 from beyondcode/2.x
Browse files Browse the repository at this point in the history
[2.x] Major refactoring
  • Loading branch information
rennokki authored Jan 23, 2021
2 parents e9b9cc4 + f27b690 commit 1163078
Show file tree
Hide file tree
Showing 185 changed files with 11,169 additions and 3,865 deletions.
18 changes: 18 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project: yes
patch: yes
changes: no

comment:
layout: "reach, diff, flags, files, footer"
behavior: default
require_changes: no
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{blade.php,yml,yaml}]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI

on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- '*'

jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"

runs-on: ubuntu-latest

strategy:
matrix:
php:
- '7.3'
- '7.4'
laravel:
- 6.*
- 7.*
- 8.*
prefer:
- 'prefer-lowest'
- 'prefer-stable'
include:
- laravel: '6.*'
testbench: '4.*'
- laravel: '7.*'
testbench: '5.*'
- laravel: '8.*'
testbench: '6.*'

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} --${{ matrix.prefer }}

steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: pcov

- name: Setup Redis
uses: supercharge/[email protected]
with:
redis-version: 6

- uses: actions/cache@v1
name: Cache dependencies
with:
path: ~/.composer/cache/files
key: composer-php-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.prefer }}-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench-browser-kit:${{ matrix.testbench }}" "orchestra/database:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.prefer }} --prefer-dist --no-interaction --no-suggest
- name: Run tests for Local
run: |
REPLICATION_MODE=local vendor/bin/phpunit --coverage-text --coverage-clover=coverage_local.xml
- name: Run tests for Redis
run: |
REPLICATION_MODE=redis vendor/bin/phpunit --coverage-text --coverage-clover=coverage_redis.xml
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
file: '*.xml'
token: ${{ secrets.CODECOV_TOKEN }}
55 changes: 0 additions & 55 deletions .github/workflows/run-tests.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/vendor
/.idea
build
composer.lock
vendor
.phpunit.result.cache
coverage
.phpunit.result.cache
composer.phar
composer.lock
.DS_Store
database.sqlite
30 changes: 15 additions & 15 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
filter:
excluded_paths: [tests/*]
excluded_paths: [tests/*]

checks:
php:
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
php:
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

5 changes: 1 addition & 4 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
preset: laravel

disabled:
- single_class_element_per_statement
preset: laravel
21 changes: 0 additions & 21 deletions CHANGELOG.md

This file was deleted.

File renamed without changes.
52 changes: 32 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "beyondcode/laravel-websockets",
"description": "An easy to use WebSocket server",
"description": "An easy to launch a Pusher-compatible WebSockets server for Laravel.",
"keywords": [
"beyondcode",
"laravel-websockets"
"laravel-websockets",
"laravel",
"php"
],
"homepage": "https://github.com/beyondcode/laravel-websockets",
"license": "MIT",
"homepage": "https://github.com/beyondcode/laravel-websockets",
"authors": [
{
"name": "Marcel Pociot",
Expand All @@ -19,48 +21,58 @@
"email": "[email protected]",
"homepage": "https://spatie.be",
"role": "Developer"
},
{
"name": "Alex Renoki",
"homepage": "https://github.com/rennokki",
"role": "Developer"
}
],
"require": {
"php": "^7.2",
"ext-json": "*",
"cboden/ratchet": "^0.4.1",
"clue/redis-react": "^2.3",
"doctrine/dbal": "^2.9",
"evenement/evenement": "^2.0|^3.0",
"facade/ignition-contracts": "^1.0",
"guzzlehttp/psr7": "^1.5",
"illuminate/broadcasting": "^6.0|^7.0|^8.0",
"illuminate/console": "^6.0|^7.0|^8.0",
"illuminate/http": "^6.0|^7.0|^8.0",
"illuminate/routing": "^6.0|^7.0|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0",
"pusher/pusher-php-server": "^3.0|^4.0",
"react/dns": "^1.1",
"react/http": "^1.1",
"illuminate/broadcasting": "^6.3|^7.0|^8.0",
"illuminate/console": "^6.3|7.0|^8.0",
"illuminate/http": "^6.3|^7.0|^8.0",
"illuminate/queue": "^6.3|^7.0|^8.0",
"illuminate/routing": "^6.3|^7.0|^8.0",
"illuminate/support": "^6.3|^7.0|^8.0",
"pusher/pusher-php-server": "^4.0",
"react/promise": "^2.0",
"symfony/http-kernel": "^4.0|^5.0",
"symfony/psr-http-message-bridge": "^1.1|^2.0"
},
"require-dev": {
"mockery/mockery": "^1.3",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"clue/block-react": "^1.4",
"laravel/legacy-factories": "^1.1",
"orchestra/testbench-browser-kit": "^4.0|^5.0|^6.0",
"orchestra/database": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^8.0|^9.0"
},
"suggest": {
"ext-pcntl": "Running the server needs pcntl to listen to command signals and soft-shutdown."
},
"autoload": {
"psr-4": {
"BeyondCode\\LaravelWebSockets\\": "src"
"BeyondCode\\LaravelWebSockets\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"BeyondCode\\LaravelWebSockets\\Tests\\": "tests"
"BeyondCode\\LaravelWebSockets\\Test\\": "tests"
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"

"test": "vendor/bin/phpunit"
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"extra": {
"laravel": {
"providers": [
Expand Down
Loading

0 comments on commit 1163078

Please sign in to comment.