PHPackages                             gwsn/prismic - 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. [Caching](/categories/caching)
4. /
5. gwsn/prismic

ActiveLibrary[Caching](/categories/caching)

gwsn/prismic
============

Cache Wrapper

0.3.1(8y ago)06901MITPHPPHP &gt;=7.1

Since Mar 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/gwsn/prismic)[ Packagist](https://packagist.org/packages/gwsn/prismic)[ RSS](/packages/gwsn-prismic/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (16)Used By (1)

Prismic.io Wrapper
------------------

[](#prismicio-wrapper)

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

[](#installation)

Require this package

```
composer require gwsn/prismic

```

Frameworks specific packages
----------------------------

[](#frameworks-specific-packages)

1. [Lumen/Laravel](https://github.com/gwsn/lumen-transformer)`composer require gwsn/lumen-transformer`
2. [Symfony](https://github.com/gwsn/symfony-transformer)`composer require gwsn/symfony-transformer`

Simple example
--------------

[](#simple-example)

Include the Transformer class:

`use Gwsn\Prismic\Transformer;`

In this use case we work only with arrays.

```
$source = [
    [
        'id'   => '1',
        'name' => 'Test 1',
        'type' => 'text',
        'text' => 'Some text written by Cicero that's used to fill spaces on.'
    ],
    [
        'id'   => '2',
        'name' => 'Test 2',
        'type' => 'short-text',
        'text' => 'The reason why it is difficult to understand is to draw attention away from the words on a page and to focus it on the design instead.'
    ],
    [
        'id'   => '3',
        'name' => 'Test 3',
        'type' => 'text',
        'text' => 'It's also useful for filling spaces where text should be because its words are about the same length as normal English writing.'
    ],
];

$mapping = [
    'guid' => 'id',
    'slug' => 'name',
    'type' => 'type',
    'text' => 'text',
];

$target = Transformer::run($source, Transformer::BuildMapping($mapping));

var_dump(json_encode($target));
output:

 [
     {
         guid: "1",
         slug: "Test Company mapper 1",
         type: "company",
         text: "asdasdfafa afad afads aadssafdf astext"
     },
     {
         guid: "2",
         slug: "Test Company mapper 2",
         type: "blog",
         text: "asdasdfafa afad afads aadssafdf astext"
     },
     {
         guid: "3",
         slug: "Test Company mapper 3",
         type: "company",
         text: "asdasdfafa afad afads aadssafdf astext"
     }
 ]

```

For the more advanced documentation about the usage you can find it here [documentation](https://github.com/gwsn/Transformer/tree/master/examples/usage.md)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

Every ~6 days

Recently: every ~13 days

Total

15

Last Release

2937d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3e5cd83f70397486ff0b162ed308296cf27346c8ebaaeed16b817ad324b9eeb?d=identicon)[xleeuwx](/maintainers/xleeuwx)

---

Top Contributors

[![jnovermars](https://avatars.githubusercontent.com/u/4355811?v=4)](https://github.com/jnovermars "jnovermars (19 commits)")

---

Tags

cachetools

### Embed Badge

![Health badge](/badges/gwsn-prismic/health.svg)

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

###  Alternatives

[psr/simple-cache

Common interfaces for simple caching

8.1k757.1M2.6k](/packages/psr-simple-cache)[psr/cache

Common interface for caching libraries

5.2k712.8M1.6k](/packages/psr-cache)[react/cache

Async, Promise-based cache interface for ReactPHP

445124.5M44](/packages/react-cache)[beste/in-memory-cache

A PSR-6 In-Memory cache that can be used as a fallback implementation and/or in tests.

2514.6M10](/packages/beste-in-memory-cache)[fastd/fastd

A High Performance API Framework By Swoole Extension

42015.4k18](/packages/fastd-fastd)[anahkiasen/flatten

A package for the Illuminate framework that flattens pages to plain HTML

33113.0k](/packages/anahkiasen-flatten)

PHPackages © 2026

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