PHPackages                             kerasai/drupal-config-importer - 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. kerasai/drupal-config-importer

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

kerasai/drupal-config-importer
==============================

Utilities for importing Drupal configuration.

1.0.1(6mo ago)12.7k↓50%1PHP

Since Mar 2Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/kerasai/drupal-config-importer)[ Packagist](https://packagist.org/packages/kerasai/drupal-config-importer)[ RSS](/packages/kerasai-drupal-config-importer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (8)Used By (0)

drupal-config-importer
======================

[](#drupal-config-importer)

Utilities for importing Drupal configuration.

You may find other uses for this functionality, but it was initially developed for use in update hooks. It's generally assumed that during deployments you will want to run database updates before configuration import, because there is more flexibility in the update hooks. What this leads to is cases where a bunch of ugly code is needed to "rough-out" the necessary configuration that the update hooks depend on.

Usage
-----

[](#usage)

For example, you may want to populate an `article_types` taxonomy vocabulary automatically upon deployment. This requires creating the taxonomy vocabulary prior to the term population, if it does not already exist.

Using this config importer, doing so is as easy as the following:

Copy the `taxonomy.vocabulary.article_types.yml` file into the `config/update/8003` folder within `my_module`. This allows for the vocabulary to be installed with exact/known values, not vulerable to future changes.

Then add the update hook and the population code:

```
function my_module_update_8003() {
  $path = \Drupal::moduleHandler()->getModule('my_module')->getPath() . '/config/update/11000';
  $i = Kerasai\DrupalConfigImporter\ConfigImporter::create();
  $i->import('taxonomy.vocabulary.article_types', $path);
  _my_module_populate_article_types();
}

function _my_module_populate_article_types() {
  // Add article_types taxonomy terms here.
}

```

Additional functionality
------------------------

[](#additional-functionality)

To obtain an importer ready to rock and roll, simply call the `Kerasai\DrupalConfigImporter\ConfigImporter::create` static method. This will create an importer using the necessary Drupal services. Then you may use the `::import` method to import configuration by its configuration ID (filename, minus the `.yml`).

The importer's `::import` method has logic built-in to determine if the config being imported is a first-class ConfigEntity or general "simple" configuration. Alternatively, you may call the importer's `::importConfig` or `::importConfigEntity` methods.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance68

Regular maintenance activity

Popularity23

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

Recently: every ~429 days

Total

6

Last Release

188d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1098973?v=4)[Will Long](/maintainers/kerasai)[@kerasai](https://github.com/kerasai)

---

Top Contributors

[![kerasai](https://avatars.githubusercontent.com/u/1098973?v=4)](https://github.com/kerasai "kerasai (6 commits)")

### Embed Badge

![Health badge](/badges/kerasai-drupal-config-importer/health.svg)

```
[![Health](https://phpackages.com/badges/kerasai-drupal-config-importer/health.svg)](https://phpackages.com/packages/kerasai-drupal-config-importer)
```

###  Alternatives

[farmos/farmos

A web-based farm record keeping application.

1.2k6.7k1](/packages/farmos-farmos)

PHPackages © 2026

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