Skip to content

Commit 76c682d

Browse files
committed
Bump everything
1 parent f9ecfd4 commit 76c682d

19 files changed

+316
-142
lines changed

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text eol=lf
3+
/.gitattributes export-ignore
4+
/.gitignore export-ignore
5+
/.github export-ignore
6+
/phpcs.xml.dist export-ignore
7+
/phpstan.neon.dist export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/psalm.xml.dist export-ignore
10+
/tests export-ignore
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Coding Standards"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
coding-standards:
11+
name: "Coding Standards"
12+
runs-on: "ubuntu-20.04"
13+
14+
strategy:
15+
matrix:
16+
php-version:
17+
- "7.4"
18+
19+
steps:
20+
- name: "Checkout"
21+
uses: "actions/checkout@v2"
22+
23+
- name: "Install PHP"
24+
uses: "shivammathur/setup-php@v2"
25+
with:
26+
coverage: "none"
27+
php-version: "${{ matrix.php-version }}"
28+
tools: "cs2pr"
29+
30+
- name: "Install dependencies with Composer"
31+
uses: "ramsey/composer-install@v1"
32+
33+
- name: "Run PHP_CodeSniffer"
34+
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "CI"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
schedule:
9+
- cron: "42 3 * * *"
10+
11+
jobs:
12+
phpunit:
13+
name: "PHPUnit"
14+
runs-on: "ubuntu-20.04"
15+
16+
strategy:
17+
matrix:
18+
php-version:
19+
- "7.4"
20+
- "8.0"
21+
dependencies:
22+
- "highest"
23+
include:
24+
- dependencies: "lowest"
25+
php-version: "7.4"
26+
27+
steps:
28+
- name: "Checkout"
29+
uses: "actions/checkout@v2"
30+
with:
31+
fetch-depth: 2
32+
33+
- name: "Install PHP"
34+
uses: "shivammathur/setup-php@v2"
35+
with:
36+
php-version: "${{ matrix.php-version }}"
37+
coverage: "pcov"
38+
ini-values: "zend.assertions=1"
39+
40+
- name: "Install dependencies with Composer"
41+
uses: "ramsey/composer-install@v1"
42+
with:
43+
dependency-versions: "${{ matrix.dependencies }}"
44+
45+
- name: "Run PHPUnit"
46+
run: "vendor/bin/phpunit --coverage-clover=coverage.xml"
47+
48+
- name: "Upload coverage file"
49+
uses: "actions/upload-artifact@v2"
50+
with:
51+
name: "phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
52+
path: "coverage.xml"
53+
54+
upload_coverage:
55+
name: "Upload coverage to Codecov"
56+
runs-on: "ubuntu-20.04"
57+
needs:
58+
- "phpunit"
59+
60+
steps:
61+
- name: "Checkout"
62+
uses: "actions/checkout@v2"
63+
with:
64+
fetch-depth: 2
65+
66+
- name: "Download coverage files"
67+
uses: "actions/download-artifact@v2"
68+
with:
69+
path: "reports"
70+
71+
- name: "Upload to Codecov"
72+
uses: "codecov/codecov-action@v1"
73+
with:
74+
directory: reports

.github/workflows/static-analysis.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "Static Analysis"
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "master"
8+
9+
jobs:
10+
static-analysis-phpstan:
11+
name: "Static Analysis with PHPStan"
12+
runs-on: "ubuntu-20.04"
13+
14+
strategy:
15+
matrix:
16+
php-version:
17+
- "7.4"
18+
19+
steps:
20+
- name: "Checkout code"
21+
uses: "actions/checkout@v2"
22+
23+
- name: "Install PHP"
24+
uses: "shivammathur/setup-php@v2"
25+
with:
26+
coverage: "none"
27+
php-version: "${{ matrix.php-version }}"
28+
tools: "cs2pr"
29+
30+
- name: "Install dependencies with Composer"
31+
uses: "ramsey/composer-install@v1"
32+
33+
- name: "Run a static analysis with phpstan/phpstan"
34+
run: "vendor/bin/phpstan --error-format=checkstyle | cs2pr"
35+
36+
static-analysis-psalm:
37+
name: "Static Analysis with Psalm"
38+
runs-on: "ubuntu-20.04"
39+
40+
strategy:
41+
matrix:
42+
php-version:
43+
- "7.4"
44+
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v2
48+
49+
- name: Psalm
50+
uses: docker://vimeo/psalm-github-actions:4.3.2
51+
with:
52+
args: --shepherd
53+
composer_require_dev: true
54+
security_analysis: true
55+
report_file: results.sarif
56+
- name: Upload Security Analysis results to GitHub
57+
uses: github/codeql-action/upload-sarif@v1
58+
with:
59+
sarif_file: results.sarif

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
/vendor/
21
/.phpcs-cache
32
/.phpunit.result.cache
43
/composer.lock
54
/phpcs.xml
65
/phpstan.neon
6+
/psalm.xml
77
/phpunit.xml
8+
/vendor/

.scrutinizer.yml

-32
This file was deleted.

.travis.yml

-56
This file was deleted.

