digitalpolygon/polymer-drupal-contracts

Stable PSR-14 event contracts shared across the Polymer Drupal family. A normal PSR-4 library, not a runtime-loaded Polymer extension.

Maintainers

Package info

github.com/digitalpolygon/polymer-drupal-contracts

pkg:composer/digitalpolygon/polymer-drupal-contracts

Statistics

Installs: 6

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

0.x-dev 2026-06-05 21:52 UTC

This package is auto-updated.

Last update: 2026-06-05 21:52:57 UTC


README

Important

This repository is a read-only split mirror of packages/drupal-contracts in the polymer-drupal-monorepo. Development happens there — please open issues and pull requests against the monorepo.

Polymer Drupal Contracts

Stable, dependency-light event contracts shared across the Polymer Drupal family.

This is a normal PSR-4 library, not a runtime-loaded Polymer extension: it declares ordinary autoload.psr-4 and has no .poly_info.yml, service provider, or runtime-forced namespace. Plugins couple to the contracts here — never to one another's implementations.

Listening to an event does not require the emitting plugin to be installed; the event simply never fires unless its emitter is installed and enabled. Keep the two concerns separate: contracts = what I react to; composer/enable dependency = whether the emitter exists.

Versioning

This is the strictest-semver package in the family. Implementations change freely; bump this package's major only when an event name or payload shape breaks. Plugins should require digitalpolygon/polymer-drupal-contracts: ^1 once it is stabilized.

Event catalog

DigitalPolygon\Polymer\Drupal\Contracts\Event\DrupalSettingsEvents

Name Constant Payload Shape
polymer_drupal.settings.collect_files COLLECT_SETTINGS_FILES CollectSettingsFilesEvent collect
polymer_drupal.settings.alter_files ALTER_SETTINGS_FILES AlterSettingsFilesEvent alter
  • collect — listeners contribute keyed PHP settings-file snippets for a site via addSettingsFile($id, $snippet).
  • alter — listeners may reorder/remove/replace the resolved set via setSettingsFiles($snippets) before it is written to the site's settings.

Emitted by polymer-drupal during site setup; polymer-pantheon-drupal listens to contribute its Pantheon integration settings.