From 59d72b63ac5093b2bf1f2f24a911a027ab2d6cae Mon Sep 17 00:00:00 2001 From: Noel Light-Hilary Date: Wed, 13 May 2020 16:41:56 +0100 Subject: [PATCH] Remove hard dependency on OOWP; document what's up --- README.md | 10 ++++++++++ composer.json | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 128d580..0feeefe 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,13 @@ Replaces the built-in WordPress routing logic with one defined by URL patterns. $router = MyRouter::getInstance(); $router->setup(); ~~~~ + +### Use with [OOWP](https://github.com/outlandishideas/oowp) + +To successfully extend `OowpRouter` and gain router awareness of post objects, +you should also install OOWP. This is optional if you avoid the +`Outlandish\Wordpress\Routemaster\Oowp` namespace. + +To install it: + + composer require outlandish/oowp diff --git a/composer.json b/composer.json index 5c19344..75ba475 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,10 @@ }, "require": { "php": ">=5.6", - "ext-json": "*", - "outlandish/oowp": "2.*" + "ext-json": "*" + }, + "suggest": { + "outlandish/oowp": "To optionally use a post-object-aware version of the router and corresponding views" }, "authors": [ {