mirror of
https://github.com/filp/whoops.git
synced 2026-09-12 18:56:22 +00:00
Zend integration: recommend the package by ghislainf
This commit is contained in:
@@ -44,7 +44,7 @@ see instructions on how to integrate Whoops into
|
||||
[Phalcon](docs/Framework%20Integration.md#integrating-with-phalcon),
|
||||
[Laravel 3](https://gist.github.com/hugomrdias/5169713#file-start-php) (thanks, [@hugomrdias](https://github.com/hugomrdias)),
|
||||
[CakePHP](https://github.com/oldskool/WhoopsCakephp) (thanks, [@oldskool](https://github.com/oldskool)),
|
||||
[Zend Framework 2](docs/Framework%20Integration.md#integrating-with-zend-framework-2).
|
||||
[Zend Framework 2](https://github.com/ghislainf/zf2-whoops) (thanks, [@ghislainf](https://github.com/ghislainf)).
|
||||
|
||||
If you are not using any of these frameworks, have a look at the **example files** in `examples/` to get a feel for how things work. I promise it's really simple!
|
||||
|
||||
|
||||
@@ -47,45 +47,6 @@ new Whoops\Provider\Phalcon\WhoopsServiceProvider($di);
|
||||
```
|
||||
|
||||
|
||||
# Integrating with Zend Framework 2
|
||||
|
||||
User [@zsilbi](https://github.com/zsilbi) contributed a provider for ZF2 integration,
|
||||
available in the following location:
|
||||
|
||||
https://github.com/filp/whoops/tree/master/src/Whoops/Provider/Zend
|
||||
|
||||
**Instructions:**
|
||||
|
||||
- Add Whoops as a module to you app (/vendor/Whoops)
|
||||
- Whoops must be the first module:
|
||||
|
||||
```php
|
||||
'modules' => array(
|
||||
'Whoops',
|
||||
'Application'
|
||||
)
|
||||
```
|
||||
|
||||
- Move Module.php from /Whoops/Provider/Zend/Module.php to /Whoops/Module.php
|
||||
- Use optional configurations in your controller config:
|
||||
|
||||
```php
|
||||
return array(
|
||||
'view_manager' => array(
|
||||
'display_not_found_reason' => true,
|
||||
'display_exceptions' => true,
|
||||
'json_exceptions' => array(
|
||||
'display' => true,
|
||||
'ajax_only' => true,
|
||||
'show_trace' => true
|
||||
)
|
||||
),
|
||||
);
|
||||
```
|
||||
|
||||
- NOTE: ob_clean(); is used to remove previous output, so you may use ob_start(); at the beginning of your app (index.php)
|
||||
|
||||
|
||||
# Contributing an integration with a framework
|
||||
|
||||
Lately we're prefering to keep integration libraries out of the Whoops core.
|
||||
|
||||
Reference in New Issue
Block a user