Title: Add gotcha docs for things that have been `Configure::consume()`d · Issue #20 · loadsys/CakePHP-ConfigReadShell · GitHub
Open Graph Title: Add gotcha docs for things that have been `Configure::consume()`d · Issue #20 · loadsys/CakePHP-ConfigReadShell
X Title: Add gotcha docs for things that have been `Configure::consume()`d · Issue #20 · loadsys/CakePHP-ConfigReadShell
Description: Cake 3 by default strips a lot of Configure's values out via ::consume(). This is done in config/boostrap.php for: Cache ConnectionManager (Datasources configs) Email (EmailTransport & Email configs) Log Security.salt Using Configure::co...
Open Graph Description: Cake 3 by default strips a lot of Configure's values out via ::consume(). This is done in config/boostrap.php for: Cache ConnectionManager (Datasources configs) Email (EmailTransport & Email config...
X Description: Cake 3 by default strips a lot of Configure's values out via ::consume(). This is done in config/boostrap.php for: Cache ConnectionManager (Datasources configs) Email (EmailTransport & Emai...
Opengraph URL: https://github.com/loadsys/CakePHP-ConfigReadShell/issues/20
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add gotcha docs for things that have been `Configure::consume()`d","articleBody":"Cake 3 by default strips a lot of Configure's values out via `::consume()`. This is done in `config/boostrap.php` for:\n- Cache\n- ConnectionManager (Datasources configs)\n- Email (EmailTransport \u0026 Email configs)\n- Log\n- Security.salt\n\nUsing `Configure::consume()` is meant to keep the values left in `Configure` specific to the given app (I guess), but it greatly complicates the process of obtaining environment-specific Configure values for \"anything\" in the app since those configs need to be fetch by calling the appropriate singleton class instead (example: `ConnectionManager::config('default)`).\n\nThe ConfigReadShell's documentation needs to spell out that if you're trying to get a \"consumed\" value, it won't work unless you edit your bootstrap.php to use `Configure::read()` instead of `Configure::consume()`.\n\nAnother option is to invoke the Cake ConsoleShell:\n\n``` shell\n$ echo 'use Cake\\Datasource\\ConnectionManager; ConnectionManager::config(\"default\");'\n | bin/cake Console\n\nWelcome to CakePHP v3.0.7 Console\n---------------------------------------------------------------\nApp : src\nPath: /var/www/src/\n---------------------------------------------------------------\nYou can exit with `CTRL-C` or `exit`\n\nPsy Shell v0.4.4 (PHP 5.6.10-1+deb.sury.org~precise+1 — cli) by Justin Hileman\n=\u003e [\n \"className\" =\u003e \"Cake\\\\Database\\\\Connection\",\n \"driver\" =\u003e \"Cake\\\\Database\\\\Driver\\\\Mysql\",\n \"persistent\" =\u003e false,\n \"host\" =\u003e \"localhost\",\n \"username\" =\u003e \"vagrant\",\n \"password\" =\u003e \"vagrant\",\n \"database\" =\u003e \"vagrant\",\n \"encoding\" =\u003e \"utf8\",\n \"timezone\" =\u003e \"UTC\",\n \"cacheMetadata\" =\u003e true,\n \"quoteIdentifiers\" =\u003e false,\n \"name\" =\u003e \"default\"\n ]\n\nExit: Ctrl+D\n\n```\n\nObviously there's another problem with this, since the ConsoleShell spits out a bunch of other extraneous garbage. This could be mitigated with a `--quiet` option to suppress that stuff, but that would involve customizing your `ConsoleShell` instead of your bootstrap.\n","author":{"url":"https://github.com/beporter","@type":"Person","name":"beporter"},"datePublished":"2015-06-28T16:50:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/20/CakePHP-ConfigReadShell/issues/20"}
| 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:0185624f-7fb2-53a2-b92c-1f662f9639f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4B4:3F705B:669E922:8D50FD3:6A5E8519 |
| html-safe-nonce | 0a56940fd6601ed885591b14fd8a4e4d802515c70ceb7364f8744e0d1669504a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEI0OjNGNzA1Qjo2NjlFOTIyOjhENTBGRDM6NkE1RTg1MTkiLCJ2aXNpdG9yX2lkIjoiNjIxMTI2ODIwNjQ1NDAxNTI1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7a815f4239f563384bf592512aa03f611f626d0860399196fb8c07b28243b245 |
| hovercard-subject-tag | issue:91615430 |
| 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/loadsys/CakePHP-ConfigReadShell/20/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3d651f7e4f44f3e56533c3e1676d5558332ea81f8bfa5cf9165cd62c17d4632/loadsys/CakePHP-ConfigReadShell/issues/20 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3d651f7e4f44f3e56533c3e1676d5558332ea81f8bfa5cf9165cd62c17d4632/loadsys/CakePHP-ConfigReadShell/issues/20 |
| og:image:alt | Cake 3 by default strips a lot of Configure's values out via ::consume(). This is done in config/boostrap.php for: Cache ConnectionManager (Datasources configs) Email (EmailTransport & Email config... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | beporter |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0c30ec4bc4cc128be7eee7ef869507723a2ac9916267b7e0d370b3580a5e7ba |
| turbo-cache-control | no-preview |
| go-import | github.com/loadsys/CakePHP-ConfigReadShell git https://github.com/loadsys/CakePHP-ConfigReadShell.git |
| octolytics-dimension-user_id | 16822 |
| octolytics-dimension-user_login | loadsys |
| octolytics-dimension-repository_id | 28868945 |
| octolytics-dimension-repository_nwo | loadsys/CakePHP-ConfigReadShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 28868945 |
| octolytics-dimension-repository_network_root_nwo | loadsys/CakePHP-ConfigReadShell |
| 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 | 68ef39d284f7f48d37e751bc9bc0a9a4166228d5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width