dylvn/oro-mate-extension 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dylvn/oro-mate-extension

Composer 安装命令:

composer require dylvn/oro-mate-extension

包简介

OroCommerce introspection extension for Symfony AI Mate

README 文档

README

A Symfony AI Mate extension that exposes OroCommerce datagrid configuration and entity config to AI assistants via MCP tools.

Tools

Datagrid tools

Read YAML configuration files directly from disk — no database connection required.

Tool Description
oro_datagrid_list Lists all datagrid names discovered across all registered bundles. Accepts an optional search substring filter.
oro_datagrid_get Returns the full merged definition for a given datagrid name: resolved mixins, source bundle/file pairs, and attached event listeners.

Entity config tools

Read from the OroCommerce PostgreSQL database (oro_entity_config and oro_entity_config_field tables). These tools only appear in the MCP tool list when oro_mate_extension.database_url is configured.

Tool Description
oro_entity_list Lists all entity configurations. Accepts an optional search substring filter on class name.
oro_entity_get Returns full config for a single entity: decoded data array and a summary of its fields (field_name, type).
oro_entity_field_get Returns full config for a specific field of an entity, including the decoded data array.

Installation

OroCommerce ships with pinned Symfony and PHP versions that typically conflict with symfony/ai-mate. The recommended approach is to install this extension in a standalone workspace that lives outside your OroCommerce project and reads its codebase from disk.

1. Create the workspace

mkdir ai-mate-workspace && cd ai-mate-workspace
composer init

The exact packages required alongside this extension (e.g. symfony/http-kernel) may vary depending on which other Mate extensions you install and your environment. The commands below are a starting point. They may not work as-is.

composer require --dev dylvn/oro-mate-extension

The Mate composer plugin runs automatically during composer install and scaffolds the mate/ directory.

2. Configure the OroCommerce path

Override oro_mate_extension.root_dir in mate/config.php to point at your OroCommerce installation:

$container->parameters()
    ->set('oro_mate_extension.root_dir', '/absolute/path/to/your/orocommerce')
;

3. (Optional) Enable entity config tools

Set oro_mate_extension.database_url to your OroCommerce PostgreSQL DSN. The entity tools will then appear automatically in the MCP tool list.

$container->parameters()
    ->set('oro_mate_extension.database_url', 'pgsql://user:password@localhost:5432/orocommerce')
;

Parameters

Parameter Default Description
oro_mate_extension.root_dir %mate.root_dir% Absolute path to the OroCommerce application root
oro_mate_extension.database_url (empty) PostgreSQL DSN — enables entity config tools when set

How discovery works

Datagrid tools

  1. Bundle discoveryOroBundleLocator scans all bundles.yml files found under Resources/config/oro/ to build the list of registered bundles and their directories.
  2. Datagrid discoveryOroDatagridLocator iterates each bundle directory, parses every datagrids.yml / datagrids.yaml under Resources/, and merges definitions from multiple bundles into a single map.
  3. Event listener discoveryOroDatagridEventLocator scans service YAML files for kernel.event_listener tags whose event name starts with a known oro_datagrid.* prefix.

Directories excluded from scanning: cache, var, public, node_modules, tests, Tests.

Entity config tools

EntityToolsAvailabilityPass (a Symfony CompilerPass) runs at container compilation time. When oro_mate_extension.database_url is empty it sets mate.disabled_features to hide the three entity tools from FilteredDiscoveryLoader. When a DSN is present the pass is a no-op and all tools are visible.

At query time OroConnectionFactory opens a lazy PDO connection to PostgreSQL. EntityConfigDecoder decodes the data column stored as base64(serialize($array)).

License

MIT

dylvn/oro-mate-extension 适用场景与选型建议

dylvn/oro-mate-extension 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「datagrid」 「ai」 「mcp」 「OroCommerce」 「mate」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dylvn/oro-mate-extension 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dylvn/oro-mate-extension 我们能提供哪些服务?
定制开发 / 二次开发

基于 dylvn/oro-mate-extension 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 33
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-27