{"id":18929513,"url":"https://github.com/thecodingmachine/whoops-stackphp","last_synced_at":"2025-04-15T15:31:06.113Z","repository":{"id":24733016,"uuid":"28145298","full_name":"thecodingmachine/whoops-stackphp","owner":"thecodingmachine","description":"This package contains a StackPHP middleware that catches all exceptions and redirects those to the Whoops error handling library.","archived":false,"fork":false,"pushed_at":"2016-04-20T15:33:57.000Z","size":4,"stargazers_count":14,"open_issues_count":1,"forks_count":3,"subscribers_count":17,"default_branch":"2.0","last_synced_at":"2025-04-11T18:59:52.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodingmachine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-17T16:26:17.000Z","updated_at":"2019-02-17T00:40:55.000Z","dependencies_parsed_at":"2022-07-24T02:32:11.282Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/whoops-stackphp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fwhoops-stackphp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fwhoops-stackphp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fwhoops-stackphp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fwhoops-stackphp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/whoops-stackphp/tar.gz/refs/heads/2.0","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249097870,"owners_count":21212364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T11:33:10.617Z","updated_at":"2025-04-15T15:31:05.873Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Whoops middleware for StackPHP\n==============================\n\nThis package contains a [StackPHP middleware](http://stackphp.com/) that catches all exceptions and redirects those to the [Whoops error handling library](http://filp.github.io/whoops/).\n\nInstallation\n------------\n\nThrough [Composer](https://getcomposer.org/) as [mouf/whoops-stackphp](https://packagist.org/packages/mouf/whoops-stackphp).\n\nUsage\n-----\n\nSimply use the `WhoopsMiddleWare` class in your middleware stack:\n\n```php\nuse Whoops\\StackPhp\\WhoopsMiddleWare;\n\n$router = new WhoopsMiddleWare(\n\tnew MyOtherRouter(\n\t\tnew YetAnotherRouter()));\n\n```\n\nIf an exception is thrown, or an error is raised, Whoops will display a nice error message:\n\n[![Sample error screen](http://filp.github.io/whoops/screen.png)](http://filp.github.io/whoops/demo/)\n\nThe `WhoopsMiddleWare` constructor accepts 3 parameters:\n\n```php\npublic function __construct(HttpKernelInterface $router, $catchExceptions = true, $catchErrors = true);\n```\n\n- **$router**: this is the next router to be called on the Stack\n- **$catchExceptions**: Set to true to catch exception. Set to false to ignore exceptions (for production servers)\n- **$catchErrors**: Set to true to catch raised errors. Set to false to ignore raised errors (for production servers)\n\nNote: `$catchExceptions` and `$catchErrors` can be passed a boolean, a callable (that returns a boolean) or a [ConditionInterface](http://mouf-php.com/packages/mouf/utils.common.conditioninterface/README.md) that evaluates to true or false.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fwhoops-stackphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fwhoops-stackphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fwhoops-stackphp/lists"}