From 7284985e63022fcef029954c7c15348b2987ca8b Mon Sep 17 00:00:00 2001 From: Denis Sokolov Date: Wed, 12 Mar 2014 18:38:38 +0100 Subject: [PATCH] Deprecate Zend provider explicitly, close #171 --- composer.json | 5 ++++- phpunit.xml.dist | 3 +++ .../Provider => deprecated}/Zend/ExceptionStrategy.php | 3 +++ src/{Whoops/Provider => deprecated}/Zend/Module.php | 3 +++ .../Zend/RouteNotFoundStrategy.php | 3 +++ .../Zend/module.config.example.php | 0 tests/deprecated/Zend/ModuleTest.php | 10 ++++++++++ 7 files changed, 26 insertions(+), 1 deletion(-) rename src/{Whoops/Provider => deprecated}/Zend/ExceptionStrategy.php (96%) rename src/{Whoops/Provider => deprecated}/Zend/Module.php (97%) rename src/{Whoops/Provider => deprecated}/Zend/RouteNotFoundStrategy.php (96%) rename src/{Whoops/Provider => deprecated}/Zend/module.config.example.php (100%) create mode 100644 tests/deprecated/Zend/ModuleTest.php diff --git a/composer.json b/composer.json index 7eb1e65..ac1e904 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,10 @@ "autoload": { "psr-0": { "Whoops": "src/" - } + }, + "classmap": [ + "src/deprecated" + ] }, "extra": { "branch-alias": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index df20f21..04bc278 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,6 +5,9 @@ tests/Whoops/ + + tests/deprecated/ + diff --git a/src/Whoops/Provider/Zend/ExceptionStrategy.php b/src/deprecated/Zend/ExceptionStrategy.php similarity index 96% rename from src/Whoops/Provider/Zend/ExceptionStrategy.php rename to src/deprecated/Zend/ExceptionStrategy.php index d840366..acfb355 100644 --- a/src/Whoops/Provider/Zend/ExceptionStrategy.php +++ b/src/deprecated/Zend/ExceptionStrategy.php @@ -12,6 +12,9 @@ use Zend\Mvc\MvcEvent; use Zend\Mvc\Application; use Zend\Http\Response; +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ class ExceptionStrategy extends BaseExceptionStrategy { protected $run; diff --git a/src/Whoops/Provider/Zend/Module.php b/src/deprecated/Zend/Module.php similarity index 97% rename from src/Whoops/Provider/Zend/Module.php rename to src/deprecated/Zend/Module.php index 44f14ca..61456e1 100644 --- a/src/Whoops/Provider/Zend/Module.php +++ b/src/deprecated/Zend/Module.php @@ -26,6 +26,9 @@ use Whoops\Handler\PrettyPageHandler; use Zend\EventManager\EventInterface; use Zend\Console\Request as ConsoleRequest; +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ class Module { protected $run; diff --git a/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php b/src/deprecated/Zend/RouteNotFoundStrategy.php similarity index 96% rename from src/Whoops/Provider/Zend/RouteNotFoundStrategy.php rename to src/deprecated/Zend/RouteNotFoundStrategy.php index c4ab3e0..1934c5b 100644 --- a/src/Whoops/Provider/Zend/RouteNotFoundStrategy.php +++ b/src/deprecated/Zend/RouteNotFoundStrategy.php @@ -12,6 +12,9 @@ use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ViewModel; +/** + * @deprecated Use https://github.com/ghislainf/zf2-whoops + */ class RouteNotFoundStrategy extends BaseRouteNotFoundStrategy { protected $run; diff --git a/src/Whoops/Provider/Zend/module.config.example.php b/src/deprecated/Zend/module.config.example.php similarity index 100% rename from src/Whoops/Provider/Zend/module.config.example.php rename to src/deprecated/Zend/module.config.example.php diff --git a/tests/deprecated/Zend/ModuleTest.php b/tests/deprecated/Zend/ModuleTest.php new file mode 100644 index 0000000..b6df2dc --- /dev/null +++ b/tests/deprecated/Zend/ModuleTest.php @@ -0,0 +1,10 @@ +assertTrue(class_exists('\Whoops\Module')); + } +}