Title: Assets are in vendor directory · Issue #2 · php-middleware/phpdebugbar · GitHub
Open Graph Title: Assets are in vendor directory · Issue #2 · php-middleware/phpdebugbar
X Title: Assets are in vendor directory · Issue #2 · php-middleware/phpdebugbar
Description: This is not really an issue of this repository, other than it will require a documentation point in the README.md file: the debugbar creates links and script references to files that are in the vendor/ directory. Examples: /vendor/maxime...
Open Graph Description: This is not really an issue of this repository, other than it will require a documentation point in the README.md file: the debugbar creates links and script references to files that are in the ven...
X Description: This is not really an issue of this repository, other than it will require a documentation point in the README.md file: the debugbar creates links and script references to files that are in the ven...
Opengraph URL: https://github.com/php-middleware/phpdebugbar/issues/2
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assets are in vendor directory","articleBody":"This is not really an issue of this repository, other than it will require a documentation point in the README.md file: the debugbar creates links and script references to files that are in the `vendor/` directory. Examples:\n- `/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css`\n- `/vendor/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/styles/github.css`\n- `/vendor/maximebf/debugbar/src/DebugBar/Resources/debugbar.css`\n- etc.\n\nThe issue with this is that for many applications, the web root is not the same as the project root, which means that the `vendor/` directory is not directly accessible via the web.\n\nThere are a few ways to fix the situation.\n\nFirst, you can symlink the `vendor/` directory into your web root:\n\n``` bash\n$ cd public\n$ ln -s ../vendor .\n```\n\nThis is not recommended, as it exposes library code via the web.\n\nA better way is to copy just the assets into a directory of your web root, and pass that relative path to the call to `getJavascriptRenderer()`. As an example:\n\n``` bash\n$ cd public\n$ cp -a ../vendor/maximebf/debugbar/src/DebugBar/Resources phpdebugbar\n```\n\nThe above copies the entire set of assets into a directory named `phpdebugbar/` in your web root. From there, you only need to alter the line where you retrieve the JSON renderer:\n\n``` php\n$debugbarRenderer = $debugbar-\u003egetJavascriptRenderer('phpdebugbar');\n```\n\nOnce you've done that, everything works correctly.\n\nI'd recommend adding this documentation to the `README.md` file to help users understand how to incorporate the middleware in such applications.\n","author":{"url":"https://github.com/weierophinney","@type":"Person","name":"weierophinney"},"datePublished":"2016-01-06T20:12:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/2/phpdebugbar/issues/2"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9e30b038-919e-23f8-db4a-8279eed87521 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BEE8:BBD65:15BAEAB:1DA0402:6A62AFEC |
| html-safe-nonce | c8f406833d4b11985a90f374f7bd97e3601b7f1a79bdc052db9ad519b689da03 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUU4OkJCRDY1OjE1QkFFQUI6MURBMDQwMjo2QTYyQUZFQyIsInZpc2l0b3JfaWQiOiI2ODk3NzAzMTEyNDk1MjQ3MzQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c418eb28392b8ac1c8eee3eadf755e15c53ec2ea2f0b67cb05b502b09c7a1003 |
| hovercard-subject-tag | issue:125253549 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/php-middleware/phpdebugbar/2/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5769944043563d2c549a866e5a04bf0b58f25d42fcfbc0d8456acebacf396099/php-middleware/phpdebugbar/issues/2 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5769944043563d2c549a866e5a04bf0b58f25d42fcfbc0d8456acebacf396099/php-middleware/phpdebugbar/issues/2 |
| og:image:alt | This is not really an issue of this repository, other than it will require a documentation point in the README.md file: the debugbar creates links and script references to files that are in the ven... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | weierophinney |
| hostname | github.com |
| expected-hostname | github.com |
| None | e362a1b5e54cdb52dad78dc403bb9e6a8362e7c0448a1d804fe243f9fac57954 |
| turbo-cache-control | no-preview |
| go-import | github.com/php-middleware/phpdebugbar git https://github.com/php-middleware/phpdebugbar.git |
| octolytics-dimension-user_id | 14027208 |
| octolytics-dimension-user_login | php-middleware |
| octolytics-dimension-repository_id | 41689868 |
| octolytics-dimension-repository_nwo | php-middleware/phpdebugbar |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 41689868 |
| octolytics-dimension-repository_network_root_nwo | php-middleware/phpdebugbar |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5410e150d3e7c804f80827080c5f130c97eaf5a4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width