Log message #4198558

# At Username Text
# Aug 19th 2019, 07:22 kasunwijesekara What’s the process of connecting to a remote db? Is there a process to configure the CakePHP app? TIA!
# Aug 19th 2019, 07:16 alexdd55976 or do i have to go the way installing 3.8 first?
# Aug 19th 2019, 07:15 alexdd55976 how can i install cake4 via composer?
# Aug 19th 2019, 07:15 alexdd55976 hey fellows
# Aug 19th 2019, 01:53 brett If I create a sub-command in a command, how can I know which sub-command was executed?
# Aug 18th 2019, 16:33 racmiroslav Hey guys. I have uploaded files of my plugin to the production server. I have updated composer.json (psr4-autoload). My new files are not recognized by autoloader even after I run `composer dump-autoload`. Any ideas?
# Aug 18th 2019, 13:48 ndm Of course you could also iterate over the array and check authorization for every entity in the array "manually".
# Aug 18th 2019, 13:45 ndm @mrfeedback There's no policy resolver for "arrays of entities", you could write one yourself, even though it would probably turn out a little weird, given that PHP doesn't have typed arrays, so you'd have to check each item in the array. A possibly "cleaner" way might be to convert the array into a custom iterable object that can only hold instances of a specific entity class, that could be easily identified by your resolver.
# Aug 18th 2019, 04:02 COOurb thanks
# Aug 18th 2019, 04:01 COOurb oukay, it fixed by "bin/cake plugin load -b Acl"
# Aug 18th 2019, 03:57 COOurb tables acos and aros created, no errors in installation logs
# Aug 18th 2019, 03:56 COOurb hey, I have error With ACL plugin. "The datasource configuration "" was not found. "
# Aug 17th 2019, 17:24 mrfeedback how should I handle massassignments with Authorization plugin? `$collectionparts = $this->Collectionparts->patchEntities($collectionparts,$data); $this->Authorization->can($collectionparts,'update'); ` throws an error ` Error: [Authorization\Policy\Exception\MissingPolicyException] Policy for 'array' has not been defined.`
# Aug 17th 2019, 06:14 NickFuryBR Hey guys, I'm having troubles to save a hasmany relationship using the Proffer :( may anyone help me?
# Aug 17th 2019, 02:18 ggrecu059 Hope others can benefit from this :slightly_smiling_face:
# Aug 17th 2019, 02:18 slackebot assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements.
# Aug 17th 2019, 02:18 ggrecu059 I finally found out why i was getting a 404. In my apache config i had MultiViews enabled Apache website, the effect of Multiviews, as listed under Content Negotiation, is as follows: > If the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a type map which names all those files,
# Aug 17th 2019, 02:18 ggrecu059 Ok i figured it out :partyparrot:
# Aug 17th 2019, 01:59 sphereweb Good evening
# Aug 17th 2019, 01:52 ggrecu059 Hello fellow Cake enthusiasts. I have a quick question. I have tried for hours to find out why i cannot make a route for the `https://domain.com/robots.txt` using the following code `Router::connect('/robots', array('controller' => 'pages','action' => 'robots', 'ext' => 'txt'));` It keeps giving me a 404, but its like the Apache 404. Seems like its not going to Cake .. any ideas?
# Aug 17th 2019, 01:20 Ayz4 hello !!
# Aug 16th 2019, 21:11 maymeow but its working now ;)
# Aug 16th 2019, 21:10 maymeow thank you @ndm but in `3.7.*` i have to use ``` $conn = ConnectionManager::getConfig('default'); if ($conn['driver'] == Sqlserver::class) { ```
# Aug 16th 2019, 21:06 ndm Obtain an instance of the connection, and either check its configuration, or the driver instance, like: `\Cake\Datasource\ConnectionManager::get('default')->config()` or `\Cake\Datasource\ConnectionManager::get('default')->getDriver()`
# Aug 16th 2019, 21:03 maymeow @ndm im using default connection as standard in whole application
# Aug 16th 2019, 21:02 ndm @maymeow "currently used database driver" is rather ambigous, as repositories can use different connections (and therefore different drivers). Your example looks like you want to know which driver a specific connection is using?
# Aug 16th 2019, 20:57 ndm @etipaced Sounds like the saner approach for now, if you just need some additional data for an existing dataset.
# Aug 16th 2019, 20:55 maymeow how can i get currently used database driver in controller ? `Configure::read('Datasourceds.default.driver')` is returning null
# Aug 16th 2019, 20:32 etipaced @ndm I was back and forth on the 2 approaches. I think a result formatter is all I need for now as this is a basic key => val dataset that’s coming back to me. I did start playing with the creation of a custom `Driver` object, but I’m thinking that is only the tip of the torture.
# Aug 16th 2019, 20:27 ndm But if you really want to go off of the deep end, maybe start with looking into using custom association and loader classes.
# Aug 16th 2019, 20:26 ndm Unless you really, reeeeeealy need such a transparent solution, I'd probably consider something more basic first, like a result formatter that queries the other datasource merges the data into the result set.
# Aug 16th 2019, 20:25 ndm @etipaced You want to combine different datasources under the common ORM interface? Oh boy, be prepared for a world of pain, suffering, and outright unfathomable agony :relaxed:
# Aug 16th 2019, 20:05 etipaced This table would be used in a `belongsTo` relationship with a MySQL-backed `Table` (having the converse `hasMany`, of course).
# Aug 16th 2019, 20:04 etipaced What would be the correct approach to creating a table that has a JSON API as its data source (no database, iow)?
# Aug 16th 2019, 19:29 davorminchorov Ok will check it out, thanks!
# Aug 16th 2019, 16:25 dereuromark @davorminchorov 3.7/3.8 became a bit more strict in handling invalid input types, see migration guides
# Aug 16th 2019, 15:43 jortega it looks pretty similar
# Aug 16th 2019, 15:43 jortega Hi, it is a thread at stackoverflow https://stackoverflow.com/questions/40110318/cannot-convert-value-to-string-when-retrieving-data-belongstomany-relationshi maybe it could helo you
# Aug 16th 2019, 15:39 davorminchorov Anyone here ever got the following error when saving data with the Entity object? `Cannot convert value of type `string` to integer` It's weird that it throws such an error when the database field and the field are strings, not integers
# Aug 16th 2019, 15:10 neon1024 Anyway, job for Monday. Have a great weekend everyone :wave:
# Aug 16th 2019, 15:09 neon1024 Perhaps I’ll have to build something