PHPackages                             magendoo/module-declarative-enum-support - 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. magendoo/module-declarative-enum-support

ActiveMagento2-module

magendoo/module-declarative-enum-support
========================================

Lets Magento 2 declarative schema (setup:upgrade) read past MySQL ENUM/SET columns in third-party database tables instead of failing with 'Cannot process definition to array for type enum'.

v1.0.0(1mo ago)10MITPHPPHP &gt;=8.1

Since Jul 18Pushed 1mo agoCompare

[ Source](https://github.com/magendooro/magento2-declarative-enum-support)[ Packagist](https://packagist.org/packages/magendoo/module-declarative-enum-support)[ Fund](https://magendoo.ro)[ RSS](/packages/magendoo-module-declarative-enum-support/feed)WikiDiscussions main Synced 2w ago

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

Magendoo DeclarativeEnumSupport for Magento 2
=============================================

[](#magendoo-declarativeenumsupport-for-magento-2)

Lets `bin/magento setup:upgrade` succeed when the Magento database contains third-party tables with MySQL `ENUM` or `SET` columns.

The problem
-----------

[](#the-problem)

Magento's declarative schema reads **every table in the database** — not just the tables declared in `db_schema.xml` files. If any table contains an `ENUM`or `SET` column, `setup:upgrade` aborts:

```
Upgrade failed: Cannot process definition to array for type enum

```

and, once past that, a second failure in the DTO layer:

```
Types enum is not declared

```

This bites any installation whose database is shared with other applications (microservices, ETL pipelines, reporting tools) or contains tables left behind by legacy extensions — Magento itself never creates `ENUM`/`SET` columns, but it refuses to *read past* anyone else's.

What this module does
---------------------

[](#what-this-module-does)

It registers handlers for the `enum` and `set` column types in the two declarative-schema registries that lack them:

RegistryClassHandler`definitionProcessors``Magento\Framework\Setup\Declaration\Schema\Db\DefinitionAggregator`Pass-through processor (`Model/EnumDefinition.php`)`typeFactories``Magento\Framework\Setup\Declaration\Schema\Dto\ElementFactory`Stock `Blob` DTO factoryTables that are not declared in any `db_schema.xml` are never diffed, so declarative schema only needs to *parse* their columns without crashing — it never generates DDL for them. Your third-party tables are read, ignored, and left untouched.

Declaring an `ENUM` column **in** a `db_schema.xml` remains unsupported: the pass-through processor throws a `LogicException` if declarative schema ever tries to render one, so misuse fails loudly instead of producing broken DDL.

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

[](#installation)

### Via composer (VCS repository)

[](#via-composer-vcs-repository)

```
composer config repositories.magendoo-declarative-enum-support vcs https://github.com/magendooro/magento2-declarative-enum-support
composer require magendoo/module-declarative-enum-support
bin/magento module:enable Magendoo_DeclarativeEnumSupport
bin/magento setup:upgrade
```

### Via app/code

[](#via-appcode)

```
mkdir -p app/code/Magendoo
git clone https://github.com/magendooro/magento2-declarative-enum-support app/code/Magendoo/DeclarativeEnumSupport
bin/magento module:enable Magendoo_DeclarativeEnumSupport
bin/magento setup:upgrade
```

Compatibility
-------------

[](#compatibility)

- Magento Open Source / Adobe Commerce 2.4.x (tested on 2.4.9)
- PHP 8.1+

Maintenance note (important)
----------------------------

[](#maintenance-note-important)

A module's `di.xml` argument **replaces** — it does not merge with — the same argument declared in the primary config `app/etc/di.xml`; primary and module configs are combined per-argument, not per-array-item. This module therefore ships **full copies** of the `typeFactories` and `definitionProcessors`registries with `enum`/`set` appended.

After upgrading Magento, diff this module's `etc/di.xml` against your `app/etc/di.xml`: if a new core release adds column types to either registry, they must be re-synced here, otherwise the new types would be masked.

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ef4a3a58fa09cd06825953bc91392aa224ca399f491b77df13ac932cfcddeea?d=identicon)[florinel-chis](/maintainers/florinel-chis)

---

Top Contributors

[![florinel-chis](https://avatars.githubusercontent.com/u/2117053?v=4)](https://github.com/florinel-chis "florinel-chis (2 commits)")

---

Tags

declarative-schemamagento2magento2-module

### Embed Badge

![Health badge](/badges/magendoo-module-declarative-enum-support/health.svg)

```
[![Health](https://phpackages.com/badges/magendoo-module-declarative-enum-support/health.svg)](https://phpackages.com/packages/magendoo-module-declarative-enum-support)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.5M2](/packages/fastly-magento2)[mollie/magento2

Mollie Payment Module for Magento 2

1162.0M19](/packages/mollie-magento2)[adyen/module-payment

Official Magento2 Plugin to connect to Payment Service Provider Adyen.

1673.2M11](/packages/adyen-module-payment)[algolia/algoliasearch-magento-2

Algolia Search &amp; Discovery extension for Magento 2

1912.0M23](/packages/algolia-algoliasearch-magento-2)[nosto/module-nostotagging

Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.

28726.5k7](/packages/nosto-module-nostotagging)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1862.4k](/packages/myparcelnl-magento)

PHPackages © 2026

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