Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed May 15, 2024
0 parents commit 13885b5
Show file tree
Hide file tree
Showing 7 changed files with 744 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on: [push,pull_request]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test .
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.idea
/composer.lock
/vendor
636 changes: 636 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yocLib - JSON-RPC (PHP)

This yocLibrary enables your project to encode and decode JSON-RPC messages in PHP.

## Status

[![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)

## Installation

`composer require yocto/yoclib-jsonrpc`

## Use

### Serialization

```php

```

### Deserialization

```php

```
35 changes: 35 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "yocto/yoclib-jsonrpc",
"type": "library",
"description": "This yocLibrary enables your project to encode and decode JSON-RPC messages in PHP.",
"keywords":[
"composer",
"json",
"json-rpc",
"jsonrpc",
"php",
"rpc",
"yocto",
"yoclib"
],
"license": "GPL-3.0-or-later",
"require": {
"php": "^7||^8"
},
"require-dev": {
"phpunit/phpunit": "^7||^8||^9"
},
"autoload": {
"psr-4": {
"YOCLIB\\JSONRPC\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"YOCLIB\\JSONRPC\\Tests\\": "tests/"
}
},
"scripts": {
"test": "phpunit"
}
}
6 changes: 6 additions & 0 deletions src/Message.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
namespace YOCLIB\JSONRPC;

class Message{

}
8 changes: 8 additions & 0 deletions tests/MessageTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
namespace YOCLIB\JSONRPC\Tests;

use PHPUnit\Framework\TestCase;

class MessageTest extends TestCase{

}

0 comments on commit 13885b5

Please sign in to comment.