PHPackages                             blackcube/core - 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. [Framework](/categories/framework)
4. /
5. blackcube/core

Abandoned → [blackcube/dcore](/?search=blackcube%2Fdcore)Yii2-extension[Framework](/categories/framework)

blackcube/core
==============

Blackcube CMS Core system

3.6.0(10mo ago)29272bsd-3-clausePHPPHP &gt;=8.2

Since Mar 17Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/blackcubeio/core)[ Packagist](https://packagist.org/packages/blackcube/core)[ Docs](https://code.redcat.io/blackcube/core)[ RSS](/packages/blackcube-core/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (17)Versions (55)Used By (2)

Blackcube Core
==============

[](#blackcube-core)

[![Latest Stable Version](https://camo.githubusercontent.com/25176b34c11330e23d54772752779eb33e647141069f5ae19489f4866d28c4ae/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b637562652f636f72652f76)](https://packagist.org/packages/blackcube/core)[![Total Downloads](https://camo.githubusercontent.com/1113aacdb30ac41ffdad7b971aae674ec131761cacc7b7a204ebebe449cf1883/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b637562652f636f72652f646f776e6c6f616473)](https://packagist.org/packages/blackcube/core)[![Latest Unstable Version](https://camo.githubusercontent.com/80baecc5fc454f277ebb002ebf0149a2e85949430ec0de8c1f9861e70735da02/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b637562652f636f72652f762f756e737461626c65)](https://packagist.org/packages/blackcube/core)[![License](https://camo.githubusercontent.com/7729c062199dba4741375314eb6f92c7f87425901db83b042985b52df5be6686/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b637562652f636f72652f6c6963656e7365)](https://packagist.org/packages/blackcube/core)[![PHP Version Require](https://camo.githubusercontent.com/3077ecbb055a71bb8c55310fb0f366a0646b953ba494ddafc085ad9f27940671/68747470733a2f2f706f7365722e707567782e6f72672f626c61636b637562652f636f72652f726571756972652f706870)](https://packagist.org/packages/blackcube/core)

[![pipeline status](https://camo.githubusercontent.com/b7db0e5b6c8c38d983aefe167d1c99cdd60f6ad15f9cdf9e9c85f49c21eff04c/68747470733a2f2f636f64652e7265646361742e696f2f626c61636b637562652f636f72652f6261646765732f646576656c2d332e782f706970656c696e652e737667)](https://code.redcat.io/blackcube/core/commits/devel-3.x)[![coverage report](https://camo.githubusercontent.com/1f713ecb72ae21c851e3159fbf23f8f39a84cd810806414a61cb652a05efc282/68747470733a2f2f636f64652e7265646361742e696f2f626c61636b637562652f636f72652f6261646765732f646576656c2d332e782f636f7665726167652e737667)](https://code.redcat.io/blackcube/core/commits/devel-3.x)

Pre-requisites
--------------

[](#pre-requisites)

- PHP 8.2+
    - Extension `dom`
    - Extension `fileinfo`
    - Extension `intl`
    - Extension `json`
    - Extension `mbstring`
    - Extension `xmlreader`
    - Extension `dom`

Pre-flight
----------

[](#pre-flight)

Add blackcube core to the project

```
composer require "blackcube/core"

```

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

[](#installation)

> **Beware**: `Blackcube core` can be used in stand alone but `Blackcube admin` is recommended

### Inject Blackcube core in application

[](#inject-blackcube-core-in-application)

```
// main configuration file
   'container' => [
      'singletons' => [
         // local filesystem
         blackcube\core\components\Flysystem::class => [
            'class' => blackcube\core\components\FlysystemLocal::class,
            'path' => getstrenv('FILESYSTEM_LOCAL_PATH'),
         ],
         // or s3
         blackcube\core\components\Flysystem::class => [
            'class' => blackcube\core\components\FlysystemAwsS3::class,
           'key' => getstrenv('FILESYSTEM_S3_KEY'),
           'secret' => getstrenv('FILESYSTEM_S3_SECRET'),
           'bucket' => getstrenv('FILESYSTEM_S3_BUCKET'),
           'region' => getstrenv('FILESYSTEM_S3_REGION'),
           'version' => 'latest',
           'endpoint' => getstrenv('FILESYSTEM_S3_ENDPOINT'),
           'pathStyleEndpoint' => getboolenv('FILESYSTEM_S3_PATH_STYLE'),
         ],
      ]
   ],
// ...
    'bootstrap' => [
        // ... boostrapped modules
        'blackcube', // blackcube core
    ],
    'modules' => [
        // ... other modules
        'blackcube' => [
            'class' => blackcube\core\Module::class,
            'plugins' => [
               // additional plugins
            ],
            'cmsEnabledmodules' => [
               // additional modules
            ],
            'allowedParameterDomains' => ['],
            // override components if needed
            'components' => [
               'db' => ...
               'cache' => ...
               'fs' => ...
            ],
            /// end override
        ],
    ],
// ...
```

### Update DB

[](#update-db)

Add needed tables in DB

```
php yii.php migrate

```

Init database with basic stuff

```
php yii.php bc:init

```

> Blackcube core is now ready, you can use it

Add translations for new code
-----------------------------

[](#add-translations-for-new-code)

Managing translations can be a little tricky, here is a way to do it:

### Prepare `msgconfig.php`

[](#prepare-msgconfigphp)

`msgconfig.php` is a configuration file for `yii` message command, it should be located in the root of the project.

```
return [
    // string, required, root directory of all source files
    'sourcePath' => __DIR__ . DIRECTORY_SEPARATOR . 'src',
    // array, required, list of language codes that the extracted messages
    // should be translated to. For example, ['zh-CN', 'de'].
    'languages' => ['en'],
    // string, the name of the function for translating messages.
    // Defaults to 'Yii::t'. This is used as a mark to find the messages to be
    // translated. You may use a string for single function name or an array for
    // multiple function names.
    'translator' => 'Module::t',
    // boolean, whether to sort messages by keys when merging new messages
    // with the existing ones. Defaults to false, which means the new (untranslated)
    // messages will be separated from the old (translated) ones.
    'sort' => false,
    // boolean, whether to remove messages that no longer appear in the source code.
    // Defaults to false, which means these messages will NOT be removed.
    'removeUnused' => false,
    // boolean, whether to mark messages that no longer appear in the source code.
    // Defaults to true, which means each of these messages will be enclosed with a pair of '@@' marks.
    'markUnused' => true,
    // array, list of patterns that specify which files (not directories) should be processed.
    // If empty or not set, all files will be processed.
    // See helpers/FileHelper::findFiles() for pattern matching rules.
    // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
    'only' => ['*.php'],
    // array, list of patterns that specify which files/directories should NOT be processed.
    // If empty or not set, all files/directories will be processed.
    // See helpers/FileHelper::findFiles() for pattern matching rules.
    // If a file/directory matches both a pattern in "only" and "except", it will NOT be processed.
    'except' => [
        '.svn',
        '.git',
        '.gitignore',
        '.gitkeep',
        '.hgignore',
        '.hgkeep',
        '/messages',
    ],

    /**/
    // 'po' output format is for saving messages to gettext po files.
    'format' => 'po',
    // Root directory containing message translations.
    'messagePath' => dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'src/i18n',
    // Name of the file that will be used for translations.
    'catalog' => 'messages',
    // boolean, whether the message file should be overwritten with the merged messages
    'overwrite' => true,
    /**/
];
```

Execute the command

```
php yii.php message src/i18n/msgconfig.php

```

Once done, you can update the translations in `src/i18n/en/messages.po`

> **Beware**: `src/i18n/en/messages.po` is the only file that should be updated, move it to `src/i18n/messages.pot` and revert back `src/i18n/en/messages.po` to its original state Change msgctxt "XXX" to msgctxt "blackcube/core/XXX" to match Blackcube core context in `src/i18n/messages.pot`

```
mv src/i18n/en/messages.po src/i18n/messages.pot
git checkout src/i18n/en/messages.po
sed -i 's/msgctxt "([^"]+)"/msgctxt "blackcube\/core\/$1"/g' src/i18n/messages.pot
```

Once done, you can update/add translations in `src/i18n//messages.po`using poedit or any other tool.

Running tests
-------------

[](#running-tests)

```
# once databe is installed and pre-populated with `php yii.php bc:init`
./vendor/bin/codecept run

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance62

Regular maintenance activity

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

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

Recently: every ~52 days

Total

52

Last Release

304d ago

Major Versions

0.0.4 → 1.0.02020-05-29

1.2.2 → 2.0.02020-11-16

2.2.3 → 3.0.02023-09-21

PHP version history (3 changes)0.0.1PHP &gt;=7.2

3.0.0PHP &gt;=8.0

3.6.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/545714?v=4)[pgaultier](/maintainers/pgaultier)[@pgaultier](https://github.com/pgaultier)

---

Top Contributors

[![pgaultier](https://avatars.githubusercontent.com/u/545714?v=4)](https://github.com/pgaultier "pgaultier (139 commits)")

---

Tags

corecmsyii2yiicontent managementblackcube

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/blackcube-core/health.svg)

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

###  Alternatives

[yii2-starter-kit/yii2-starter-kit

Yii2 Starter Kit Application Template

1.4k6.6k](/packages/yii2-starter-kit-yii2-starter-kit)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13825.6k47](/packages/skeeks-cms)[luyadev/luya-module-cms

The LUYA CMS module provides a full functional Content Management System for adding contents based on blocks.

32176.1k18](/packages/luyadev-luya-module-cms)[hiqdev/hisite-core

HiSite Yii2 base project

173.5k](/packages/hiqdev-hisite-core)

PHPackages © 2026

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