daffie/drupal-core-pgsql-module-remover
Composer 安装命令:
composer require daffie/drupal-core-pgsql-module-remover
包简介
Composer plugin that removes the pgsql module from Drupal core so a contrib/custom module named 'pgsql' can be used.
README 文档
README
A Composer plugin that removes the pgsql module from Drupal core after every
composer install / composer update.
Why
Drupal requires module machine names to be globally unique. Core ships a module
named pgsql (at web/core/modules/pgsql), which collides with any contrib or
custom module that also wants the pgsql name — Drupal's extension discovery
finds two pgsql.info.yml files and errors out.
This plugin deletes core's pgsql module directory so the name is free for the
replacement module. It works the same whether your project is built from
drupal/core, drupal/recommended-project, or drupal/cms, since all three
install the same drupal/core package.
Installation
A stable 1.0.1 release is tagged, so no minimum-stability changes are
needed — Composer resolves it out of the box:
composer require daffie/drupal-core-pgsql-module-remover:^1.0
Composer 2.2+ blocks plugins that aren't explicitly allowed. Add the plugin to
config.allow-plugins in your project's composer.json, otherwise it will
never run:
{
"config": {
"allow-plugins": {
"daffie/drupal-core-pgsql-module-remover": true
}
}
}
This entry is required for every version, including the tagged stable release — it is gated the same as any other plugin. Without it:
composer installfails with aPluginManagererror (contains a Composer plugin which is blocked by your allow-plugins config).- On
composer requirethe package is still added, but the plugin is silently skipped, soweb/core/modules/pgsqlis not removed.
You can also add the entry from the command line:
composer config allow-plugins.daffie/drupal-core-pgsql-module-remover true
How it works
The plugin subscribes to Composer's post-install-cmd and post-update-cmd
events. On each run it locates the installed drupal/core package, resolves its
install path, and deletes <core>/modules/pgsql if present. The operation is
idempotent — if the directory is already gone, it does nothing.
⚠️ Warning: this also removes the PostgreSQL database driver
Core's pgsql module contains the PostgreSQL database driver
(core/modules/pgsql/src/Driver/Database/pgsql). Deleting the module removes
that driver. Only use this plugin if:
- your replacement
pgsqlmodule provides its own PostgreSQL driver, or - the site does not use PostgreSQL.
License
GPL-2.0-or-later
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2026-07-02