digitalpolygon / polymer-pantheon-drupal
Helpful scripts and tools for integrating Drupal with Pantheon.
Package info
github.com/digitalpolygon/polymer-pantheon-drupal
Type:polymer-plugin
pkg:composer/digitalpolygon/polymer-pantheon-drupal
Requires
- digitalpolygon/polymer: ^0.2.0-alpha1
- digitalpolygon/polymer-drupal-contracts: ^0.2.0-alpha1
- pantheon-systems/drupal-integrations: * !=11.0.0
Requires (Dev)
- php-parallel-lint/php-parallel-lint: ^1.4
- phpro/grumphp-shim: ^2.5
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^9 || ^10
- squizlabs/php_codesniffer: ^3
This package is auto-updated.
Last update: 2026-06-06 15:15:50 UTC
README
Important
This repository is a read-only split mirror of packages/pantheon-drupal
in the polymer-drupal-monorepo.
Development happens there — please open issues and pull requests against the monorepo.
Polymer for Pantheon Drupal Applications
Polymer extension that provides useful integrations for Pantheon Drupal applications.
- Quicksilver hooks
- GitHub Actions workflows
- Drush site file generation
Internal seam: Hosting/ + Drupal/
This package is structured so the agnostic Pantheon code can be lifted into a
standalone digitalpolygon/polymer-pantheon later (when a second CMS — e.g.
WordPress — needs it) as a clean move + namespace find-replace. See DESIGN.md §7.
src/
├── Hosting/ ← agnostic Pantheon services / value objects / exceptions. The
│ future DigitalPolygon\Polymer\Pantheon\. NO Drupal references.
├── Drupal/ ← glue: listens to polymer-drupal events (via
│ polymer-drupal-contracts) and calls into Hosting/.
├── Plugin/ ← discovered Robo commands / hooks / templates; the seam is
│ │ nested UNDER the fixed discovery roots (see note below):
│ ├── Commands/ (+ Commands/Hosting, Commands/Drupal)
│ ├── Hooks/Hosting/ agnostic Pantheon hooks (PantheonArtifactHook)
│ └── Template/
│ ├── Hosting/ agnostic config + CI (PantheonYaml,
│ │ QuicksilverYaml, GitHubWorkflows/…)
│ └── Drupal/ Drupal-coupled (DrushSiteYaml)
├── ExtensionInfo.php
└── PolymerPantheonDrupalServiceProvider.php
The one-way dependency rule
Nothing under Hosting/ may import Drupal — not Drupal\… (Drupal core),
not DigitalPolygon\Polymer\Drupal\… (the Drupal contracts), and not the
polymer_drupal extension namespace. The urge to add such a use in Hosting/
is the signal the code belongs in Drupal/ instead. This single rule keeps the
future polymer-pantheon truly CMS-agnostic, and it is enforced in CI (the
"Hosting seam" job) across every Hosting/ location — top-level and the ones
nested under Plugin/.
The Drupal/ glue is free to depend on both sides: it listens to
polymer-drupal's events through polymer-drupal-contracts and calls into
Hosting/.
Discovery & the nested seam
Polymer discovers commands, hooks, and templates with a recursive scan rooted
at the fixed Plugin\Commands / Plugin\Hooks / Plugin\Template namespaces,
building each class's FQN from its file path. Because the scan recurses, the seam
is expressed by nesting under those roots — Plugin\Template\Hosting\PantheonYaml
is discovered exactly like Plugin\Template\PantheonYaml would be. No core change
is needed; the fixed discovery roots stay the uniform convention for every plugin.
Commands are seamed like everything else (PWT-130): agnostic Terminus and
platform-file commands live under Plugin\Commands\Hosting
(TerminusCommands, PantheonFileCommands, NewRelicCommands), Drupal-coupled
commands under Plugin\Commands\Drupal (PantheonDrupalCommands). The shared
Terminus knowledge lives in Hosting\Terminus\ (TerminusClient for the
configurable binary, TerminusPlugins for plugin ids and the validator
selector), and the Pantheon repository/multidev rules in
Hosting\Pantheon\PantheonRepository. Command names and aliases are unchanged.