PHPackages                             dcg/dcg-membership-number-config - 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. dcg/dcg-membership-number-config

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

dcg/dcg-membership-number-config
================================

A package to add config to a project

v1.0.1(6y ago)03582PHPPHP &gt;=5.4

Since Jun 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/diningclubgroup/dcg-membership-number-config)[ Packagist](https://packagist.org/packages/dcg/dcg-membership-number-config)[ RSS](/packages/dcg-dcg-membership-number-config/feed)WikiDiscussions master Synced yesterday

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

What is this?
=============

[](#what-is-this)

A package to add config to a project

Usage
=====

[](#usage)

To add this library to an existing application,

Add the following repository to the app's composer.json,

```
"repositories": [
    {
        "type": "vcs",
        "url": "https://git@bitbucket.org/tastecard/dcg-lib-config.git"
    }
]
```

Add the following to the *require* section,

```
"dcg/dcg-lib-config": "dev-master"
```

Add this to the scripts section:

```
"scripts": {
    "post-update-cmd": [
        "Dcg\\Config\\FileCreator::createConfigFile",
    ]
}
```

OR, if the parent project is to be a dependancy of another project which also needs config. Create a class which extends FileCreator and specify a different source/destination config file like so:

```
namespace Dcg\Client\MembershipNumberState\Config;

class FileCreator extends \Dcg\Config\FileCreator
{
    /**
     * Get the location of the config file to use as an example (template)
     * @param Composer\Script\Event $event
     * @return string
     */
    protected static function getSourceFile(\Composer\Script\Event $event) {
        $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir');
        return $vendorDir . DIRECTORY_SEPARATOR . 'dcg' . DIRECTORY_SEPARATOR . 'dcg-lib-membership-number-state-client' . DIRECTORY_SEPARATOR . 'config.php';
    }

    /**
     * Get the location of where the config file should be copied to
     * @param Composer\Script\Event $event
     * @return string
     */
    protected static function getDestinationFile(\Composer\Script\Event $event) {
        $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir');
        return dirname($vendorDir) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'membership-number-state-config.php';
    }

}
```

Create the config class which uses the config file specific to the project which needs config

```
namespace Dcg\Client\MembershipNumberState;

class Config extends \Dcg\Config {

    /**
     * Get the default config file to use
     * @return string
     */
    protected static function getDefaultConfigFile() {
        return self::getRootDir().'/config/membership-number-state-config.php';
    }
}
```

- Run composer install

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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 ~0 days

Total

2

Last Release

2515d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2851eb2b76c8b9a5807b2c9ae6c88bb65024c96b2f8937b0d0a1ecc02b2b7ead?d=identicon)[dcg](/maintainers/dcg)

---

Top Contributors

[![GulKhanTC](https://avatars.githubusercontent.com/u/37908534?v=4)](https://github.com/GulKhanTC "GulKhanTC (18 commits)")[![swathikrishna1](https://avatars.githubusercontent.com/u/37871503?v=4)](https://github.com/swathikrishna1 "swathikrishna1 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dcg-dcg-membership-number-config/health.svg)

```
[![Health](https://phpackages.com/badges/dcg-dcg-membership-number-config/health.svg)](https://phpackages.com/packages/dcg-dcg-membership-number-config)
```

###  Alternatives

[mwdelaney/sage-fonts-preload

Automatically preload fonts from the Sage mix manifest

188.3k](/packages/mwdelaney-sage-fonts-preload)

PHPackages © 2026

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