PHPackages                             boshurik/twig-petrovich-extension - 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. [Templating &amp; Views](/categories/templating)
4. /
5. boshurik/twig-petrovich-extension

ActiveLibrary[Templating &amp; Views](/categories/templating)

boshurik/twig-petrovich-extension
=================================

Twig Petrovich extension

0.1.0(6y ago)0828MITPHPPHP ^7.2CI failing

Since Jun 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/BoShurik/twig-petrovich-extension)[ Packagist](https://packagist.org/packages/boshurik/twig-petrovich-extension)[ RSS](/packages/boshurik-twig-petrovich-extension/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Petrovich Twig Extension
========================

[](#petrovich-twig-extension)

[![Petrovich](https://camo.githubusercontent.com/e4a8f17e5d5dc26c86b5321aaf9a7491438714720d27ffd16bc9d82c7ea7eccd/68747470733a2f2f7261772e6769746875622e636f6d2f726f637363692f706574726f766963682f6d61737465722f706574726f766963682e706e67)](https://camo.githubusercontent.com/e4a8f17e5d5dc26c86b5321aaf9a7491438714720d27ffd16bc9d82c7ea7eccd/68747470733a2f2f7261772e6769746875622e636f6d2f726f637363692f706574726f766963682f6d61737465722f706574726f766963682e706e67)

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

[](#installation)

```
composer req boshurik/twig-petrovich-extension
```

```
use Staticall\Petrovich\Petrovich;
use Staticall\Petrovich\Petrovich\Loader;
use BoShurik\Petrovich\Twig\Extension\PetrovichExtension;
use Twig\Environment;

$petrovich = new Petrovich(Loader::load('/path/to/rules.json'));
$extension = new PetrovichExtension($petrovich);
$twig = new Environment($loader);
$twig->addExtension($extension);
```

You can use callable to lazy loading `Petrovich` instance

```
use Staticall\Petrovich\Petrovich;
use Staticall\Petrovich\Petrovich\Loader;
use BoShurik\Petrovich\Twig\Extension\PetrovichExtension;

$factory = function () {
    return new Petrovich(Loader::load('/path/to/rules.json'));
};
$extension = new PetrovichExtension($factory);
```

Usage
-----

[](#usage)

```
{{ 'Тестов Тест Тестович' | inflect_full_name('genitive', 'male') }}
{{ 'Тестов Тест Тестович' | inflect_full_name('dative') }}
{{ 'Тестов Тест Тестович' | inflect_full_name_accusative }}
{{ 'Тестов Тест Тестович' | inflect_full_name_instrumental_male }}

{{ inflect_full_name('Тестов Тест Тестович', 'genitive', 'male') }}
{{ inflect_full_name('Тестов Тест Тестович', 'dative') }}
{{ inflect_full_name_accusative('Тестов Тест Тестович') }}
{{ inflect_full_name_instrumental_male('Тестов Тест Тестович') }}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

2207d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c993e095b7e97c566f5079dfba606f34afbbc8d096bb74cabbb09ab4248dd3a?d=identicon)[BoShurik](/maintainers/BoShurik)

---

Top Contributors

[![BoShurik](https://avatars.githubusercontent.com/u/1428848?v=4)](https://github.com/BoShurik "BoShurik (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/boshurik-twig-petrovich-extension/health.svg)

```
[![Health](https://phpackages.com/badges/boshurik-twig-petrovich-extension/health.svg)](https://phpackages.com/packages/boshurik-twig-petrovich-extension)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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