PHPackages                             alpipego/gcncns - 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. alpipego/gcncns

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

alpipego/gcncns
===============

Create WP Plugins without creating conflicts with other third party libs

0.2.0(8y ago)023[1 issues](https://github.com/alpipego/gcncns/issues)MITJavaScript

Since Oct 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alpipego/gcncns)[ Packagist](https://packagist.org/packages/alpipego/gcncns)[ RSS](/packages/alpipego-gcncns/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (6)Used By (0)

GCNCNS - WP Plugin Boiler Plate
===============================

[](#gcncns---wp-plugin-boiler-plate)

WP Plugin Boilerplate for building plugins with composer and keeping third-party dependencies in repository

Yet another plugin boilerplate?
-------------------------------

[](#yet-another-plugin-boilerplate)

Yes! This one aims at preventing conflicts caused by third-party libraries by renaming their namespaces. Compared to other boilerplates out there this one does not provide you with WordPress-specific tools or reusable code.

GCNCNS??
--------

[](#gcncns)

Grunt Composer No Conflict Namespaces

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

[](#how-to-use)

### Getting things ready

[](#getting-things-ready)

1. Create a new plugin by running `composer create-project alpipego/gcnsnc ./PLUGIN_NAME`.
2. You can then update the `composer.json` file with your plugin details (or remove it altogether).
3. Install node packages by running `npm install` (or yarn or whatever you want to use).

### Settings

[](#settings)

Update `Gruntfile.js` with your plugins namespace, i.e. replace `MyNamespace\\MySubNamespace` with your namespace (and subnamespace). By default all third-party code will be copied to `src/Common` and the namespace will be prefixed with the values in the `namespaces` object.

```
namespace GuzzleHttp;

```

will be replaced with

```
namespace MyNamespace\MySubNamespace\Common\GuzzleHttp;

```

### Adding Packages

[](#adding-packages)

Besides adding your required packages to composer, you will also need to add them to the task in `grunt/copy.js`. (Note the usage of the `namespaces.thirdParty` variable).

The simplest form is a JavaScript object with `src` and `dest` properties:

```
{
    src: 'vendor/composer/ClassLoader.php',
    dest: 'src//Composer/Autoload/ClassLoader.php'
}

```

This will copy a single `.php` file to the src directory. Copying all contents from a directory is as simple:

```
{
    expand: true,
    cwd: 'vendor/psr/container/src',
    src: '**',
    dest: 'src//Psr/Container'
}

```

If you want to copy some files but not others this can be achieved as well:

```
{
    expand: true,
    cwd: 'vendor/pimple/pimple/src/Pimple',
    src: ['**', '!**/Tests/**'],
    dest: 'src//Pimple'
}

```

[Read more about grunt globbing here.](https://gruntjs.com/configuring-tasks#building-the-files-object-dynamically)

### Autoloading packages

[](#autoloading-packages)

Instead of including composers `autoload.php` use the `ClassLoader` class it provides. Add this at the top of your plugin (or in a bootstrap file):

```
use MyNamespace\MySubNamespace\Common\Composer\Autoload\ClassLoader;

require_once __DIR__ . '/src/Common/Composer/Autoload/ClassLoader.php';

$loader = new ClassLoader();
$loader->setPsr4('MyNamespace\\MySubNamespace\\', realpath(__DIR__ . '/src/'));
$loader->register();

```

You will have to change the namespace and directories to fit your setup, find the documentation for the [`ClassLoader` here](https://getcomposer.org/apidoc/1.3.0/Composer/Autoload/ClassLoader.html).

Run it
------

[](#run-it)

Running it is as simple as `grunt thirdParty` after packages have been installed. This could also go into a composer script, e.g., `post-update-cmd`.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

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

Total

3

Last Release

3128d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/alpipego-gcncns/health.svg)

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

###  Alternatives

[laravel-ready/license-server

License server for Laravel

1271.2k](/packages/laravel-ready-license-server)[swissup/module-font-awesome

FontAwesome for Magento2

116.9k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

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