PHPackages                             ray/rector-ray - 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. ray/rector-ray

ActiveRector-extension[Utility &amp; Helpers](/categories/utility)

ray/rector-ray
==============

Rector upgrades rules for Ray.Di

1.1.0(2y ago)080.0k↓13.8%[1 PRs](https://github.com/ray-di/rector-ray/pulls)1MITPHPPHP &gt;=8.0

Since Oct 17Pushed 2y agoCompare

[ Source](https://github.com/ray-di/rector-ray)[ Packagist](https://packagist.org/packages/ray/rector-ray)[ RSS](/packages/ray-rector-ray/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (3)Dependencies (6)Versions (7)Used By (1)

Rector Rules for Ray.Di
=======================

[](#rector-rules-for-raydi)

[![Continuous Integration](https://github.com/ray-di/rector-ray/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/ray-di/rector-ray/actions/workflows/continuous-integration.yml)

The [rector/rector](http://github.com/rectorphp/rector) rules for [Ray.Di](https://ray-di.github.io/).

Install
-------

[](#install)

```
composer require ray/rector-ray --dev
```

Rules
-----

[](#rules)

### AnnotationBindingRector

[](#annotationbindingrector)

This Rector converts annotation bindings in PHPDoc into parameter attribute bindings.

🔧 **configure it!**

- class: [`AnnotationBindingRector`](rules/AnnotationBinding/Rector/ClassMethod/AnnotationBindingRector.php)

```
use PHPStan\Type\ObjectType;
use Rector\Arguments\Rector\ClassMethod\ArgumentAdderRector;
use Rector\Arguments\ValueObject\ArgumentAdder;
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->ruleWithConfiguration(
        AnnotationBindingRector::class
    );
};
```

↓

```
class SomeClass
{
    /**
-    * @Named("a=foo, b=bar")
     * @Foo
     */
-    public function __construct(int $a, int $b)
+    public function __construct(#[Named('foo')] int $a, #[Named('bar')] int $b)
    {
    }
```

```
-    /**
-     * @Foo("a")
-     */
-    public function __construct(int $a, int $b)
+    public function __construct(#[Foo] int $a, int $b)
    {
    }
```

See Also
--------

[](#see-also)

- [AnnotationToAttributeRector](https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#annotationtoattributerector)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community8

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

Total

4

Last Release

1090d ago

### Community

Maintainers

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

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (47 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ray-rector-ray/health.svg)

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

PHPackages © 2026

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