Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
vendor
/.idea
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ This change log adheres to [Keep a CHANGELOG](http://keepachangelog.com/).

## Unreleased

## 1.3.0 - 2025-03-21
- [Merges PR #16](https://github.com/Rarst/wps/pull/16) submitted to Rarst/wps to update `composer-installers` version
- Installs plugin as a `mu-plugin` to better support development on WordPress multi-site
- Renames plugin from `wps` to `wpWhoops` to make it more identifiable on WP Admin screens
- Adds version number string to plugin file header and composer.json

## 1.2 - 2018-12-18

### Added
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,28 @@ $wps['run']->silenceErrorsInPaths( '~^((?!/my-plugin/).)*$~', E_NOTICE | E_WARNI
// Silence for plugins _except_ specific plugin.
$wps['run']->silenceErrorsInPaths( '~/wp-content/plugins/(?!my-plugin)~', E_NOTICE | E_WARNING );
```
### Testing a fatal error state

If you desire a method to test that the plugin is installed correctly, you can [create a simple mu-plugin](https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/). At `/wp-content/mu-plugins` create the file `trigger-fatal-error.php`. Add the following code:

```php
/**
* Plugin Name: Trigger Fatal Error
*/
add_action('wp_loaded', function () {
if(
isset($_GET['triggerFatalError']) &&
WP_DEBUG &&
WP_DEBUG_DISPLAY
) {
noSuchFunction();
}
}, 1);
```

On the frontend of your site, trigger an error by appending `?triggerFatalError=true` to your URL.

Like Whoops, this should only be used in a non-production environment.

## License

Expand Down
22 changes: 17 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,43 @@
{
"name" : "rarst/wps",
"name" : "philipdowner/wp-whoops",
"description": "WordPress plugin for whoops error handler.",
"version": "1.3.0",
"keywords" : [
"wordpress",
"wordpress-plugin",
"whoops",
"error"
],
"type" : "wordpress-plugin",
"type" : "wordpress-muplugin",
"homepage" : "https://github.com/Rarst/wps",
"license" : "MIT",
"authors" : [
{
"name" : "Andrey Savchenko",
"email" : "[email protected]",
"homepage": "http://www.Rarst.net/"
},
{
"name": "Philip Downer",
"email": "[email protected]",
"homepage": "https://philipdowner.com"
}
],
"support" : {
"issues": "https://github.com/Rarst/wps/issues"
},
"require" : {
"php" : ">=5.5.9",
"composer/installers": "~1.6",
"php": "^7.2 || ^8.0",
"composer/installers": "^v2.3.0",
"filp/whoops" : "^2.3.1",
"pimple/pimple" : "^3.2.3"
},
"autoload" : {
"classmap" : ["php/"]
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
}
Loading