PHPackages                             artyuum/symfony-jsend-response - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. artyuum/symfony-jsend-response

ActiveLibrary[API Development](/categories/api)

artyuum/symfony-jsend-response
==============================

JSendResponse component for HttpFoundation based applications (Symfony, Silex, Laravel, Drupal, etc.). It follows the JSend specification, allowing you to give consistent JSON responses to your users.

1.3.0(5mo ago)252.7k↓54.1%2MITPHPPHP ^7.4 || ^8.0

Since Apr 22Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/artyuum/JSendResponse)[ Packagist](https://packagist.org/packages/artyuum/symfony-jsend-response)[ RSS](/packages/artyuum-symfony-jsend-response/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

JSendResponse
=============

[](#jsendresponse)

JSendResponse component for [HttpFoundation](https://github.com/symfony/http-foundation) based applications (Symfony, Silex, Laravel, Drupal, etc.). It follows the [JSend](https://github.com/omniti-labs/jsend) specification, allowing you to give consistent JSON responses to your users.

**Note**: This repository is a maintened fork of [Junker/JSendResponse](https://github.com/Junker/JSendResponse). See the [releases page](https://github.com/artyuum/JSendResponse/releases) for modification history.

Requirements
------------

[](#requirements)

- PHP ^7.4 || ^8.0
- Symfony ^5.0 || ^6.0 || ^7.0

Installation
------------

[](#installation)

The best way to install JSendResponse is to use a [Composer](https://getcomposer.org/download):

```
composer require artyuum/symfony-jsend-response

```

Examples
--------

[](#examples)

```
use Junker\JSendResponse\JSendResponse;
use Junker\JSendResponse\JSendSuccessResponse;
use Junker\JSendResponse\JSendFailResponse;
use Junker\JSendResponse\JSendErrorResponse;

class AppController
{
	...

	$data = ['id' => 50, 'name' => 'Waldemar'];
	$message = 'Error, total error!';
	$code = 5;

	return new JSendResponse(JSendResponse::STATUS_SUCCESS, $data);
	// or
	return new JSendResponse(JSendResponse::STATUS_FAIL, $data);
	// or
	return new JSendResponse(JSendResponse::STATUS_ERROR, NULL, $message);
	// or
	return new JSendResponse(JSendResponse::STATUS_ERROR, $data, $message, $code);
	// or
	return new JSendSuccessResponse($data);
	// or
	return new JSendFailResponse($data);
	// or
	return new JSendErrorResponse($message);
	// or
	return new JSendErrorResponse($message, $code, $data);

}
```

Contributing
------------

[](#contributing)

If you'd like to contribute, please fork the repository and make changes as you'd like. Be sure to follow the same coding style &amp; naming used in this library to produce a consistent code.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance70

Regular maintenance activity

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~455 days

Total

4

Last Release

167d ago

PHP version history (2 changes)1.0.0PHP ^7.2 || ^8.0

1.2.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d57dc1e2de89690f5f7c75fa82af0a525cee76ddf5dd02ecbbe2652390f43b0?d=identicon)[Artyuum](/maintainers/Artyuum)

---

Top Contributors

[![artyuum](https://avatars.githubusercontent.com/u/17199757?v=4)](https://github.com/artyuum "artyuum (43 commits)")[![alexdmccabe](https://avatars.githubusercontent.com/u/6988721?v=4)](https://github.com/alexdmccabe "alexdmccabe (1 commits)")[![Junker](https://avatars.githubusercontent.com/u/1144095?v=4)](https://github.com/Junker "Junker (1 commits)")

---

Tags

responsejsonapisymfonydrupalsilexjsend

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/artyuum-symfony-jsend-response/health.svg)

```
[![Health](https://phpackages.com/badges/artyuum-symfony-jsend-response/health.svg)](https://phpackages.com/packages/artyuum-symfony-jsend-response)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[nilportugues/jsonapi-bundle

Symfony 2 &amp; 3 JSON API Transformer Package

11446.7k](/packages/nilportugues-jsonapi-bundle)[dragon-code/laravel-json-response

Automatically always return a response in JSON format

1119.1k1](/packages/dragon-code-laravel-json-response)[nilportugues/api-problems

PSR7 Response implementation for the Problem Details for HTTP APIs

1749.6k2](/packages/nilportugues-api-problems)[nicklaw5/larapi

A simple Laravel 5 class for handling json api responses.

111.5k](/packages/nicklaw5-larapi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