LICENCE

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
License
2+
=======
3+
4+
This work is published under the MIT license (see full statement below).
5+
If you want to deal (as described below) only with a part of this work,
6+
you have to include this license in the part itself.
7+
8+
The MIT License (MIT)
9+
---------------------
10+
11+
Copyright (c) 2014-2015 Vašek Purchart
12+
13+
Permission is hereby granted, free of charge, to any person obtaining a copy
14+
of this software and associated documentation files (the "Software"), to deal
15+
in the Software without restriction, including without limitation the rights
16+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17+
copies of the Software, and to permit persons to whom the Software is
18+
furnished to do so, subject to the following conditions:
19+
20+
The above copyright notice and this permission notice shall be included in
21+
all copies or substantial portions of the Software.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
29+
THE SOFTWARE.
30+

README.md

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,38 @@
11
# JSON RPC 2.0 PSR-7 Message Factory
22

3-
[![Build Status](https://travis-ci.com/simpod/json-rpc.svg?branch=master)](https://travis-ci.com/simpod/json-rpc)
4-
[![Downloads](https://poser.pugx.org/simpod/json-rpc/d/total.svg)](https://packagist.org/packages/simpod/json-rpc)
5-
[![Packagist](https://poser.pugx.org/simpod/json-rpc/v/stable.svg)](https://packagist.org/packages/simpod/json-rpc)
6-
[![Licence](https://poser.pugx.org/simpod/json-rpc/license.svg)](https://packagist.org/packages/simpod/json-rpc)
7-
[![Quality Score](https://scrutinizer-ci.com/g/simpod/json-rpc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/simpod/json-rpc)
8-
[![Code Coverage](https://scrutinizer-ci.com/g/simpod/json-rpc/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/simpod/json-rpc)
3+
[![GitHub Actions][GA Image]][GA Link]
4+
[![Shepherd Type][Shepherd Image]][Shepherd Link]
5+
[![Code Coverage][Coverage Image]][CodeCov Link]
6+
[![Downloads][Downloads Image]][Packagist Link]
7+
[![Packagist][Packagist Image]][Packagist Link]
8+
[![Infection MSI][Infection Image]][Infection Link]
9+
10+
## Installation
11+
12+
Add as [Composer](https://getcomposer.org/) dependency:
13+
14+
```sh
15+
composer require simpod/json-rpc
16+
```
17+
18+
[GA Image]: https://github.com/simPod/PhpJsonRpc/workflows/CI/badge.svg
19+
20+
[GA Link]: https://github.com/simPod/PhpJsonRpc/actions?query=workflow%3A%22CI%22+branch%3Amaster
21+
22+
[Shepherd Image]: https://shepherd.dev/github/simPod/PhpJsonRpc/coverage.svg
23+
24+
[Shepherd Link]: https://shepherd.dev/github/simPod/PhpJsonRpc
25+
26+
[Coverage Image]: https://codecov.io/gh/simPod/PhpJsonRpc/branch/master/graph/badge.svg
27+
28+
[CodeCov Link]: https://codecov.io/gh/simPod/PhpJsonRpc/branch/master
29+
30+
[Downloads Image]: https://poser.pugx.org/simpod/json-rpc/d/total.svg
31+
32+
[Packagist Image]: https://poser.pugx.org/simpod/json-rpc/v/stable.svg
33+
34+
[Packagist Link]: https://packagist.org/packages/simpod/json-rpc
35+
36+
[Infection Image]: https://badge.stryker-mutator.io/github.com/simPod/PhpJsonRpc/master
37+
38+
[Infection Link]: https://infection.github.io

composer.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
},
1818
"require": {
19-
"php": "^7.2",
19+
"php": "^7.4 || ^8.0",
2020
"ext-json": "*",
2121
"nyholm/psr7": "^1.2",
2222
"php-http/httplug": "^2.0",
@@ -25,14 +25,17 @@
2525
"thecodingmachine/safe": "^1.0.2"
2626
},
2727
"require-dev": {
28-
"doctrine/coding-standard": "^6.0",
28+
"cdn77/coding-standard": "^4.0",
29+
"hectorj/safe-php-psalm-plugin": "dev-master#b60ed45a06d5246e2efd193ce9c8940b244d5c7d",
2930
"jakub-onderka/php-parallel-lint": "^1.0",
3031
"phpstan/extension-installer": "^1.0",
31-
"phpstan/phpstan": "^0.11.16",
32-
"phpstan/phpstan-phpunit": "^0.11.2",
33-
"phpstan/phpstan-strict-rules": "^0.11.1",
34-
"phpunit/phpunit": "^8.4",
35-
"thecodingmachine/phpstan-safe-rule": "^1.0"
32+
"phpstan/phpstan": "0.12.81",
33+
"phpstan/phpstan-phpunit": "0.12.18",
34+
"phpstan/phpstan-strict-rules": "^0.12.7",
35+
"phpunit/phpunit": "^9.5",
36+
"psalm/plugin-phpunit": "0.15.1",
37+
"thecodingmachine/phpstan-safe-rule": "^1.0",
38+
"vimeo/psalm": "4.6.3"
3639
},
3740
"config": {
3841
"sort-packages": true

0 commit comments

Comments
 (0)