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(4mo ago)03MITPHPPHP ^8.0CI passing

Since Jan 11Pushed 4mo 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 1mo ago

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

31

—

LowBetter than 68% of packages

Maintenance78

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

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

121d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e48b90ddb344f947c2ed2b8e367f2a9557dec358b9a09e74e3c84b028e138254?d=identicon)[batyrmastyr](/maintainers/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

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)

PHPackages © 2026

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