Skip to content

Check for required PHP extensions upon plugin initialization #4791

@swissspidy

Description

@swissspidy

Feature Description

Our plugins requires on things like libxml, DOMDocument, etc. to be available. Let's add some checks for these required features upon plugin initialization so that users know immediately when their server is not compatible.

The AMP plugin does this like so:

https://github.com/ampproject/amp-wp/blob/5f42cde04d84046e106fa9784d4cf2e61f3ba204/amp.php#L22-L154

We can refactor includes/namespace.php to have similar checks.

  • Evaluate currently needed extensions, classes, and functions (likely libxml, DOMDocument)
  • Evaluate needed extensions once Include AMP PHP Library #4513 is merged

Alternatives Considered

Additional Context

There have been some user reports where DOMDocument was not available, or libxml was outdated. Hence the requirement for this.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance Criteria

Implementation Brief

Metadata

Metadata

Assignees

Labels

Group: IntegrationIntegration with other platforms and pluginsGroup: WordPressChanges related to WordPress or Gutenberg integrationP2Should do soonType: EnhancementNew feature or improvement of an existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions