Skip to content

Commit 76b1eb1

Browse files
authored
Remark - MD lint (#80)
MD lint
1 parent a5fe1f3 commit 76b1eb1

6 files changed

+114
-96
lines changed

.remarkignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor

.remarkrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"plugins": [
3+
"remark-preset-lint-consistent",
4+
"remark-preset-lint-recommended"
5+
]
6+
}

CHANGELOG-3.1.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44

55
### PHP Versions
66

7-
* 🗑️ Drop PHP 7.2 support
7+
* 🗑️ Drop PHP 7.2 support
88

9-
* ✔️ PHP 7.3
9+
* ✔️ PHP 7.3
1010

11-
* ✔️ PHP 7.4
11+
* ✔️ PHP 7.4
1212

13-
* 🚀 Add PHP 8.0
13+
* 🚀 Add PHP 8.0
1414

15-
* 🚀 Add PHP 8.1
15+
* 🚀 Add PHP 8.1
1616

17-
* 🧪 Set PHP 8.2 for nightly
17+
* 🧪 Set PHP 8.2 for nightly
1818

1919
### Symfony Versions
2020

21-
* ✔️ Symfony 4.4
21+
* ✔️ Symfony 4.4
2222

23-
* ✔️ Symfony 5.4
23+
* ✔️ Symfony 5.4
2424

25-
* 🧪 Set Symfony 6.0 for nightly
25+
* 🧪 Set Symfony 6.0 for nightly
2626

2727
### Chore
2828

29-
* ✏️ Add EditorConfig files
29+
* ✏️ Add EditorConfig files
3030

31-
* :octocat: Move CI from Travis to Github Action
31+
* :octocat: Move CI from Travis to Github Action
3232

33-
* 📊 Configure CodeCov
33+
* 📊 Configure CodeCov
3434

35-
* 🔬 Configure Codacy
35+
* 🔬 Configure Codacy

CODE_OF_CONDUCT.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

CONTRIBUTING.md

+34-30
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
# Contributing
22

