PHPackages                             diegograssato/sf-api-problem - 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. diegograssato/sf-api-problem

ActiveLibrary[API Development](/categories/api)

diegograssato/sf-api-problem
============================

A Symfony compatible response for the IETF Problem Details for HTTP APIs RFC

1.0(9y ago)020[2 issues](https://github.com/diegograssato/sf-api-problem/issues)BSD-3-ClausePHP

Since Jul 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/diegograssato/sf-api-problem)[ Packagist](https://packagist.org/packages/diegograssato/sf-api-problem)[ RSS](/packages/diegograssato-sf-api-problem/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Symfony API Problem
===================

[](#symfony-api-problem)

Introduction
------------

[](#introduction)

This library supplies a Symfony 3 compatible Response class, that accepts an ApiProblem object and returns a JSON object compilant with the [Problem Details for HTTP APIs](http://tools.ietf.org/html/draft-nottingham-http-problem-06) specification.

It is based on, and uses the ApiProblem class from, the [ZF Campus `zf-api-problem`](https://github.com/zfcampus/zf-api-problem) library for Zend Framework 2.

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

[](#installation)

Run the following command to install using `composer`:

```
$ composer require "diegograssato/sf-api-problem:~1.0"
```

Or add the following line to your `composer.json`:

```
"require": {
    "diegograssato/sf-api-problem": "~1.0"
}
```

Usage
-----

[](#usage)

```
use DTUX\ApiProblem\ApiProblem;
use DTUX\ApiProblem\ApiProblemResponse;

class FakeController
{

    public function fetch($id)
    {
        $entity = $this->service->fetch($id);

        if (!$entity) {
            return new ApiProblemResponse(new ApiProblem(404, 'Entity not found'));
        }

        return $entity;
    }
}
```

Configure listener

```
services:
    you_bundle.kernel.listener.api_exception:
        class: DTUX\ApiProblem\EventListener\ApiExceptionListener
        arguments:
          - '@logger'
        tags:
          - { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
```

License
-------

[](#license)

This project is released under the BSD 3-Clause license, and is based on parts of the [ZF Campus `zf-api-problem`](https://github.com/zfcampus/zf-api-problem) library for Zend Framework 2.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

3648d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b396bcf6b27ea68c6ced40ddab79457c1d7b9d7932ed90d62f234ad2553d1a2?d=identicon)[diego.grassato](/maintainers/diego.grassato)

---

Top Contributors

[![grassato](https://avatars.githubusercontent.com/u/17568672?v=4)](https://github.com/grassato "grassato (2 commits)")

### Embed Badge

![Health badge](/badges/diegograssato-sf-api-problem/health.svg)

```
[![Health](https://phpackages.com/badges/diegograssato-sf-api-problem/health.svg)](https://phpackages.com/packages/diegograssato-sf-api-problem)
```

###  Alternatives

[overblog/activemq-bundle

OverBlog ActiveMQ Bundle

1042.7k](/packages/overblog-activemq-bundle)

PHPackages © 2026

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