PHPackages                             mridang/pearify - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. mridang/pearify

AbandonedArchivedLibrary[PSR &amp; Standards](/categories/psr-standards)

mridang/pearify
===============

Pearify converts PSR-4 Composer packages to PEAR compliant code.

0.3(7y ago)11.6k1[1 PRs](https://github.com/mridang/pearify/pulls)2MITPHP

Since Apr 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/mridang/pearify)[ Packagist](https://packagist.org/packages/mridang/pearify)[ Docs](https://github.com/mridang/pearify)[ RSS](/packages/mridang-pearify/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (2)

Pearify — Like Browserify, For PEAR compliance
==============================================

[](#pearify--like-browserify-for-pear-compliance)

Pearify is a tool to rewrite PSR-0 and PSR-4 PHP class names to the PEAR naming conventions. Pearify is based on the excellent PHP class-rewriting project by Michael Tibben.

Requirements
------------

[](#requirements)

Pearify requires PHP version 5.4 or greater.

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

[](#installation)

The simplest way to get Pearify is via Packagist. Simply add `mridang/pearify` to your composer JSON's list of requirements and run `composer install`.

About
-----

[](#about)

Pearify relies heavily on Composer and works only on Composer-based projects. Pearify uses the classmap generated by Composer to get a list of PHP classes to be renamed.

Pearify requires that you have dumped the optimised autoload classmap so it can include the array of file paths. You can generate the classmap by invoking

```
composer dump-autoload --optimize

```

Running the aforementioned command, will generate a file called `autoload_classmap.php` in the `vendor\composer` directory. More information on the `dump-autoload` directive can be found at .

The classmap contains an exhaustive list of all the PHP classnames (including paths of dev dependencies) and the relative file paths. While this file contains classes from development dependencies as well, they are automatically excluded by Pearify.

Pearify reads your project's `composer.json` file to recursively deduce all the production dependencies of your project and only select classes from the classmap belonging to your project's production dependencies.

If you had a PHP class file called `MyClass.php` in the directory `vendor/myname/myproject/`

```
namespace MyName\MyProject;

use DateTime;

class MyClass {

    public function getDate() {
        return new DateTime("2014-10-20");
    }
}
```

It would be renamed and copied over to a file name `lib\MyName\MyProject\MyClass.php`

```
class MyName_MyProject_MyClass {

    public function getDate() {
        return new DateTime("2014-10-20");
    }
}
```

The original file is left untouched and the new file is created (or overwritten) with all the `use`and `namespace` statements removed.

Gotchas
-------

[](#gotchas)

Pearify has quite a few shortcomings. If you'd like to see support for one of the following added to Composer, please create a pull-request.

- Only the `vendor` directory is processed. No support for the `vendor-dir` property as shown at
- No support for the suggested dependencies using the `suggests` property as shown at
- Files without any classes are excluded
- Resources in the dependencies are excluded
- Tests in the dependencies are excluded

Authors
-------

[](#authors)

- Mridang Agarwalla
- Hannu Pölönen

Credits
-------

[](#credits)

- Michael Tibben (@mtibben)

License
-------

[](#license)

Pearify is licensed under the MIT License - see the LICENSE file for details.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

3

Last Release

2662d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b193d399917d22f08b8d20644f1056adadee49b25438d5df2e82132ab88d771?d=identicon)[mridang](/maintainers/mridang)

---

Top Contributors

[![mridang](https://avatars.githubusercontent.com/u/327432?v=4)](https://github.com/mridang "mridang (8 commits)")[![supercid](https://avatars.githubusercontent.com/u/2778820?v=4)](https://github.com/supercid "supercid (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (3 commits)")

---

Tags

classnamecommand-line-toolcomposermagentopearpsr-4packagemagentoPSR-4PEAR

### Embed Badge

![Health badge](/badges/mridang-pearify/health.svg)

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

PHPackages © 2026

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