dkplus/mysql-migration-layer

Layer for migration from mysql to mysqli.

Maintainers

👁 [-UFO-]Melkor

Package info

github.com/UFOMelkor/mysql-migration-layer

pkg:composer/dkplus/mysql-migration-layer

Statistics

Installs: 21

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1 2013-11-26 08:29 UTC

Requires

  • php: >=5.3
  • ext-mysqli: *

Requires (Dev)

Suggests

Provides

None

Conflicts

None

Replaces

None

MIT 3baf183bb9bbfadb88a048200830222844ba4391

mysqlmysqli

This package is auto-updated.

Last update: 2026-06-09 02:19:35 UTC


README

👁 Build Status
👁 Scrutinizer Quality Score
👁 Coverage Status
👁 Total Downloads
👁 Latest Stable Version
👁 Latest Unstable Version

Layer for migration from mysql to mysqli.

Installation

composer

For composer documentation, please refer to getcomposer.org.

php composer.phar require dkplus/mysql-migration-layer

Post-install

After installing replace all mysql_*() calls with \MySQL\Proxy::*().

You can do this step automatically. Therefore you must also install nikic/php-parser:

php composer.phar require nikic/php-parser:1.*

Then you can run the converter by calling:

php vendor/bin/convert-mysql.php [-w] <file>

Run the script with the path of the PHP file you wish to convert as argument. This will print the converted source code to STDOUT.

You can add the -w switch if you want to override the original file with the converted code.

In case of any error, an error message is written to STDERR and the script exits with a return code of 1.

Use find to convert a whole directory recursively:

find <directory> -name "*.php" -exec php "vendor/bin/convert-mysql.php" -w "{}" \;