Skip to content

Commit 13885b5

Browse files
committed
Initial commit
0 parents  commit 13885b5

File tree

7 files changed

+744
-0
lines changed

7 files changed

+744
-0
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on: [push,pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Validate composer.json and composer.lock
16+
run: composer validate --strict
17+
18+
- name: Cache Composer packages
19+
id: composer-cache
20+
uses: actions/cache@v3
21+
with:
22+
path: vendor
23+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-php-
26+
27+
- name: Install dependencies
28+
run: composer install --prefer-dist --no-progress
29+
30+
- name: Run test suite
31+
run: composer run-script test .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/.idea
2+
/composer.lock
3+
/vendor

LICENSE.md

Lines changed: 636 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# yocLib - JSON-RPC (PHP)
2+
3+
This yocLibrary enables your project to encode and decode JSON-RPC messages in PHP.
4+
5+
## Status
6+
7+
[![CI](https://github.com/yocto/yoclib-jsonrpc-php/actions/workflows/ci.yml/badge.svg)](https://github.com/yocto/yoclib-jsonrpc-php/actions/workflows/ci.yml)
8+
9+
## Installation
10+
11+
`composer require yocto/yoclib-jsonrpc`
12+
13+
## Use
14+
15+
### Serialization
16+
17+
```php
18+
19+
```
20+
21+
### Deserialization
22+
23+
```php
24+
25+
```

composer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "yocto/yoclib-jsonrpc",
3+
"type": "library",
4+
"description": "This yocLibrary enables your project to encode and decode JSON-RPC messages in PHP.",
5+
"keywords":[
6+
"composer",
7+
"json",
8+
"json-rpc",
9+
"jsonrpc",
10+
"php",
11+
"rpc",
12+
"yocto",
13+
"yoclib"
14+
],
15+
"license": "GPL-3.0-or-later",
16+
"require": {
17+
"php": "^7||^8"
18+
},
19+
"require-dev": {
20+
"phpunit/phpunit": "^7||^8||^9"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"YOCLIB\\JSONRPC\\": "src/"
25+
}
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"YOCLIB\\JSONRPC\\Tests\\": "tests/"
30+
}
31+
},
32+
"scripts": {
33+
"test": "phpunit"
34+
}
35+
}

src/Message.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
namespace YOCLIB\JSONRPC;
3+
4+
class Message{
5+
6+
}

tests/MessageTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
namespace YOCLIB\JSONRPC\Tests;
3+
4+
use PHPUnit\Framework\TestCase;
5+
6+
class MessageTest extends TestCase{
7+
8+
}

0 commit comments

Comments
 (0)