PHPackages                             tmilos/scim-schema - 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. tmilos/scim-schema

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

tmilos/scim-schema
==================

SCIM schema library

0.1(8y ago)141.4M—8.3%10[2 issues](https://github.com/tmilos/scim-schema/issues)[5 PRs](https://github.com/tmilos/scim-schema/pulls)3MITPHPCI failing

Since Nov 25Pushed 2y ago2 watchersCompare

[ Source](https://github.com/tmilos/scim-schema)[ Packagist](https://packagist.org/packages/tmilos/scim-schema)[ RSS](/packages/tmilos-scim-schema/feed)WikiDiscussions master Synced 1mo ago

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

Scim Schema
===========

[](#scim-schema)

SCIM schema PHP library with support for both v1 and v2.

> **Note:** This library is still work in progress, and you are welcome to help and contribute

> It was made by the specs from [SimpleCloud](http://www.simplecloud.info/) and by the example documents generated by [PowerDMS/Owin.Scim](https://github.com/PowerDMS/Owin.Scim)

> Do not miss [SCIM Filter Parser](https://github.com/tmilos/scim-filter-parser) !

[![Author](https://camo.githubusercontent.com/c66133f19d9fe3288aee0e4be5c2e4b63190edb4d032c77a58d62f29b4ca0c66/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d40746d696c6f732d626c75652e7376673f7374796c653d666c61742d737175617265)](https://twitter.com/tmilos77)[![Build Status](https://camo.githubusercontent.com/df16604e4919bf04ef602644f61b22e89e4d8cd423dec91ef83e1c5b1d793832/68747470733a2f2f7472617669732d63692e6f72672f746d696c6f732f7363696d2d736368656d612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tmilos/scim-schema)[![Coverage Status](https://camo.githubusercontent.com/c7dc24382b4bff678d0e0128d8b84c8fb856b2d0f8d7352e9910a0671b54ebd5/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f746d696c6f732f7363696d2d736368656d612f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/tmilos/scim-schema?branch=master)[![Quality Score](https://camo.githubusercontent.com/e3f6b4a2b04bb3e8f20f5afc5438a191046c7f9329d3c0598a8eee5c5c0ef916/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746d696c6f732f7363696d2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tmilos/scim-schema)[![License](https://camo.githubusercontent.com/b2d0fb4b044d79cb95250118e24978b99c564262550e72548fbeb7783b4f2a21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746d696c6f732f7363696d2d736368656d612e737667)](https://packagist.org/packages/tmilos/scim-schema)[![Packagist Version](https://camo.githubusercontent.com/5537aa185103c0bb435a10519428037c7bfc4c3972b0a81b7cc7e5b7aec5cff3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746d696c6f732f7363696d2d736368656d612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tmilos/scim-schema)

Install
=======

[](#install)

Install Scim Schema using composer:

```
composer require tmilos/scim-schema
```

Usage
=====

[](#usage)

### Schema

[](#schema)

Build default schema:

```
$schemaBuilder = new SchemaBuilderV2(); // or SchemaBuilderV1

$groupSchema = $schemaBuilder->getGroup();
$userSchema  = $schemaBuilder->getUser();
$enterpriseUserSchema = $schemaBuilder->getEnterpriseUser();
$schemaSchema = $schemaBuilder->getSchema();
$serviceProviderConfigSchema = $schemaBuilder->getServiceProviderConfig();
$resourceTypeSchema = $schemaBuilder->getResourceType();
```

Or build your own custom schema:

```
$schema = new Schema();

$schema->setName('CustomSchema');

$schema->addAttribute(
    AttributeBuilder::create('name', ScimConstants::ATTRIBUTE_TYPE_STRING, 'Name of the object')
        ->setMutability(false)
        ->getAttribute()
);
```

And serialize the scim schema object

```
$schema = (new SchemaBuilderV2())->getUser();

$schema->serializeObject();
```

### Schema validation

[](#schema-validation)

An object can be validated against a schema:

```
/** @var array $object */
$object = getTheObjectAsArray();

$validator = new SchemaValidator();
$objectSchema = getTheSchema();
$schemaExtensions = getSchemaExtensions();

$validationResult = $validator->validate(
    $object,
    $objectSchema,
    $schemaExtensions
);

if (!$validationResult->getErrors()) {
    // cool!
} else {
    print implode("\n", $validationResult->getErrorsAsStrings());
}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

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

3096d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e5954d541c3e6ce57f3674bd4ce58bf22629f70b8e8a8779aec754787d26e7e?d=identicon)[tmilos](/maintainers/tmilos)

---

Top Contributors

[![tmilos](https://avatars.githubusercontent.com/u/1818373?v=4)](https://github.com/tmilos "tmilos (13 commits)")[![kimql](https://avatars.githubusercontent.com/u/67367649?v=4)](https://github.com/kimql "kimql (1 commits)")[![rhertogh](https://avatars.githubusercontent.com/u/1292337?v=4)](https://github.com/rhertogh "rhertogh (1 commits)")[![stevebauman](https://avatars.githubusercontent.com/u/6421846?v=4)](https://github.com/stevebauman "stevebauman (1 commits)")

---

Tags

phpscimscim-2scim-schema

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tmilos-scim-schema/health.svg)

```
[![Health](https://phpackages.com/badges/tmilos-scim-schema/health.svg)](https://phpackages.com/packages/tmilos-scim-schema)
```

PHPackages © 2026

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