PHPackages                             fluxter/php-code-helper - 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. [CLI &amp; Console](/categories/cli)
4. /
5. fluxter/php-code-helper

ActiveLibrary[CLI &amp; Console](/categories/cli)

fluxter/php-code-helper
=======================

A small symfony helper CLI tool

1.1.1(5y ago)1167PHP

Since Sep 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Fluxter/php-code-helper)[ Packagist](https://packagist.org/packages/fluxter/php-code-helper)[ RSS](/packages/fluxter-php-code-helper/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

PHP Helper
==========

[](#php-helper)

You wished there was an application like this *Yea its so big buhu*

WARNING
-------

[](#warning)

Please use this tool on your own risk.
Before using it, make a backup of your code (or use git!)

Using this *may* break your whole application! (Mine was fixed :))

How to install
--------------

[](#how-to-install)

### Globally

[](#globally)

Require the package

```
$ composer global require fluxter/php-code-helper
```

After that, make sure composer vendor bin is inside your path!

```
$ export PATH="$PATH:$HOME/.composer/vendor/bin"
```

Voila!

```
$ pch
```

should work now

How to update
-------------

[](#how-to-update)

```
$ composer global update fluxter/php-code-helper
```

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

[](#how-to-use)

### Fix Namespaces

[](#fix-namespaces)

Force sets the namespace in your folder to the according composer.json psr-4 level.

```
$ pch fix-namespaces [Path to the composer.json containing folder]
```

### Fix Usings

[](#fix-usings)

If you e.g. refactored many things to new namespaces, the fx-namespaces command should help you with that.
But now your code is trying to `use` all the files from the old namespace.

This command searches in alle classes the most fitting one.

```
$ pch fix-usings [Path to your src directory]
```

#### Example output

[](#example-output)

```
 - Using not exists! App\Core\Enum\InvoiceStatusType. Searching alternative... Found alternative: App\Plugin\ERP\InvoiceStatusType
 - Using not exists! App\Core\Enum\SubscriptionType. Searching alternative... Found alternative: App\Plugin\ERP\Form\Shared\SubscriptionType
 - Using not exists! App\Core\Helper\DateTimeHelper. Searching alternative... Found alternative: App\Platform\Helper\DateTimeHelper
 - Using not exists! App\Core\Helper\PaymentHelper. Searching alternative... Found alternative: App\Platform\Helper\PaymentHelper

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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

Total

3

Last Release

2034d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80dd871b30d40573fb6a72e1f54e647aa1405c95c769703d453cbec82ae0faa5?d=identicon)[Fluxter](/maintainers/Fluxter)

![](https://www.gravatar.com/avatar/7ec192f6021533e0053cd0453c3d4911ed00547f5656d230c654939d177c5e87?d=identicon)[MKHSKY](/maintainers/MKHSKY)

---

Top Contributors

[![peechyfloof](https://avatars.githubusercontent.com/u/42220355?v=4)](https://github.com/peechyfloof "peechyfloof (14 commits)")

### Embed Badge

![Health badge](/badges/fluxter-php-code-helper/health.svg)

```
[![Health](https://phpackages.com/badges/fluxter-php-code-helper/health.svg)](https://phpackages.com/packages/fluxter-php-code-helper)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[humbug/php-scoper

Prefixes all PHP namespaces in a file or directory.

7963.0M35](/packages/humbug-php-scoper)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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