Download the PHP package projectsaturnstudios/json-rpc without Composer

On this page you can find all versions of the php package projectsaturnstudios/json-rpc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package json-rpc

JSON-RPC Laravel Package

A Laravel package for implementing the JSON-RPC 2.0 protocol with elegant attribute-based routing and clean data handling.

Latest Version on Packagist Total Downloads

Features

Installation

Install the package via Composer:

The package will automatically register itself via Laravel's auto-discovery.

Quick Start

1. Create an RPC Controller

2. Register Your Controllers

Create a routes/rpc.php file in your Laravel application:

The package automatically loads this file and registers all your RPC methods.

3. Dispatch RPC Requests

Usage Examples

Basic Request/Response

Error Handling

Notifications (Fire and Forget)

Advanced Controller Example

Route Registration

Using routes/rpc.php (Recommended)

Create a routes/rpc.php file in your Laravel application:

Alternative: Manual Registration

If you prefer to register methods manually in a service provider:

Configuration

The package includes a basic configuration file. You can publish it with:

The configuration file config/rpc.php allows you to customize:

API Reference

RPCRequest

RPCResponse

Note: A response must contain either a result or an error, but not both.

RPCNotification

RPCErrorObject

Error Codes

Code Constant Description
-32700 PARSE_ERROR Invalid JSON was received
-32600 INVALID_REQUEST The JSON sent is not a valid Request object
-32601 METHOD_NOT_FOUND The method does not exist / is not available
-32602 INVALID_PARAMS Invalid method parameter(s)
-32603 INTERNAL_ERROR Internal JSON-RPC error
-32000 SERVER_ERROR Server error

Method Routing

The package supports hierarchical method routing:

Artisan Commands

List Registered Methods

You can view all registered RPC methods using the provided Artisan command:

This will display a formatted list of all registered methods and their corresponding controllers:

This command is useful for:

Testing

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

The MIT License (MIT). Please see License File for more information.

About Project Saturn Studios

This package is developed and maintained by Project Saturn Studios.


Need help? Check out the examples directory for more usage examples, or create an issue if you run into any problems!


All versions of json-rpc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
spatie/laravel-data Version ^4.11
lorisleiva/laravel-actions Version ^2.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package projectsaturnstudios/json-rpc contains the following files

Loading the files please wait ....