Download the PHP package pcfreak30/composepress without Composer
On this page you can find all versions of the php package pcfreak30/composepress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pcfreak30/composepress
More information about pcfreak30/composepress
Files in pcfreak30/composepress
Package composepress
Short Description A simple PSR-4 and composer ready plugin framework for the modern wordpress age
License LGPL-3.0-or-later
Informations about the package composepress
ComposePress Core
ComposePress Core is a small runtime boundary for WordPress plugins. It coordinates explicit plugin metadata, hook subscribers, and plugin lifecycle handlers without imposing a domain model or dependency container.
Requirements
- PHP 8.2 or newer
- WordPress loaded before WordPress-specific context or hook operations
Bootstrap
Subscribers receive their application dependencies through constructors and register only WordPress adapters. Business services do not need to depend on ComposePress.
Lifecycle capabilities are opt-in and independent. Implement PluginActivator for activation work and PluginDeactivator for deactivation work; uninstall remains a separate static PluginUninstall contract. Pass only the capabilities the plugin needs:
Requirements are explicit checks that run before subscribers are registered. Each PluginRequirement returns a RequirementResult; unmet results are reported through RequirementsNotMet instead of silently skipping boot.
Testing
The ComposePress\Core\Testing namespace ships pure test doubles for the runtime boundary. They record calls as ordinary objects — no WordPress functions are invoked, so they work in unit tests, integration tests, and any test setup:
RecordingHooks(implementsHooks) records every action/filter registration and removal, including callback, priority, and argument count; asserts throughactionsFor(),filtersFor(),removedActionsFor(),removedFiltersFor(),actionNames(),filterNames(),hasAction(), andhasFilter().RecordingSubscriber(implementsHookSubscriber) captures eachsubscribe()invocation and theHooksinstance it received.RecordingActivatorandRecordingDeactivatorrecord each activation/deactivation call with itsnetworkWideflag.SpyingUninstall(implementsstatic PluginUninstall::uninstall()) records uninstall invocations for use as an uninstaller class string.
RecordingHooks delegates its registration state to the real WP_Hook engine (replace-on-re-add, unique callback ids via _wp_filter_build_unique_id(), exact-priority removal, and hasAction()/hasFilter() returning the registered priority (int) or false, mirroring has_action()/has_filter()) and adds only a call-history recorder. The engine is discovered automatically by WordPressHookEngine: the running WordPress installation when integration testing (or via WP_CORE_DIR), or a roots/wordpress-no-content dev dependency for plain unit tests, whether it was installed into var/wordpress (this package's extra.wordpress-install-dir), the Roots installer's default wordpress/ directory, or its vendor fallback location when the installer plugin is absent. No bootstrap wiring is required in consumer projects.
These fakes are part of the public surface and are versioned with core. Projects consuming this library can depend on them for their own tests and upgrade within normal SemVer guarantees.
Development
This is a clean-slate rewrite. The historical API and implementation are retired.