{"id":13711993,"url":"https://github.com/middlewares/debugbar","last_synced_at":"2026-01-07T23:54:53.834Z","repository":{"id":48811467,"uuid":"70315705","full_name":"middlewares/debugbar","owner":"middlewares","description":"PSR-15 middleware to insert PHP DebugBar automatically in html responses","archived":false,"fork":false,"pushed_at":"2025-03-26T14:44:07.000Z","size":58,"stargazers_count":16,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T09:22:15.047Z","etag":null,"topics":["debugbar","debugger","http","middleware","psr-15"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/middlewares.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-08T08:16:08.000Z","updated_at":"2025-03-23T20:01:54.000Z","dependencies_parsed_at":"2024-06-19T00:14:04.253Z","dependency_job_id":"b6970b97-4023-498f-941a-b79946ccfb08","html_url":"https://github.com/middlewares/debugbar","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":"0.16129032258064513","last_synced_commit":"8599569c0cd08caaa1513fb830e4fc221b2ad7b7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middlewares%2Fdebugbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middlewares%2Fdebugbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middlewares%2Fdebugbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/middlewares%2Fdebugbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/middlewares","download_url":"https://codeload.github.com/middlewares/debugbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772238,"owners_count":21801884,"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":["debugbar","debugger","http","middleware","psr-15"],"created_at":"2024-08-02T23:01:13.787Z","updated_at":"2026-01-07T23:54:53.796Z","avatar_url":"https://github.com/middlewares.png","language":"PHP","readme":"# middlewares/debugbar\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Software License][ico-license]](LICENSE)\n![Testing][ico-ga]\n[![Total Downloads][ico-downloads]][link-downloads]\n\nMiddleware to insert [PHP DebugBar](http://phpdebugbar.com) automatically in html responses.\n\n## Requirements\n\n* PHP \u003e= 7.2\n* A [PSR-7 http library](https://github.com/middlewares/awesome-psr15-middlewares#psr-7-implementations)\n* A [PSR-15 middleware dispatcher](https://github.com/middlewares/awesome-psr15-middlewares#dispatcher)\n\n## Installation\n\nThis package is installable and autoloadable via Composer as [middlewares/debugbar](https://packagist.org/packages/middlewares/debugbar).\n\n```sh\ncomposer require middlewares/debugbar\n```\n\n## Example\n\n```php\n$dispatcher = new Dispatcher([\n\tnew Middlewares\\Debugbar()\n]);\n\n$response = $dispatcher-\u003edispatch(new ServerRequest());\n```\n\n## Usage\n\nYou can provide a `DebugBar\\DebugBar` instance to the constructor or an instance of `DebugBar\\StandardDebugBar` will be created automatically. Optionally, you can provide a `Psr\\Http\\Message\\ResponseFactoryInterface` and `Psr\\Http\\Message\\StreamFactoryInterface` to create the new responses. If it's not defined, [Middleware\\Utils\\Factory](https://github.com/middlewares/utils#factory) will be used to detect it automatically.\n\n```php\n//Create a StandardDebugBar automatically\n$debugbar = new Middlewares\\Debugbar();\n\n//Use other Debugbar instance\n$debugbar = new Middlewares\\Debugbar($myDebugbar);\n\n//Use other Debugbar instance and PSR-17 factories\n$debugbar = new Middlewares\\Debugbar($myDebugbar, $myResponseFactory, $myStreamFactory);\n```\n\n### captureAjax\n\nUse this option to capture ajax requests and send the data in the headers. [More info about AJAX and Stacked data](http://phpdebugbar.com/docs/ajax-and-stack.html#ajax-and-stacked-data). By default it's disabled.\n\n```php\n$debugbar = (new Middlewares\\Debugbar())-\u003ecaptureAjax();\n```\n\n### inline\n\nSet true to dump the js/css code inline in the html. This fixes (or mitigate) some issues related with loading the debugbar assets.\n\n```php\n$debugbar = (new Middlewares\\Debugbar())-\u003einline();\n```\n### renderOptions\n\nUse this option to pass  render options to the debugbar as an array. A list of available options can be found at https://github.com/php-debugbar/php-debugbar/blob/master/src/DebugBar/JavascriptRenderer.php#L132\n\nAn example usage would be to pass a new location for the `base_url` so that you can rewrite the location of the files needed to render the debug bar. This can be used with symlinks, .htaccess or routes to the files to ensure the debugbar files are accessible.\n\n```php\n$debugbar = (new Middlewares\\Debugbar())-\u003erenderOptions(array('base_url' =\u003e \"/MyProjectsSubDirectory/php-debugbar/php-debugbar\"));\n```\n---\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information about recent changes and [CONTRIBUTING](CONTRIBUTING.md) for contributing details.\n\nThe MIT License (MIT). Please see [LICENSE](LICENSE) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/middlewares/debugbar.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-ga]: https://github.com/middlewares/debugbar/workflows/testing/badge.svg\n[ico-downloads]: https://img.shields.io/packagist/dt/middlewares/debugbar.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/middlewares/debugbar\n[link-downloads]: https://packagist.org/packages/middlewares/debugbar\n","funding_links":[],"categories":["Packages"],"sub_categories":["Debugging"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiddlewares%2Fdebugbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiddlewares%2Fdebugbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiddlewares%2Fdebugbar/lists"}