Logs for #cakephp

Page 17 of 36,922, showing 100 records out of 3,692,143 total, starting on record 1,601, ending on 1,700

# At Username Text
# Jul 1st 2021, 18:30 admad @tyler.adam.lazenby mailhog
# Jul 1st 2021, 18:29 tyler.adam.lazenby hahha
# Jul 1st 2021, 18:22 kevin.pfeifer mhmm, i could try even though i basically refuse to do any coding on windows ,:)
# Jul 1st 2021, 18:21 tyler.adam.lazenby Windows 10
# Jul 1st 2021, 18:21 kevin.pfeifer xampp on which OS?
# Jul 1st 2021, 18:19 tyler.adam.lazenby I was wondering if there is an easy to set up dummy email server that people knew about
# Jul 1st 2021, 18:18 tyler.adam.lazenby the thing is if I disable mercury for example it will just tell me it can't connect to a mail server
# Jul 1st 2021, 18:18 kevin.pfeifer use a dummy email address from a real SMTP server?
# Jul 1st 2021, 18:15 tyler.adam.lazenby anybody know of an easier solution?
# Jul 1st 2021, 18:15 tyler.adam.lazenby What is the easiest way to send email from your local server (so that I can test my email sending in cakephp). I have been trying with xampp mercury for hours and can't even get it to send to root@localhost, even though I can send test emails through the mercury interface
# Jul 1st 2021, 18:02 kevin.pfeifer also: shouldn't part of your where function be placed in a `->having()` because you want to filter by grouped data? like the `ResourcesCounts.date BETWEEN etc.`
# Jul 1st 2021, 17:56 staccato123 @ndm Ah, thanks. That's not obvious from the docs.
# Jul 1st 2021, 17:49 kevin.pfeifer damn that makes sense :see_no_evil: :,) i need more coffee
# Jul 1st 2021, 17:42 ndm staccato123: `hasMany` associations are not being joined, they are being retrieved in a separate query. If you want them joined, then you need to join them, not contain them - check `innerJoinWith()` and `leftJoinWith()`.
# Jul 1st 2021, 16:16 staccato123 (obviously the JOIN needs an ON clause as well :) )
# Jul 1st 2021, 16:16 staccato123 Fair enough, thanks for looking
# Jul 1st 2021, 16:13 kevin.pfeifer can't tell you, sorry :shru
# Jul 1st 2021, 16:11 staccato123 Looking at the query log, all the query needs is "JOIN resources_count ResourcesCounts" adding
# Jul 1st 2021, 16:07 staccato123 error is "Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ResourcesCounts.date' in 'where clause'" as you would expect
# Jul 1st 2021, 16:05 staccato123 https://pastebin.com/YHkq9NZe
# Jul 1st 2021, 16:04 staccato123 *there's
# Jul 1st 2021, 16:04 staccato123 There's SQL. There no JOIN
# Jul 1st 2021, 16:01 kevin.pfeifer or do you get an error?
# Jul 1st 2021, 16:00 kevin.pfeifer is there SQL generated when you look into it via debug kit?
# Jul 1st 2021, 15:59 kevin.pfeifer :thinking_face: so you don’t need to set the extra `className` property because the alias (1st parameter) is the same as the TableObject name
# Jul 1st 2021, 15:55 staccato123 yes
# Jul 1st 2021, 15:55 kevin.pfeifer but the resources_counts Table Class is called `ResourcesCountsTable`?
# Jul 1st 2021, 15:18 staccato123 The only unusualness is that the table for ResourcesCounts is resources_count rather than resources_counts, but I've done a setTable
# Jul 1st 2021, 15:15 staccato123 https://pastebin.com/3nFKFStE
# Jul 1st 2021, 15:13 staccato123 give me a sec
# Jul 1st 2021, 14:47 kevin.pfeifer can you provide code examples of how you define the hasMany and how you use it?
# Jul 1st 2021, 14:46 staccato123 Is there an obvious reason why my hasMany association isn't turning up when I use ->contain() ?
# Jul 1st 2021, 14:45 info315 I'm not using pure SQL, I'm using th eCakePHP Migrations :)
# Jul 1st 2021, 14:45 staccato123 Afternoon
# Jul 1st 2021, 14:43 kevin.pfeifer uh, 5.0 is on the way :scream:
# Jul 1st 2021, 14:42 dereuromark Also see https://github.com/cakephp/cakephp/wiki
# Jul 1st 2021, 14:04 cristianhaunsen `CREATE TABLE a.table`
# Jul 1st 2021, 14:04 edu.garcia Really appreciated Kevin
# Jul 1st 2021, 14:04 cristianhaunsen you can prefix the database name in your query (if you are using pure sql)
# Jul 1st 2021, 13:57 kevin.pfeifer for installation requirements see also 3.x https://book.cakephp.org/3/en/installation.html 4.x https://book.cakephp.org/4/en/installation.html
# Jul 1st 2021, 13:56 kevin.pfeifer according to the composer.json cakephp 3 needs >= 5.6 and < 8.0 https://github.com/cakephp/cakephp/blob/3.x/composer.json#L31 and cakephp 4 >= 7.2 https://github.com/cakephp/cakephp/blob/master/composer.json#L25
# Jul 1st 2021, 13:53 info315 Hm no, I just want to create a few tables to a second database configuration
# Jul 1st 2021, 13:52 edu.garcia Is there a table where I can see PHP x CakePHP versions compatibility
# Jul 1st 2021, 13:51 edu.garcia Hi everyone
# Jul 1st 2021, 13:45 cnizzardini You can call `$this->query($sql);` as well
# Jul 1st 2021, 13:11 kevin.pfeifer I would guess you can achieve that via the alias function of the connection manager https://stackoverflow.com/questions/44428235/change-default-db-in-cakephp3
# Jul 1st 2021, 13:05 info315 Hi, is it possible to change the used Database Connection inside of an Migration?
# Jun 30th 2021, 22:18 rightscoreanalysis ah because my method was statc :)
# Jun 30th 2021, 22:18 rightscoreanalysis Using $this when not in object context
# Jun 30th 2021, 22:17 rightscoreanalysis I did the same: protected $_credentials; then using $this->_crednetialsd
# Jun 30th 2021, 22:17 rightscoreanalysis in the core I can see: protected $_validCiphers = ['aes']; used as: $this->$_validCiphers
# Jun 30th 2021, 20:07 kevin.pfeifer basically PSR-4 says, that a namespace has to correspond with the folder-structure the class is located
# Jun 30th 2021, 20:06 kevin.pfeifer and yes, there is the whole psr-4 autloading standard as well if you want to read into that as well (which you definitely don't need to) https://www.php-fig.org/psr/psr-4/
# Jun 30th 2021, 20:05 kevin.pfeifer here for the app src directory https://github.com/cakephp/app/blob/master/composer.json#L29
# Jun 30th 2021, 20:05 kevin.pfeifer and the same goes for the cakephp core, but just with another namepsace https://github.com/cakephp/cakephp/blob/master/composer.json#L75
# Jun 30th 2021, 20:05 rightscoreanalysis awesome thanks for the pointers
# Jun 30th 2021, 20:04 kevin.pfeifer well evertyhing in your `src` directory starts with `\App` because of what is defined in the composer.json
# Jun 30th 2021, 20:04 rightscoreanalysis I guess I can also refer to the Utility classes in the cake core
# Jun 30th 2021, 20:04 kevin.pfeifer well its the combo of namespacing with autoloading which composer automatically does https://www.php.net/manual/en/language.oop5.autoload.php
# Jun 30th 2021, 20:03 kevin.pfeifer https://www.php.net/manual/en/language.namespaces.basics.php
# Jun 30th 2021, 20:03 rightscoreanalysis yeah i have been on a cake2 project for some time so I had to un-learn a lot :)
# Jun 30th 2021, 20:02 greg138 That old plugin seems to be about making Twitter "look like" a database, which seems like an abstraction that's not particularly useful.
# Jun 30th 2021, 20:02 kevin.pfeifer and yes, cakephp has nothing to do with that
# Jun 30th 2021, 20:02 kevin.pfeifer thats the magic of PHP namespaces ;)
# Jun 30th 2021, 20:02 greg138 CakePHP is just PHP...
# Jun 30th 2021, 20:02 rightscoreanalysis oh nice didn't realise that was possible
# Jun 30th 2021, 20:01 kevin.pfeifer either statically or create an object, however you like
# Jun 30th 2021, 20:01 kevin.pfeifer well then create a generic PHP class in `src/Utility/MyTwitter.php` , give it a namespace `App\Utility` And call it anywhere you like in your app with `\App\Utility\MyTwitter`
# Jun 30th 2021, 20:00 rightscoreanalysis can helpers work on the backend - in Cake I mostly see them used in the template files
# Jun 30th 2021, 19:59 rightscoreanalysis I guess so yes - if it was a model $this->TwitterApi->send($foo) typ of thing
# Jun 30th 2021, 19:58 kevin.pfeifer so you basically want a Helper Class which serves you as an helper between the Twitter PHP API and your app?
# Jun 30th 2021, 19:57 rightscoreanalysis https://github.com/cakephp/cakephp/issues/5390
# Jun 30th 2021, 19:57 greg138 Oh, sorry, table-less models, not model-less forms...
# Jun 30th 2021, 19:56 greg138 Where did you read that about Cake3? https://book.cakephp.org/3/en/core-libraries/form.html
# Jun 30th 2021, 19:55 rightscoreanalysis component is not applicable, a plugin would not solve this, not sure that it is a behaviour
# Jun 30th 2021, 19:55 rightscoreanalysis so I am wondering how I can implement something similar in Cake4
# Jun 30th 2021, 19:53 rightscoreanalysis I read that since cake3 it is no longer possible to use the table-less models
# Jun 30th 2021, 19:53 rightscoreanalysis I am modifying an old Cake2 plugin that integrates with Twitter's API. In the old plugin there is a model file: https://github.com/voycey/cakephp-twitter-api/blob/master/Model/Twitter.php
# Jun 30th 2021, 15:41 gutocf Hello, I'm trying to create fixtures with the vierge-noire/cakephp-fixture-factories plugin for a belongs to many association with data on the join table, but i didn't find how. Can someone help me with this?
# Jun 30th 2021, 15:12 martin but in most cases it is not a problem I guess
# Jun 30th 2021, 15:11 martin or a setting on patchEntity?
# Jun 30th 2021, 14:51 dereuromark Do we need a patchIfModified() one?
# Jun 30th 2021, 14:40 ndm Can you maybe supply a small example setup? I'm wondering whether the check in the core might be a bit to strict, or if it's actually a configuration issue.
# Jun 30th 2021, 14:38 martin ok, I wanted to not send update to endpoint when fields are not changed, but I patch the full array, now I only patch the fields that are changed
# Jun 30th 2021, 14:36 ndm patching a field will always mark it as dirty, no matter whether the content is identical
# Jun 30th 2021, 14:35 ndm I probably shouldn't have said "target", given that this is a special term in associations. I really just ment the table class for the association alias. Associations aren't singletons like tables, so different targets should generally be no problem, as that's association config, not table config.
# Jun 30th 2021, 14:35 martin or does that only happen with the webservice. that is also possible, I see dirty fields but original is empty
# Jun 30th 2021, 14:26 martin hmm does PatchEntity also makes fields dirty that are not changed, I was thinking it would only make a field dirty when it is really changed
# Jun 30th 2021, 13:25 cristianhaunsen xd
# Jun 30th 2021, 13:25 cristianhaunsen also i am running under 8.1alpha 3... usign 4.next branch...
# Jun 30th 2021, 13:24 cristianhaunsen @chrisshick i am running on 8.0.8 without problem....
# Jun 30th 2021, 11:43 chrisshick nvm I had to remove the lock file
# Jun 30th 2021, 11:40 chrisshick is there something special cakephp needs to be install on 8.0.8?
# Jun 30th 2021, 07:18 conehead @ndm Just to let you know: using getTarget() unfortunately does not help. In the belongsToMany file, the targets differ. The alias and the className is always the same. The associations of the targets to be precise. Users/Bookmarks are linked with other Entities, that are linked with Users/Bookmarks as well. And these associations differ
# Jun 30th 2021, 05:56 conehead Good morning everyone
# Jun 29th 2021, 22:44 tyler.adam.lazenby Its ALIVE!!!! my webhooked, hmac_parsed and verified trigger email WORKS
# Jun 29th 2021, 22:42 joey.mukherjee Thank you!! The last condition of the OR was where I was getting stuck!
# Jun 29th 2021, 22:35 ndm ```->leftJoinWith('GroundWaterTests') ->where([ 'OR' => [ 'TEST_TYPE' => 'WATR', 'GroundWaterTests.id IS NOT' => null, ] ]) ...```
# Jun 29th 2021, 22:32 ndm Same query, yes
# Jun 29th 2021, 22:31 joey.mukherjee Ok... if I do a LEFT join, can I do the OR in the same query? Or do I want to union two queries?