PHPackages                             respectify/respectify-php - 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. respectify/respectify-php

ActiveLibrary[API Development](/categories/api)

respectify/respectify-php
=========================

PHP library for the Respectify API

0.5.0(1mo ago)0276MPL-2.0PHPPHP &gt;=7.4

Since Nov 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/Respectify/respectify-php)[ Packagist](https://packagist.org/packages/respectify/respectify-php)[ RSS](/packages/respectify-respectify-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (36)Versions (26)Used By (0)

respectify-php
==============

[](#respectify-php)

PHP library for the [Respectify API](https://docs.respectify.org). Respectify aims to improve internet discussions: encourage healthy, understanding discussion in comments and replies.

Getting started
---------------

[](#getting-started)

This contains the Respectify client, which is currently available only as an asychronous API using ReactPHP.

Check out `src/RespectifyClientAsync.php`. For info on the REST API that it wraps, have a look [here](https://docs.respectify.org).

If you are migrating from Google's Perspective API, use the dedicated Perspective compatibility sub-client:

```
$client->perspective()->analyzeComment([
    'comment' => ['text' => 'You clearly did not read the article.'],
    'requestedAttributes' => [
        'TOXICITY' => new stdClass(),
        'INSULT' => new stdClass(),
    ],
])->then(function ($result) {
    echo $result->attributeScores['TOXICITY']->summaryScore->value . "\n";
});

$client->run();
```

Developing
----------

[](#developing)

To be able to make changes:

```
$ brew install php
$ brew install composer
```

If you want to run unit tests:

```
$ composer require --dev phpunit/phpunit mockery/mockery vlucas/phpdotenv
```

and then to run tests:

```
$ vendor/bin/phpunit --bootstrap vendor/autoload.php tests
```

Tests are run against mocks, but there is value in running against the real API. Do do this create a tests/.venv file, with content:

```
USE_REAL_API=true
RESPECTIFY_EMAIL=you@example.com
RESPECTIFY_API_KEY=your-api-key-here
REAL_ARTICLE_ID=an-existing-article-id-here
```

using real Respectify credentials.

Docs
----

[](#docs)

Docs are generated in Markdown format for Docusaurus via the phpdocumentor-markdown-customised phpdoc theme. It is MIT-licensed. Please see the readme in that folder for more information.

You'll need `twig` and `php-documentor` installed (install the dev dependencies.)

If you have a `phpdoc` command available (eg, set up as a Docker container):

```
$ alias phpdoc="docker run --rm -v \"$(pwd)\":/data phpdoc/phpdoc:3"
```

then you can general doc like so:

```
# Run phpDocumentor with --template argument pointed to markdown template
$ phpdoc --directory=src --target=docs --template="phpdocumentor-markdown-customised/themes/markdown" --title="Respectify PHP Library" -c phpdoc.xml
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance92

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 88.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 ~23 days

Recently: every ~36 days

Total

25

Last Release

38d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8351450?v=4)[David Millington](/maintainers/vintagedave)[@vintagedave](https://github.com/vintagedave)

---

Top Contributors

[![vintagedave](https://avatars.githubusercontent.com/u/8351450?v=4)](https://github.com/vintagedave "vintagedave (109 commits)")[![respectify-dave](https://avatars.githubusercontent.com/u/194140465?v=4)](https://github.com/respectify-dave "respectify-dave (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/respectify-respectify-php/health.svg)

```
[![Health](https://phpackages.com/badges/respectify-respectify-php/health.svg)](https://phpackages.com/packages/respectify-respectify-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[ccxt/ccxt

A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go

43.2k341.0k1](/packages/ccxt-ccxt)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[team-reflex/discord-php

An unofficial API to interact with the voice and text service Discord.

1.1k420.9k26](/packages/team-reflex-discord-php)[gotenberg/gotenberg-php

A PHP client for interacting with Gotenberg, a developer-friendly API for converting numerous document formats into PDF files, and more!

3856.2M31](/packages/gotenberg-gotenberg-php)

PHPackages © 2026

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