wp-oop / wordpress-interface
Interfaces for interop within WordPress
Installs: 51 651
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 2
Open Issues: 3
Requires
- php: ^7.1 | ^8.0
- dhii/human-readable-interface: ^0.2.0-alpha1
- dhii/package-interface: ^0.1-alpha3
Requires (Dev)
- phpunit/phpunit: ^7.0 | ^8.0 | ^9.0
- slevomat/coding-standard: ^6.0
- vimeo/psalm: ^4.4.0
This package is auto-updated.
Last update: 2024-10-29 06:05:47 UTC
README
Interfaces for interop within WordPress.
Details
Often, multiple packages need to operate on the various aspects of WordPress, while centralizing them. Unfortunately, many of these aspects are not represented by any type in WordPress. An example of this is a modular plugin, where each module needs to independently interface with such a part of WordPress that is centralized, like a Plugin or Post entity.
Also, it can be useful to write code that addresses a specific aspect of WordPress, and type-safety is desirable, but WordPress feels too bulky to include. While WordPress can be added as a dev-dependency, the dependency graph will not reflect these hidden requirements. For example, a Post type would be useful to represents a post.
In addition, some modules can be developed in a way to be usable in a variety of platforms. In these cases it would be necessary to rely on a proprietary standard.
This interop standard aims to address the above concerns by providing types for common aspects of WordPress.