pollora/wp-rest
Pollora WP REST adds Laravel-style REST API routing to WordPress: register routes and controllers with an expressive syntax, group endpoints, apply middleware, and return clean JSON responses while staying compatible with the native WordPress REST API.
pollora/wp-rest is a framework-agnostic WordPress REST controller/attribute-discovery package extracted from pollora/framework (src/WpRest) with history preserved. Its deliberate decoupling from the Laravel application container (controllers built by the discovery's instance resolver, HandlesAttributes receiving the PSR-11 container) means it can be adopted without adopting the full Pollora framework, but it also means it does not lean on Laravel's routing, middleware, or service container in the way a typical Laravel package would. Fit is best for teams running WordPress inside or alongside a Laravel/PSR-11 stack.Pollora\WpRest\*, Pollora\Support\WpGlobals) preserve drop-in compatibility for existing Pollora users, and WpGlobals suggests an explicit bridge for WordPress globals rather than hidden coupling. The PSR-11 constructor injection point is a clean seam for our own container.WpGlobals cover multisite and CLI contexts? What is the 1.0.0 timeline relative to the framework release, and will v0.1.x receive fixes meanwhile? Is pollora/framework still shipping WpRest (duplicate-class risk)?routes/api.php ergonomics or Laravel middleware pipelines.WpRestDiscovery. (b) Existing Pollora consumers: swap to the standalone package once pollora/framework drops or aliases src/WpRest; confirm no duplicate class definitions during the overlap, and pin one source of truth. For either path, keep Pollora\Support\WpGlobals usage isolated behind a thin internal adapter so a future 1.0.0 API shift is a one-file change.composer.json conflict/provide rules against pollora/framework before adding it to an existing app. Confirm WordPress minimum version and whether the discovery relies on REST API internals that shifted across WP releases.HandlesAttributes attribute. 2) Add a contract test asserting route registration and container resolution against our pinned WP/Laravel versions. 3) Land on one low-traffic endpoint behind a feature flag. 4) Broaden only after the 1.0.0 release lands, or after we accept the cost of a breaking-change upgrade from 0.1.x.pollora/framework still ships WpRest; WordPress global expectations unmet in CLI, cron, or multisite contexts via WpGlobals; silent route non-registration if discovery is mispointed. Add startup assertions plus an integration test that enumerates registered routes.How can I help you explore Laravel packages today?