PHPackages                             vortrixs/joomla-namespace-checker - 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. vortrixs/joomla-namespace-checker

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

vortrixs/joomla-namespace-checker
=================================

Checks for correct namespace usage in Joomla projects

1.3.1(5y ago)343.3k↓16.7%6MITPHPPHP &gt;=7.0

Since Jun 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/vortrixs/joomla-namespace-checker)[ Packagist](https://packagist.org/packages/vortrixs/joomla-namespace-checker)[ Docs](https://github.com/vortrixs/joomla-namespace-checker)[ RSS](/packages/vortrixs-joomla-namespace-checker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (6)Used By (0)

Joomla Namespace Checker (JNSC)
===============================

[](#joomla-namespace-checker-jnsc)

For migrating to Joomla 3.8.x

This script scans a directory recursively for PHP files containing calls to the old classes (e.g. JFactory).

**DISCLAIMER:** Keep in mind that the results from this tool are only suggestions and that these changes are *NOT* required for your application to work until Joomla 5 is released. Thanks to @anibalsanchez for pointing this out ([\#6](/../../issues/6)).

As a side note you can always find the full definition for the new class names in [Joomlas own repository](https://github.com/joomla/joomla-cms/blob/staging/libraries/classmap.php).

**Note:** I'm not actively supporting this repository at the moment as I'm not working with Joomla anymore, but do feel free to submit PRs if you have any changes or found any bugs.

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

[](#requirements)

- PHP 7.x

Usage
-----

[](#usage)

### Using Composer

[](#using-composer)

Add the package to your `composer.json`

```
composer require --dev vortrixs/joomla-namespace-checker

```

Afterwards you can run it using

```
vendor/bin/jnsc path/to/your/project/

```

This should work as long as PHP is in your `$PATH`.

If this does not work you can always execute the PHAR directly

```
php vendor/vortrixs/joomla-namespace-checker/bin/jnsc.phar

```

### Using the PHAR

[](#using-the-phar)

Download the PHAR from the [latest release](https://github.com/vortrixs/joomla-namespace-checker/releases) and run it like so

```
$ php jnsc.phar path/to/your/project

```

If any calls are found you will get the following output:

```
FILE: path/to/your/project/someFile.php
-------------------------------------------------------------------------------------
Line: 12 | Class found: JTable        | Replace with: Joomla\CMS\Table\Table
Line: 21 | Class found: JPlugin       | Replace with: Joomla\CMS\Plugin\CMSPlugin
Line: 47 | Class found: JPluginHelper | Replace with: Joomla\CMS\Plugin\PluginHelper
Line: 56 | Class found: JFactory      | Replace with: Joomla\CMS\Factory
Line: 75 | Class found: JPluginHelper | Replace with: Joomla\CMS\Plugin\PluginHelper
Line: 84 | Class found: JFactory      | Replace with: Joomla\CMS\Factory
-------------------------------------------------------------------------------------

```

### Excluding paths &amp; files

[](#excluding-paths--files)

Pass the `--exclude` option to exclude directories and files.

```
$ php jnsc.phar --exclude=/somepath/,somefile.php,some/other/path/ path/to/your/project

```

The exclusion is very basic so you might have to tweak the paths a bit, this also means wildcards like \* are *not* supported.

e.g. if you pass `--exclude=google`, it will filter out anything that has `google` in it's path or filename.

To reliably filter out a whole directory wrap it in `/ /` and for single files use `filename.ext`.

### Automatically update files after scan

[](#automatically-update-files-after-scan)

With the -u option on the command line, the classnames are replaced in the file, use statements are inserted immediately after the &lt;?php tag, and the file is rewritten with the changes. **JEventDispatcher**, **JDispatcher** and **JRequest** calls will be excluded from fix list and should be fixed manually according to suggestions.

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~182 days

Total

5

Last Release

2156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f421baac91730f3f122ef3a3b4f350c266911d5f014c647802028e4a567243da?d=identicon)[vortrixs](/maintainers/vortrixs)

---

Top Contributors

[![vortrixs](https://avatars.githubusercontent.com/u/15426116?v=4)](https://github.com/vortrixs "vortrixs (30 commits)")[![skurvish](https://avatars.githubusercontent.com/u/8654397?v=4)](https://github.com/skurvish "skurvish (3 commits)")[![jatitoam](https://avatars.githubusercontent.com/u/1500978?v=4)](https://github.com/jatitoam "jatitoam (1 commits)")[![Ruud68](https://avatars.githubusercontent.com/u/2733197?v=4)](https://github.com/Ruud68 "Ruud68 (1 commits)")[![sintro](https://avatars.githubusercontent.com/u/1379593?v=4)](https://github.com/sintro "sintro (1 commits)")

---

Tags

namespacejoomla

### Embed Badge

![Health badge](/badges/vortrixs-joomla-namespace-checker/health.svg)

```
[![Health](https://phpackages.com/badges/vortrixs-joomla-namespace-checker/health.svg)](https://phpackages.com/packages/vortrixs-joomla-namespace-checker)
```

###  Alternatives

[typisttech/imposter-plugin

Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

158251.0k2](/packages/typisttech-imposter-plugin)[typisttech/imposter

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

111286.6k1](/packages/typisttech-imposter)[shipmonk/name-collision-detector

Simple tool to find ambiguous classes or any other name duplicates within your project.

362.1M35](/packages/shipmonk-name-collision-detector)[joomlatools/composer

A Composer plugin to install Joomla extensions into your installation.

5332.9k24](/packages/joomlatools-composer)[nilportugues/php_backslasher

Adds all PHP internal functions to its namespace by adding backslash to them. Improves the application's performance when OPCache is on.

889.3k18](/packages/nilportugues-php-backslasher)[frozzare/wp-autoload

Simple autoloader that will autoload classes or traits with namespace prefix

1618.3k4](/packages/frozzare-wp-autoload)

PHPackages © 2026

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