PHPackages                             gong023/namae-space - 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. gong023/namae-space

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gong023/namae-space
===================

0.2.2(9y ago)6393PHPPHP &gt;=5.5

Since Aug 19Pushed 9y agoCompare

[ Source](https://github.com/gong023/namae-space)[ Packagist](https://packagist.org/packages/gong023/namae-space)[ RSS](/packages/gong023-namae-space/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (6)Versions (6)Used By (0)

NamaeSpace
==========

[](#namaespace)

[![Build Status](https://camo.githubusercontent.com/1cce4250c656f2162649d277c0f2e897ad83e22264dc459a0a1f58ea828d99b7/68747470733a2f2f7472617669732d63692e6f72672f676f6e673032332f6e616d61652d73706163652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/gong023/namae-space)

NamaeSpace is util command for PHP namespace. this command enables you to find and replace namespace using static analysis.

[![gif](https://github.com/gong023/namae-space/raw/master/sample.gif)](https://github.com/gong023/namae-space/blob/master/sample.gif)

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

[](#installation)

```
composer require --dev gong023/namae-space

```

Usage
-----

[](#usage)

### Find

[](#find)

```
namaespace find -C $HOME/your/project \ # path to your project composer.json
                -F Name\\YourClass      # Name what you want to find

```

`namaespace` command stdouts usage of `Name\\YourClass`.

See `--help` to know further.

### Replace

[](#replace)

```
namaespace replace -C $HOME/your/project      \ # path to your project composer.json
                   -O Origin\\YourOriginClass \ # Replaced OriginName
                   -N New\\YourNewClass         # NewClassName which you want to replace

```

`namaespace` command finds `YourOriginClass`, and then replaces it to `YourNewClass`.

You can pass `-D` or `--dry_run` option if you wanna test before replace. See `--help` to know further.

Unlike IDE, NamaeSpace can change Global namespace to be named.

How does it work
----------------

[](#how-does-it-work)

`namaespace` finds paths by reading composer.json and analyses codes.

Mainly analysis is delegated to [nikic/PHP-Parser](https://github.com/nikic/PHP-Parser/). You don't have to worry about instability of regex.

And analysis is executed under multi processing. You can pass `-M` or `--max_process` option to control number of process for any commands.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

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

Total

5

Last Release

3386d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/034b987bca6692b17b6a5923eca68302fec17cd13f09f8d2f0a45c6d38125c03?d=identicon)[gong023](/maintainers/gong023)

---

Top Contributors

[![gong023](https://avatars.githubusercontent.com/u/1222856?v=4)](https://github.com/gong023 "gong023 (127 commits)")

---

Tags

phpstatic-analysisutility

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gong023-namae-space/health.svg)

```
[![Health](https://phpackages.com/badges/gong023-namae-space/health.svg)](https://phpackages.com/packages/gong023-namae-space)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k245.4M24.0k](/packages/friendsofphp-php-cs-fixer)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136400.8k14](/packages/rector-rector-src)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4753.9M23](/packages/coenjacobs-mozart)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

190406.5k30](/packages/brianhenryie-strauss)[v.chetkov/php-clean-architecture

PHP Clean Architecture

14659.9k](/packages/vchetkov-php-clean-architecture)

PHPackages © 2026

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