PHPackages                             itmundi/schematic - 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. itmundi/schematic

Abandoned → [nerds-and-company/schematic](/?search=nerds-and-company%2Fschematic)Craft-plugin

itmundi/schematic
=================

Craft setup and sync tool

4.1.2(7y ago)13623.9k↓50%14[4 issues](https://github.com/nerds-and-company/schematic/issues)1MITPHPPHP ^7.0

Since Oct 19Pushed 7y ago24 watchersCompare

[ Source](https://github.com/nerds-and-company/schematic)[ Packagist](https://packagist.org/packages/itmundi/schematic)[ RSS](/packages/itmundi-schematic/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (76)Used By (1)

Schematic (for Craft 3) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/5254c356efa38de5cedd75d24c7710a4e5640e1b1203d9f3be6384fd1c71e8d3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e657264732d616e642d636f6d70616e792f736368656d617469632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nerds-and-company/schematic/?branch=master) [![Build Status](https://camo.githubusercontent.com/0dfc81aab0f33c48ccc6a296752fb09d9a5a66a1cf428e7afee530da6edb91a7/68747470733a2f2f7472617669732d63692e6f72672f6e657264732d616e642d636f6d70616e792f736368656d617469632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nerds-and-company/schematic) [![Code Coverage](https://camo.githubusercontent.com/032870cbcb0b144da6a0616e62dc8c7e61ca6cc349caa000777c4a9e3f85ba25/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e657264732d616e642d636f6d70616e792f736368656d617469632f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nerds-and-company/schematic/?branch=master) [![Latest Stable Version](https://camo.githubusercontent.com/150c382b76f997aa74a115a383c1b162c70cf0b473e9342f67d8495787d1dbff/68747470733a2f2f706f7365722e707567782e6f72672f6e657264732d616e642d636f6d70616e792f736368656d617469632f762f737461626c65)](https://packagist.org/packages/nerds-and-company/schematic) [![Total Downloads](https://camo.githubusercontent.com/f03ab9447ba1a668394a53f9b54bba0937a1a092a32bf14b968d8d1817f196c4/68747470733a2f2f706f7365722e707567782e6f72672f6e657264732d616e642d636f6d70616e792f736368656d617469632f646f776e6c6f616473)](https://packagist.org/packages/nerds-and-company/schematic) [![Latest Unstable Version](https://camo.githubusercontent.com/d4e6d22bd457bacd2917b142abfb718b4c00c5ff304e94cc794299fae62c58ca/68747470733a2f2f706f7365722e707567782e6f72672f6e657264732d616e642d636f6d70616e792f736368656d617469632f762f756e737461626c65)](https://packagist.org/packages/nerds-and-company/schematic) [![License](https://camo.githubusercontent.com/9835781b377eea466bf0c9faada23b80dc9c2f4906e01beb53c0a3f4f761dd30/68747470733a2f2f706f7365722e707567782e6f72672f6e657264732d616e642d636f6d70616e792f736368656d617469632f6c6963656e7365)](https://packagist.org/packages/nerds-and-company/schematic)
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#schematic-for-craft-3-------)

Schematic allows you to synchronize your Craft setup over multiple environments. It does this by exporting information about assets, database (fields, sections, users), locales and plugins to a YAML file that can be imported in other environments.

❗ Craft 3.1 notice
------------------

[](#exclamation-craft-31-notice)

Craft 3.1 brings [project config](https://github.com/craftcms/cms/blob/3.1/docs/project-config.md) that will deliver most if not all schematic functionality natively. We will continue to support schematic going forward, but it seems likely to become obsolete.

Currently Schematic will not run on Craft 3.1 or higher!

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

[](#installation)

This tool can be installed [using Composer](https://getcomposer.org/doc/00-intro.md). Run the following command from the root of your project:

```
composer require nerds-and-company/schematic

```

This will add `nerds-and-company/schematic` as a requirement to your project's `composer.json` file and install the source-code into the `vendor/nerds-and-company/schematic` directory.

Schematic is now available as an installable plugin in Craft. You can install it in the cp or use `./craft install/plugin schematic`

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

The most common usage pattern of this tool, to synchronize from a development to a production environment, would be:

1. Create a Craft project locally
2. Set up all of the desired plugins, sections, templates, etc.
3. Run a Schematic export locally
4. Optionally, if a revision control system is used, commit the schema file to the local repository
5. Deploy the Craft application to a production environment
6. Run a Schematic import remotely

Or, to synchronize from a production to a development environment:

1. Run a Schematic export remotely
2. Pull the schema file locally
3. Optionally, if a revision control system is used, commit the schema file to the local repository
4. Run a Schematic import locally

### Exporting

[](#exporting)

An export can be created by running:

```
./craft schematic/export

```

To skip exporting a specific of data type, exclusions can be specified in the following form:

```
./craft schematic/export --exclude=volumes

```

Multiple exclusions can also be specified:

```
./craft schematic/export --exclude=volumes,categoryGroups

```

The same goes for only exporting a subset of data types:

```
./craft schematic/export --include=volumes,categoryGroups

```

See \[Supported DataTypes\](#Supported DataTypes)

An export will generate a schema file at `config/schema.yml`. The file path can be changed using the `--file` flag, for instance `craft schematic/export --file=path/to/my-schema.yml`

### Importing

[](#importing)

To run an import with schematic, a schema file needs to be present. An import can be created by running:

```
./craft schematic/import

```

By default schematic will look at `config/schema.yml`. To change the path where schematic will look for the schema file, use the `--file` flag.

Optionally the `--force` flag can be used to make the import delete any items which are not mentioned in the import file.

**WARNING!!** This will also delete any *related* content.

To skip importing a specific of data type, exclusions can be specified in the following form:

```
./craft schematic/import --exclude=volumes

```

Multiple exclusions can also be specified:

```
./craft schematic/import --exclude=volumes,categoryGroups

```

See \[Supported DataTypes\](#Supported DataTypes)

### Supported DataTypes

[](#supported-datatypes)

Here is a list of all of the data types and their corresponding exclude parameter values:

Data TypeExclude/Include ParameterpluginspluginsSitessitesAsset TransformsassetTransformsCategory GroupscategoryGroupsElement IndexeselementIndexSettingsEmail SettingsemailSettingsFieldsfieldsGeneral SettingsgeneralSettingsGlobal SetsglobalSetsPluginspluginsSectionssectionsTag GroupstagGroupsUser SettingsuserSettingsUser GroupsuserGroupsVolumesvolumes### Overrides and environment variables

[](#overrides-and-environment-variables)

Specific keys can be overriden by adding a key in `config/override.yml` and setting the corresponding environment variable. The key name in the `override.yml` needs to be the same as the key you want to override from `schema.yml`, including any parent key names.

The override file is also applied back when exporting, so your variables are not overriden by actual values. Schematic also supports passing an override file using the `--override-file` flag, for instance: `./craft schematic/import --override-file=path/to/your/config/override.yml`.

#### Example

[](#example)

If the following `override.yml` is defined:

```
parent:
    key_name: %KEY_VALUE%
```

Then the environment variable `KEY_VALUE` needs to be set. The value of this environment variable will override the key `key_name`. If the environment variable is not set Schematic will throw an error.

Environment variables can also directly be used in the `schema.yml` file. Beware that if you do that, they will be overriden on export by their environment variable's values.

### Events

[](#events)

Custom converters can be injected with the `EVENT_RESOLVE_CONVERTER` event. This can be especially useful for importing and exporting custom field types. The converters need to implement the `NerdsAndCompany\Schematic\Interfaces\ConverterInterface`.

```
Event::on(Schematic::class, Schematic::EVENT_RESOLVE_CONVERTER, function (ConverterEvent $event) {
    if ($event->modelClass = "My\Custom\Field") {
      $event->converterClass = "My\Custom\FieldConverter";
    }
});
```

Custom source mappings can be injected with the `EVENT_MAP_SOURCE` event. This can be especially useful for importing and exporting custom sources.

```
Event::on(Schematic::class, Schematic::EVENT_MAP_SOURCE, function (SourceMappingEvent $event) {
    list($sourceType, $sourceFrom) = explode(':', $event->source);

    switch ($sourceType) {
        case 'plugin-source':
            $event->service = Craft::$app->customService;
            $event->method = 'getCustomModelBy';
            break;
    }
});
```

### Caveats

[](#caveats)

Schematic uses handles to identify content. When a handle is changed in the schema file and import is run with force a new content type will be created with that handle, and the old content type will be deleted!

It is recommended to change content type handles with craft content migrations and to run these migration before running a schematic import.

License
-------

[](#license)

This project has been licensed under the MIT License (MIT). Please see [License File](LICENSE) for more information.

Changelog
---------

[](#changelog)

[CHANGELOG.md](CHANGELOG.md)

Credits
-------

[](#credits)

Inspired and based on the awesome [ArtVandelay Plugin](https://github.com/xodigital/ArtVandelay) and built by [these awesome individuals](https://github.com/nerds-and-company/schematic/graphs/contributors)

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 89.6% 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 ~16 days

Total

74

Last Release

2654d ago

Major Versions

2.0.1 → 3.0.02015-12-16

3.8.8 → 4.0.02018-04-16

3.8.9 → 4.0.132018-07-18

3.8.10 → 4.0.182018-11-19

3.8.12 → 4.1.12019-01-10

PHP version history (4 changes)3.0.0PHP ^5.5|^7.0

3.5.2PHP &gt;=5.5

4.0.0PHP ^7.1

4.0.1PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/473941cfd5dd7f9070a5ee2e0c7fe71ef6f9aed74e40cee91cebf77a2392bb27?d=identicon)[nerds-and-company](/maintainers/nerds-and-company)

---

Top Contributors

[![bvangennep](https://avatars.githubusercontent.com/u/12080429?v=4)](https://github.com/bvangennep "bvangennep (250 commits)")[![boboldehampsink](https://avatars.githubusercontent.com/u/378974?v=4)](https://github.com/boboldehampsink "boboldehampsink (18 commits)")[![nschmoller](https://avatars.githubusercontent.com/u/629616?v=4)](https://github.com/nschmoller "nschmoller (3 commits)")[![Potherca](https://avatars.githubusercontent.com/u/195757?v=4)](https://github.com/Potherca "Potherca (3 commits)")[![Zae](https://avatars.githubusercontent.com/u/96126?v=4)](https://github.com/Zae "Zae (2 commits)")[![dnunez24](https://avatars.githubusercontent.com/u/323802?v=4)](https://github.com/dnunez24 "dnunez24 (2 commits)")[![Obermeijer](https://avatars.githubusercontent.com/u/5425782?v=4)](https://github.com/Obermeijer "Obermeijer (1 commits)")

---

Tags

craftcraft-plugin

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/itmundi-schematic/health.svg)

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

###  Alternatives

[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

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