PHPackages                             johnkhansrc/api-platform-stream-translate-bundle - 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. johnkhansrc/api-platform-stream-translate-bundle

ActiveSymfony-bundle

johnkhansrc/api-platform-stream-translate-bundle
================================================

A lightweight extension allowing to translate in the ApiPlatform flow the values of the properties of an entity by a simple annotation.

3.2.0(2y ago)01.2k↓100%[1 issues](https://github.com/johnkhansrc/ApiPlatformStreamTranslateBundle/issues)MITPHPPHP ^8.3

Since Dec 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/johnkhansrc/ApiPlatformStreamTranslateBundle)[ Packagist](https://packagist.org/packages/johnkhansrc/api-platform-stream-translate-bundle)[ RSS](/packages/johnkhansrc-api-platform-stream-translate-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (7)Versions (19)Used By (0)

ApiPlatformStreamTranslateBundle
================================

[](#apiplatformstreamtranslatebundle)

A lightweight extension allowing to translate in the ApiPlatform flow the properties values of an entity by a simple annotation.

Requirements
------------

[](#requirements)

- symfony/translation &gt;=5.4
- api-platform/core: &gt;=2.5
- doctrine/annotations &gt;=1.0

Instalation
-----------

[](#instalation)

```
composer require johnkhansrc/api-platform-stream-translate-bundle

```

Update your services.yaml

```
# Using annotation
Johnkhansrc\ApiPlatformStreamTranslateBundle\EventListener\StreamTranslateAnnotationListener: ~

# Or Using attribute
Johnkhansrc\ApiPlatformStreamTranslateBundle\EventListener\StreamTranslateAttributeListener: ~
```

Usage
-----

[](#usage)

### Annotation

[](#annotation)

```
use Johnkhansrc\ApiPlatformStreamTranslateBundle\Annotation\StreamTranslate;

/**
 * @ApiResource
 * @ORM\Entity(repositoryClass=AnyEntityRepository::class)
 */
class AnyEntity
{
    /**
     * @ORM\Id
     */
    private $id;

    /**
     * Expect translation file anyDomain.xx.yaml who contain 'anykey' key
     *
     * @StreamTranslate(domain="anyDomain", key="anyKey")
     */
    private string $anyStringPropertyKeyBasedExample;

    /**
     * Expect translation file anyDomain.xx.yaml who contain property value as key
     *
     * @StreamTranslate(domain="anyDomain")
     */
    private string $anyStringPropertyNoKeyBasedExample;

    /**
     * * * NEW ON 2.0.0 * * *
     * Iterate on each embed relation, don't forget do annotate related class properties.
     * Tips: You can use different domain on related class property's annotation.
     *
     * @StreamTranslate(domain="anyDomain", childs=true)
     */
    private ArrayCollection $anyStringPropertyNoKeyBasedExample;
}
```

### Attribute

[](#attribute)

```
use Johnkhansrc\ApiPlatformStreamTranslateBundle\Attribute\StreamTranslate;

/**
 * @ApiResource
 * @ORM\Entity(repositoryClass=AnyEntityRepository::class)
 */
class AnyEntity
{
    /**
     * @ORM\Id
     */
    private $id;

    /**
     * Expect translation file anyDomain.xx.yaml who contain 'anykey' key
     */
     #[StreamTranslate(domain: "anyDomain", key: "anyKey")]
    private string $anyStringPropertyKeyBasedExample;

    /**
     * Expect translation file anyDomain.xx.yaml who contain property value as key
     */
     #[StreamTranslate(domain: "anyDomain")]
    private string $anyStringPropertyNoKeyBasedExample;

    /**
     * * * NEW ON 2.0.0 * * *
     * Iterate on each embed relation, don't forget do annotate related class properties.
     * Tips: You can use different domain on related class property's annotation.
     */
     #[StreamTranslate(domain: "anyDomain", childs: true)]
    private ArrayCollection $anyStringPropertyNoKeyBasedExample;
}
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity69

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

Every ~24 days

Recently: every ~83 days

Total

16

Last Release

899d ago

Major Versions

1.3.7 → 2.0.02022-12-10

2.1.1 → 3.0.02023-01-03

PHP version history (3 changes)1.1.2PHP ^7.4 || ^8.0

3.0.2PHP ^8.2

3.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8d317b36a0ec0c08560e9b8569232447bf74b9073dcfd5c555e4f55433b84ab9?d=identicon)[johnkhansrc](/maintainers/johnkhansrc)

---

Top Contributors

[![johnkhansrc](https://avatars.githubusercontent.com/u/28094259?v=4)](https://github.com/johnkhansrc "johnkhansrc (25 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/johnkhansrc-api-platform-stream-translate-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/johnkhansrc-api-platform-stream-translate-bundle/health.svg)](https://phpackages.com/packages/johnkhansrc-api-platform-stream-translate-bundle)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

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

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

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[contao/core-bundle

Contao Open Source CMS

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

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)

PHPackages © 2026

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