PHPackages                             batyrmastyr/yii-db-rector-rules - 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. [Database &amp; ORM](/categories/database)
4. /
5. batyrmastyr/yii-db-rector-rules

ActiveLibrary[Database &amp; ORM](/categories/database)

batyrmastyr/yii-db-rector-rules
===============================

0.0.5(5mo ago)03MITPHPPHP ^8.0CI passing

Since Jan 11Pushed 5mo agoCompare

[ Source](https://github.com/batyrmastyr/yii-db-rector-rules)[ Packagist](https://packagist.org/packages/batyrmastyr/yii-db-rector-rules)[ RSS](/packages/batyrmastyr-yii-db-rector-rules/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Several Rector rules to upgrade yiisoft/db package from 1.3 to 2.0, mostly for tests.

Install
-------

[](#install)

```
composer require --dev batyrmastyr/yii-db-rector-rules
```

How to use
----------

[](#how-to-use)

Add rule set to `rector.php` like below

```
return RectorConfig::configure()
    ->withSets([YiisoftDbUpgradeSet::Yii3DbV2])
;
```

What's inside
-------------

[](#whats-inside)

- Replace `(new Dsn(arguments))->asString()` with `new Dsn(...)`
- Remove `InvalidArgumentException`
- Replace `->getSchema->getRawTableName()` with `->getQuoter()->getRawTableName()`
- Replace `SchemaInterface::TYPE_*` constants with `ColumnType::*`
- Replace `Yiisoft\Db\Constraint\IndexConstraint` with `Yiisoft\Db\Constraint\Index` and change method calls to property access, e.g. `$index->getColumnNames()[0]` -&gt; `$index->columnNames[0]`

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance70

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

5

Last Release

173d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9303221?v=4)[batyrmastyr](/maintainers/batyrmastyr)[@batyrmastyr](https://github.com/batyrmastyr)

---

Top Contributors

[![batyrmastyr](https://avatars.githubusercontent.com/u/9303221?v=4)](https://github.com/batyrmastyr "batyrmastyr (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/batyrmastyr-yii-db-rector-rules/health.svg)

```
[![Health](https://phpackages.com/badges/batyrmastyr-yii-db-rector-rules/health.svg)](https://phpackages.com/packages/batyrmastyr-yii-db-rector-rules)
```

###  Alternatives

[driftingly/rector-laravel

Rector upgrades rules for Laravel Framework

1.2k15.4M734](/packages/driftingly-rector-laravel)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M436](/packages/ssch-typo3-rector)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[filament/upgrade

Upgrade Filament v4 code to Filament v5.

101.9M188](/packages/filament-upgrade)[mrpunyapal/rector-pest

Rector upgrade rules for Pest - refactoring and best practices for Pest testing framework

6977.7k62](/packages/mrpunyapal-rector-pest)[ergebnis/rector-rules

Provides rules for rector/rector.

10245.6k51](/packages/ergebnis-rector-rules)

PHPackages © 2026

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