33
## Getting Started
4-
* Fork, then clone the repo:
5-
```bash
6-
git clone [email protected]:your-username/symfony-jsonrpc-http-server.git
7-
````
8-
9-
* Make sure everything goes well:
10-
```bash
11-
make build
12-
make test
13-
```
14-
15-
* Make your changes (Add/Update tests according to your changes).
16-
* Make sure tests are still green:
17-
```bash
18-
make test
19-
```
20-
21-
* To check code coverage, launch
22-
```bash
23-
make coverage
24-
```
25-
26-
* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server/compare/).
27-
* Wait for feedback or merge.
28-
29-
Some stuff that will increase your pull request's acceptance:
30-
* Write tests.
31-
* Follow PSR-2 coding style.
32-
* Write good commit messages.
33-
* Do not rebase or squash your commits when a review has been made.
4+
5+
* Fork, then clone the repo:
6+
```bash
7+
git clone [email protected]:your-username/symfony-jsonrpc-http-server.git
8+
```
9+
10+
* Make sure everything goes well:
11+
```bash
12+
make build
13+
make test
14+
```
15+
16+
* Make your changes (Add/Update tests according to your changes).
17+
18+
* Make sure tests are still green:
19+
```bash
20+
make test
21+
```
22+
23+
* To check code coverage, launch
24+
```bash
25+
make coverage
26+
```
27+
28+
* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server/compare/).
29+
30+
* Wait for feedback or merge.
31+
32+
Some stuff that will increase your pull request's acceptance:
33+
34+
* Write tests.
35+
* Follow PSR-2 coding style.
36+
* Write good commit messages.
37+
* Do not rebase or squash your commits when a review has been made.

README.md

+47-40
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Symfony JSON-RPC server
2+
23
[![License](https://img.shields.io/github/license/yoanm/symfony-jsonrpc-http-server.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server)
34
[![Code size](https://img.shields.io/github/languages/code-size/yoanm/symfony-jsonrpc-http-server.svg)](https://github.com/yoanm/symfony-jsonrpc-http-server)
4-
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=yoanm/symfony-jsonrpc-http-server)](https://dependabot.com)
5+
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\&repo=yoanm/symfony-jsonrpc-http-server)](https://dependabot.com)
56

6-
[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/symfony-jsonrpc-http-server.svg?label=Scrutinizer&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server/build-status/master)
7+
[![Scrutinizer Build Status](https://img.shields.io/scrutinizer/build/g/yoanm/symfony-jsonrpc-http-server.svg?label=Scrutinizer\&logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server/build-status/master)
78
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/yoanm/symfony-jsonrpc-http-server/master.svg?logo=scrutinizer)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server/?branch=master)
8-
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8f39424add044b43a70bdb238e2f48db)](https://www.codacy.com/gh/yoanm/symfony-jsonrpc-http-server/dashboard?utm_source=github.com&utm_medium=referral&utm_content=yoanm/symfony-jsonrpc-http-server&utm_campaign=Badge_Grade)
9+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8f39424add044b43a70bdb238e2f48db)](https://www.codacy.com/gh/yoanm/symfony-jsonrpc-http-server/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=yoanm/symfony-jsonrpc-http-server\&utm_campaign=Badge_Grade)
910

1011
[![CI](https://github.com/yoanm/symfony-jsonrpc-http-server/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/yoanm/symfony-jsonrpc-http-server/actions/workflows/CI.yml)
1112
[![codecov](https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server/branch/master/graph/badge.svg?token=NHdwEBUFK5)](https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server)
@@ -24,12 +25,13 @@ See [yoanm/symfony-jsonrpc-http-server-doc](https://github.com/yoanm/symfony-jso
2425

2526
## Versions
2627

27-
- Symfony v3/4 - PHP >=7.1 : `^2.0`
28+
* Symfony v3/4 - PHP >=7.1 : `^2.0`
29+
30+
⚠️⚠️ `v2.1.0` and `v2.1.1` were badly taggued, used `v3.0.0` instead ! ⚠️⚠️
2831

29-
⚠️⚠️ `v2.1.0` and `v2.1.1` were badly taggued, used `v3.0.0` instead ! ⚠️⚠️
32+
* Symfony v4/5 - PHP >=7.2 : `~3.0.0`
3033

31-
- Symfony v4/5 - PHP >=7.2 : `~3.0.0`
32-
- Symfony v4/5 - PHP >=7.3 : `^3.1`
34+
* Symfony v4/5 - PHP >=7.3 : `^3.1`
3335

3436
## How to use
3537

@@ -39,45 +41,48 @@ See below how to configure it.
3941

4042
## Configuration
4143

42-
Bundle requires only one thing :
43-
- JSON-RPC Methods which are compatible with [`yoanm/jsonrpc-server-sdk`](https://raw.githubusercontent.com/yoanm/php-jsonrpc-server-sdk)
44-
44+
Bundle requires only one thing :
45+
46+
* JSON-RPC Methods which are compatible with [`yoanm/jsonrpc-server-sdk`](https://raw.githubusercontent.com/yoanm/php-jsonrpc-server-sdk)
47+
4548
It comes with [built-in method resolver](./src/Resolver/MethodResolver.php) which use a [service locator](https://symfony.com/doc/3.4/service_container/service_subscribers_locators.html#defining-a-service-locator). Using a service locator allow to load (and so instanciate dependencies, dependencies of dependencies, etc) method only when required (usually only one method is required by request, except for batch requests which will load one or more methods).
46-
49+
4750
*[Behat demo app configuration folders](./features/demo_app/) can be used as examples.*
4851

49-
- Add the bundles in your `config/bundles.php` file:
50-
```php
51-
// config/bundles.php
52-
return [
53-
...
54-
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
55-
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
56-
...
57-
];
58-
```
59-
60-
- Add the following in your routing configuration :
61-
```yaml
62-
# config/routes.yaml
63-
json-rpc-endpoint:
64-
resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
65-
```
66-
67-
- Add the following in your configuration :
68-
```yaml
69-
# config/config.yaml
70-
framework:
71-
secret: '%env(APP_SECRET)%'
72-
73-
json_rpc_http_server: ~
74-
# Or the following in case you want to customize endpoint path
75-
#json_rpc_http_server:
76-
# endpoint: '/my-custom-endpoint' # Default to '/json-rpc'
77-
```
52+
* Add the bundles in your `config/bundles.php` file:
53+
```php
54+
// config/bundles.php
55+
return [
56+
...
57+
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
58+
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
59+
...
60+
];
61+
```
62+
63+
* Add the following in your routing configuration :
64+
```yaml
65+
# config/routes.yaml
66+
json-rpc-endpoint:
67+
resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
68+
```
69+
70+
* Add the following in your configuration :
71+
```yaml
72+
# config/config.yaml
73+
framework:
74+
secret: '%env(APP_SECRET)%'
75+
76+
json_rpc_http_server: ~
77+
# Or the following in case you want to customize endpoint path
78+
#json_rpc_http_server:
79+
# endpoint: '/my-custom-endpoint' # Default to '/json-rpc'
80+
```
7881

7982
### JSON-RPC Method mapping
83+
8084
In order to inject yours JSON-RPC method into the server add the tag `json_rpc_http_server.jsonrpc_method` and the key/value `method` like following example :
85+
8186
```yaml
8287
services:
8388
method-a.service-id:
@@ -88,6 +93,7 @@ services:
8893
```
8994

9095
### Methods mapping aware
96+
9197
In case you want to be aware of which methods are registered inside the JSON-RPC server, you can use the `json_rpc_http_server.method_aware`. Your class must implements `JsonRpcMethodAwareInterface`.
9298

9399
```php
@@ -121,4 +127,5 @@ mapping_aware_service:
121127
```
122128
123129
## Contributing
130+
124131
See [contributing note](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)