PHPackages                             sensiolabs/insight - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sensiolabs/insight

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sensiolabs/insight
==================

SymfonyInsight SDK

v1.11.1(1y ago)8117.8k36[4 issues](https://github.com/symfonycorp/insight/issues)[2 PRs](https://github.com/symfonycorp/insight/pulls)MITPHPPHP &gt;=7.2CI failing

Since Aug 22Pushed 8mo ago11 watchersCompare

[ Source](https://github.com/symfonycorp/insight)[ Packagist](https://packagist.org/packages/sensiolabs/insight)[ Fund](https://tidelift.com/funding/github/packagist/symfonycorp/connect)[ RSS](/packages/sensiolabs-insight/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (25)Used By (0)

SymfonyInsight SDK
==================

[](#symfonyinsight-sdk)

About
-----

[](#about)

This is the official SDK for the [SymfonyInsight](https://insight.symfony.com/) API.

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

[](#installation)

To install the SDK, run the command below and you will get the latest version:

```
composer require sensiolabs/insight

```

Command Line Tool
-----------------

[](#command-line-tool)

The easiest way to use the SymfonyInsight API is via the built-in command line tool.

A phar version of the command line tool exists to avoid installation of this project. Download it, then use it like the command line tool:

```
$ curl -o insight.phar -s https://get.insight.symfony.com/insight.phar
# or
$ wget https://get.insight.symfony.com/insight.phar

# Then
$ php insight.phar

```

List all the projects in your account:

```
$ php insight.phar projects

```

The first time, you will be prompted for your SymfonyInsight API key and user UUID (which can be found under the ["Account" section](https://insight.symfony.com/account) on the website).

These information are then stored locally, but can still be overridden via the `--api-token` and `--user-uuid` options.

To run an analysis:

```
$ php insight.phar analyze UUID

```

where `UUID` is the UUID of the project you want to analyze (the UUIDs are listed by the `projects` command).

To export an analysis report:

```
$ php insight.phar analysis UUID --format="xml" # or --format="json" or --format="pmd"

```

Configuration
-------------

[](#configuration)

```
use SensioLabs\Insight\Sdk\Api;

$api = new Api(array(
    'api_token' => 'your api token',
    'user_uuid' => 'your user uuid',
));

```

Usage
-----

[](#usage)

### List all projects:

[](#list-all-projects)

```
$api->getProjects();
$api->getProjects(2); // For the second page

```

### Get a project:

[](#get-a-project)

```
$project = $api->getProject('project uuid');

```

### Update a project

[](#update-a-project)

```
$api->updateProject($project);

```

Note: If something went wrong, see *Error management* section

### Post a project

[](#post-a-project)

```
use SensioLabs\Insight\Sdk\Model\Project;

$project = new Project();
$project
    ->setName('Foo')
    ->setDescription('Foo')
    ->setType(TYPE_WEBSITE::TYPE_WEBSITE)
;

$api->createProject($project)

```

Note: If something went wrong, see *Error management* section

### Run an analysis

[](#run-an-analysis)

```
// on the default branch
$api->analyze('project uuid', 'master');

// for a specific branch or reference
$api->analyze('project uuid', '1.0');

```

### Get all analyses

[](#get-all-analyses)

```
$api->getAnalyses('project uuid');

// for a specific branch
$api->getAnalyses('project uuid', 'branch name');

```

### Get an analysis

[](#get-an-analysis)

```
$api->getAnalysis('project uuid', 'analysis id');

```

### Get a status analysis

[](#get-a-status-analysis)

```
$api->getAnalysisStatus('project uuid', 'analysis id');

```

### Error management

[](#error-management)

If something went wrong, an `SensioLabs\Insight\Sdk\Exception\ExceptionInterface` will be throw:

- `ApiClientException` If you did something wrong. This exception contains the previous exception throw by guzzle. You can easily check if it is a:
    - 403: In this case, check your credentials
    - 404: In this case, check your request
    - 400: In this case, check the data sent. In this case, the Exception will contains a `SensioLabs\Insight\Sdk\Model\Error` object. Which will contains all form errors.
- `ApiServerException` If something went wrong with the API.

License
-------

[](#license)

This library is licensed under the MIT license.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance54

Moderate activity, may be stable

Popularity39

Limited adoption so far

Community28

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~215 days

Recently: every ~255 days

Total

19

Last Release

400d ago

PHP version history (2 changes)v1.7.0PHP &gt;=7.1

v1.8.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (82 commits)")[![tgalopin](https://avatars.githubusercontent.com/u/1651494?v=4)](https://github.com/tgalopin "tgalopin (46 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (16 commits)")[![tareqas](https://avatars.githubusercontent.com/u/20209780?v=4)](https://github.com/tareqas "tareqas (8 commits)")[![ValentineBoineau](https://avatars.githubusercontent.com/u/34517639?v=4)](https://github.com/ValentineBoineau "ValentineBoineau (6 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (5 commits)")[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (4 commits)")[![tucksaun](https://avatars.githubusercontent.com/u/870118?v=4)](https://github.com/tucksaun "tucksaun (4 commits)")[![brikou](https://avatars.githubusercontent.com/u/383212?v=4)](https://github.com/brikou "brikou (2 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (2 commits)")[![pyguerder](https://avatars.githubusercontent.com/u/6534215?v=4)](https://github.com/pyguerder "pyguerder (1 commits)")[![quentinus95](https://avatars.githubusercontent.com/u/8060564?v=4)](https://github.com/quentinus95 "quentinus95 (1 commits)")[![smnandre](https://avatars.githubusercontent.com/u/1359581?v=4)](https://github.com/smnandre "smnandre (1 commits)")[![thewilkybarkid](https://avatars.githubusercontent.com/u/1784740?v=4)](https://github.com/thewilkybarkid "thewilkybarkid (1 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (1 commits)")[![nicodmf](https://avatars.githubusercontent.com/u/173332?v=4)](https://github.com/nicodmf "nicodmf (1 commits)")[![csarrazi](https://avatars.githubusercontent.com/u/465798?v=4)](https://github.com/csarrazi "csarrazi (1 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (1 commits)")[![Im0rtality](https://avatars.githubusercontent.com/u/1804210?v=4)](https://github.com/Im0rtality "Im0rtality (1 commits)")[![jeromemacias](https://avatars.githubusercontent.com/u/582446?v=4)](https://github.com/jeromemacias "jeromemacias (1 commits)")

---

Tags

phpqualitysdksymfony

### Embed Badge

![Health badge](/badges/sensiolabs-insight/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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