Skip to content

Commit 2f79d9b

Browse files
committed
Improve
1 parent ddb7681 commit 2f79d9b

File tree

6 files changed

+94
-79
lines changed

6 files changed

+94
-79
lines changed

.remarkrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"plugins": [
33
"remark-preset-lint-consistent",
4-
"remark-preset-lint-recommended"
4+
"remark-preset-lint-recommended",
5+
[
6+
"remark-lint-list-item-indent",
7+
"space"
8+
]
59
]
610
}

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ include:
2323
Examples of unacceptable behavior by participants include:
2424

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

3434
## Our Responsibilities
3535

CONTRIBUTING.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
11
# Contributing
22

33
## Getting Started
4-
* Fork, then clone the repo:
4+
5+
* Fork, then clone the repo:
6+
57
```bash
68
git clone git@github.com:your-username/symfony-jsonrpc-http-server-doc.git
7-
````
9+
```
10+
11+
* Make sure everything goes well:
812

9-
* Make sure everything goes well:
1013
```bash
1114
make build
1215
make test
1316
```
1417

15-
* Make your changes (Add/Update tests according to your changes).
16-
* Make sure tests are still green:
18+
* Make your changes (Add/Update tests according to your changes).
19+
* Make sure tests are still green:
20+
1721
```bash
1822
make test
1923
```
2024

21-
* To check code coverage, launch
25+
* To check code coverage, launch
26+
2227
```bash
2328
make coverage
2429
```
2530

26-
* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server-doc/compare/).
27-
* Wait for feedback or merge.
31+
* Push to your fork and [submit a pull request](https://github.com/yoanm/symfony-jsonrpc-http-server-doc/compare/).
32+
* Wait for feedback or merge.
33+
34+
Some stuff that will increase your pull request's acceptance:
2835

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.
36+
* Write tests.
37+
* Follow PSR-2 coding style.
38+
* Write good commit messages.
39+
* Do not rebase or squash your commits when a review has been made.

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,13 @@ scrutinizer-behat:
109109
create-build-directories:
110110
mkdir -p ${PHPUNIT_COVERAGE_DIRECTORY} ${BEHAT_COVERAGE_DIRECTORY} ${REPORTS_DIRECTORY}
111111

112+
.PHONY: configure-dev-env
113+
configure-dev-env:
114+
npm install --global remark-cli remark-preset-lint-consistent remark-preset-lint-recommended remark-lint-list-item-indent
115+
116+
.PHONY: lint-markdown
117+
lint-markdown:
118+
npx remark . --output
119+
112120
.PHONY: build install configure test test-unit test-functional codestyle create-build-directories scrutinizer-behat scrutinizer-phpunit
113121
.DEFAULT: build

README.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ See [yoanm/symfony-jsonrpc-params-sf-constraints-doc](https://github.com/yoanm/s
2424

2525
## Availble formats
2626

27-
* Raw : Built-in `json` format at `/doc` or `/doc/raw.json`
28-
* Swagger : [yoanm/symfony-jsonrpc-http-server-swagger-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc)
29-
* OpenApi : [yoanm/symfony-jsonrpc-http-server-openapi-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc)
27+
* Raw : Built-in `json` format at `/doc` or `/doc/raw.json`
28+
* Swagger : [yoanm/symfony-jsonrpc-http-server-swagger-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc)
29+
* OpenApi : [yoanm/symfony-jsonrpc-http-server-openapi-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc)
3030

3131
## How to use
3232

@@ -38,45 +38,45 @@ See below how to configure it.
3838

3939
*[Behat demo app configuration folders](./features/demo_app/) can be used as examples.*
4040

41-
* Add the bundles in your `config/bundles.php` file:
42-
```php
43-
// config/bundles.php
44-
return [
45-
...
46-
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
47-
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
48-
Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
49-
...
50-
];
51-
```
52-
53-
* Add the following in your routing configuration :
54-
```yaml
55-
# config/routes.yaml
56-
json-rpc-endpoint:
57-
resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
58-
59-
json-rpc-endpoint-doc:
60-
resource: '@JsonRpcHttpServerDocBundle/Resources/config/routing/endpoint.xml'
61-
```
62-
63-
* Add the following in your configuration :
64-
```yaml
65-
# config/config.yaml
66-
framework:
67-
secret: '%env(APP_SECRET)%'
68-
69-
json_rpc_http_server: ~
70-
71-
json_rpc_http_server_doc: ~
72-
# Or the following in case you want to customize endpoint path
73-
#json_rpc_http_server_doc:
74-
# endpoint: '/my-custom-doc-endpoint' # Default to '/doc'
75-
```
76-
77-
* Register JSON-RPC methods as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.
78-
79-
* Query your project at `/doc` endpoint and you will have a `json` documentation of your server.
41+
* Add the bundles in your `config/bundles.php` file:
42+
```php
43+
// config/bundles.php
44+
return [
45+
...
46+
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
47+
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
48+
Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
49+
...
50+
];
51+
```
52+
53+
* Add the following in your routing configuration :
54+
```yaml
55+
# config/routes.yaml
56+
json-rpc-endpoint:
57+
resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
58+
59+
json-rpc-endpoint-doc:
60+
resource: '@JsonRpcHttpServerDocBundle/Resources/config/routing/endpoint.xml'
61+
```
62+
63+
* Add the following in your configuration :
64+
```yaml
65+
# config/config.yaml
66+
framework:
67+
secret: '%env(APP_SECRET)%'
68+
69+
json_rpc_http_server: ~
70+
71+
json_rpc_http_server_doc: ~
72+
# Or the following in case you want to customize endpoint path
73+
#json_rpc_http_server_doc:
74+
# endpoint: '/my-custom-doc-endpoint' # Default to '/doc'
75+
```
76+
77+
* Register JSON-RPC methods as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.
78+
79+
* Query your project at `/doc` endpoint and you will have a `json` documentation of your server.
8080

8181
## Contributing
8282

phpunit.xml.dist

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
43
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
65
backupStaticAttributes="false"
76
colors="true"
87
processIsolation="false"
@@ -24,22 +23,20 @@
2423

2524
bootstrap="vendor/autoload.php"
2625
>
27-
<listeners>
28-
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
29-
</listeners>
30-
31-
<testsuites>
32-
<testsuite name="functional">
33-
<directory>tests/Functional</directory>
34-
</testsuite>
35-
<testsuite name="technical">
36-
<directory>tests/Technical</directory>
37-
</testsuite>
38-
</testsuites>
39-
40-
<filter>
41-
<whitelist>
42-
<directory>src</directory>
43-
</whitelist>
44-
</filter>
26+
<coverage>
27+
<include>
28+
<directory>src</directory>
29+
</include>
30+
</coverage>
31+
<listeners>
32+
<listener class="Yoanm\PhpUnitExtended\Listener\YoanmTestsStrategyListener"/>
33+
</listeners>
34+
<testsuites>
35+
<testsuite name="functional">
36+
<directory>tests/Functional</directory>
37+
</testsuite>
38+
<testsuite name="technical">
39+
<directory>tests/Technical</directory>
40+
</testsuite>
41+
</testsuites>
4542
</phpunit>

0 commit comments

Comments
 (0)