Title: factories use container as service locator and uses classnames as keys.. · Issue #23 · php-middleware/phpdebugbar · GitHub
Open Graph Title: factories use container as service locator and uses classnames as keys.. · Issue #23 · php-middleware/phpdebugbar
X Title: factories use container as service locator and uses classnames as keys.. · Issue #23 · php-middleware/phpdebugbar
Description: I just stumbled over the middleware and was surprised that the docs said it supports psr-11, wondering what it would load through it. A quick look at the code revealed several issues: the factory classes all use the container in a Servic...
Open Graph Description: I just stumbled over the middleware and was surprised that the docs said it supports psr-11, wondering what it would load through it. A quick look at the code revealed several issues: the factory c...
X Description: I just stumbled over the middleware and was surprised that the docs said it supports psr-11, wondering what it would load through it. A quick look at the code revealed several issues: the factory c...
Opengraph URL: https://github.com/php-middleware/phpdebugbar/issues/23
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"factories use container as service locator and uses classnames as keys..","articleBody":"I just stumbled over the middleware and was surprised that the docs said it supports psr-11, wondering what it would load through it.\r\n\r\nA quick look at the code revealed several issues:\r\n * the factory classes all use the container in a ServiceLocator anti-pattern, which is discouraged in [psr-11 section.13](https://www.php-fig.org/psr/psr-11).\r\n* the identifier within the container is a classname, a better way would be to use an interface here, and then have the classes implementing the service stored for that interface.\r\n* for configuration the key \"config\" is used, which might conflict with the config of some frameworks, furthermore, there is no clear interface, o and even worse the provided ConfigProvider is final, and loads static confic files from its own config dir, that are meant for a specific framework, thus making it a necessity to replace the not-mentioned interfaceless config provider with your own.\r\n","author":{"url":"https://github.com/ppetermann","@type":"Person","name":"ppetermann"},"datePublished":"2018-08-25T17:39:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/23/phpdebugbar/issues/23"}
| 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:fe8710a9-12bb-856f-e312-c9abadf39485 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8DA:167C9F:BCC3A2:1036E39:6A61A205 |
| html-safe-nonce | d3eaec62e4abe4ac968df9304a78b5ea491bf69133a56688bb87b8925e6118b9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOERBOjE2N0M5RjpCQ0MzQTI6MTAzNkUzOTo2QTYxQTIwNSIsInZpc2l0b3JfaWQiOiI1NTYyNzYzNDkyMzM5MDY1MzQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c9bba751a765c8e0b89db6961f6fbaab7c739859330f06349fe9df3525fd1c66 |
| hovercard-subject-tag | issue:354030251 |
| 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/23/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5887912db5b049ef39a0e1a7ea308c289011350d6c07e928afaa02aef9ef736/php-middleware/phpdebugbar/issues/23 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5887912db5b049ef39a0e1a7ea308c289011350d6c07e928afaa02aef9ef736/php-middleware/phpdebugbar/issues/23 |
| og:image:alt | I just stumbled over the middleware and was surprised that the docs said it supports psr-11, wondering what it would load through it. A quick look at the code revealed several issues: the factory c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ppetermann |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9 |
| 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 | ac296ae7f21856f1f92adbad22f870b6fbb4b907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width