Skip to content

Commit

Permalink
Bump everything
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Mar 15, 2021
1 parent f9ecfd4 commit 76c682d
Show file tree
Hide file tree
Showing 19 changed files with 316 additions and 142 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text eol=lf
/.gitattributes export-ignore
/.gitignore export-ignore
/.github export-ignore
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml.dist export-ignore
/tests export-ignore
34 changes: 34 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Coding Standards"

on:
pull_request:
push:
branches:
- "master"

jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"

- name: "Run PHP_CodeSniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
74 changes: 74 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "CI"

on:
pull_request:
push:
branches:
- "master"
schedule:
- cron: "42 3 * * *"

jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.4"
- "8.0"
dependencies:
- "highest"
include:
- dependencies: "lowest"
php-version: "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run PHPUnit"
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"

- name: "Upload coverage file"
uses: "actions/upload-artifact@v2"
with:
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
path: "coverage.xml"

upload_coverage:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-20.04"
needs:
- "phpunit"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: "Download coverage files"
uses: "actions/download-artifact@v2"
with:
path: "reports"

- name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
with:
directory: reports
59 changes: 59 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Static Analysis"

on:
pull_request:
push:
branches:
- "master"

jobs:
static-analysis-phpstan:
name: "Static Analysis with PHPStan"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: "Checkout code"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"

static-analysis-psalm:
name: "Static Analysis with Psalm"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.4"

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Psalm
uses: docker://vimeo/psalm-github-actions:4.3.2
with:
args: --shepherd
composer_require_dev: true
security_analysis: true
report_file: results.sarif
- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/vendor/
/.phpcs-cache
/.phpunit.result.cache
/composer.lock
/phpcs.xml
/phpstan.neon
/psalm.xml
/phpunit.xml
/vendor/
32 changes: 0 additions & 32 deletions .scrutinizer.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

30 changes: 30 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
License
=======

This work is published under the MIT license (see full statement below).
If you want to deal (as described below) only with a part of this work,
you have to include this license in the part itself.

The MIT License (MIT)
---------------------

Copyright (c) 2014-2015 Vašek Purchart

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.

42 changes: 36 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
# JSON RPC 2.0 PSR-7 Message Factory

[![Build Status](https://travis-ci.com/simpod/json-rpc.svg?branch=master)](https://travis-ci.com/simpod/json-rpc)
[![Downloads](https://poser.pugx.org/simpod/json-rpc/d/total.svg)](https://packagist.org/packages/simpod/json-rpc)
[![Packagist](https://poser.pugx.org/simpod/json-rpc/v/stable.svg)](https://packagist.org/packages/simpod/json-rpc)
[![Licence](https://poser.pugx.org/simpod/json-rpc/license.svg)](https://packagist.org/packages/simpod/json-rpc)
[![Quality Score](https://scrutinizer-ci.com/g/simpod/json-rpc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simpod/json-rpc)
[![Code Coverage](https://scrutinizer-ci.com/g/simpod/json-rpc/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/simpod/json-rpc)
[![GitHub Actions][GA Image]][GA Link]
[![Shepherd Type][Shepherd Image]][Shepherd Link]
[![Code Coverage][Coverage Image]][CodeCov Link]
[![Downloads][Downloads Image]][Packagist Link]
[![Packagist][Packagist Image]][Packagist Link]
[![Infection MSI][Infection Image]][Infection Link]

## Installation

Add as [Composer](https://getcomposer.org/) dependency:

```sh
composer require simpod/json-rpc
```

[GA Image]: https://github.com/simPod/PhpJsonRpc/workflows/CI/badge.svg

[GA Link]: https://github.com/simPod/PhpJsonRpc/actions?query=workflow%3A%22CI%22+branch%3Amaster

[Shepherd Image]: https://shepherd.dev/github/simPod/PhpJsonRpc/coverage.svg

[Shepherd Link]: https://shepherd.dev/github/simPod/PhpJsonRpc

[Coverage Image]: https://codecov.io/gh/simPod/PhpJsonRpc/branch/master/graph/badge.svg

[CodeCov Link]: https://codecov.io/gh/simPod/PhpJsonRpc/branch/master

[Downloads Image]: https://poser.pugx.org/simpod/json-rpc/d/total.svg

[Packagist Image]: https://poser.pugx.org/simpod/json-rpc/v/stable.svg

[Packagist Link]: https://packagist.org/packages/simpod/json-rpc

[Infection Image]: https://badge.stryker-mutator.io/github.com/simPod/PhpJsonRpc/master

[Infection Link]: https://infection.github.io
17 changes: 10 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"require": {
"php": "^7.2",
"php": "^7.4 || ^8.0",
"ext-json": "*",
"nyholm/psr7": "^1.2",
"php-http/httplug": "^2.0",
Expand All @@ -25,14 +25,17 @@
"thecodingmachine/safe": "^1.0.2"
},
"require-dev": {
"doctrine/coding-standard": "^6.0",
"cdn77/coding-standard": "^4.0",
"hectorj/safe-php-psalm-plugin": "dev-master#b60ed45a06d5246e2efd193ce9c8940b244d5c7d",
"jakub-onderka/php-parallel-lint": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^0.11.16",
"phpstan/phpstan-phpunit": "^0.11.2",
"phpstan/phpstan-strict-rules": "^0.11.1",
"phpunit/phpunit": "^8.4",
"thecodingmachine/phpstan-safe-rule": "^1.0"
"phpstan/phpstan": "0.12.81",
"phpstan/phpstan-phpunit": "0.12.18",
"phpstan/phpstan-strict-rules": "^0.12.7",
"phpunit/phpunit": "^9.5",
"psalm/plugin-phpunit": "0.15.1",
"thecodingmachine/phpstan-safe-rule": "^1.0",
"vimeo/psalm": "4.6.3"
},
"config": {
"sort-packages": true
Expand Down
Loading

0 comments on commit 76c682d

Please sign in to comment.