Log message #4218311

# At Username Text
# Dec 11th 2019, 16:08 slackebot2 <ricksaccous>
# Dec 11th 2019, 16:07 ricksaccous I'm having trouble with https://book.cakephp.org/3/en/core-libraries/validation.html#using-custom-validation-rules
# Dec 11th 2019, 16:07 noel ok nvm I see it
# Dec 11th 2019, 16:04 noel I am a bit confused by it though because it seems to be including just a file name, not a full path. How does it know the path?
# Dec 11th 2019, 15:58 storkovo flashback to php4
# Dec 11th 2019, 15:53 noel wow.. I didn't know one could use PHP like that. I mean I've used include before but I didn't realise that you could use it within a class and it would pick up context from the class. And the buffering picks up the output neatly too.
# Dec 11th 2019, 15:47 dereuromark see View class and how it gets rendered there
# Dec 11th 2019, 15:46 noel How is it that Templates have a `$this` context when they are not classes?
# Dec 11th 2019, 15:22 ricksaccous @scuadra https://www.php.net/manual/en/datetime.diff.php
# Dec 11th 2019, 15:20 scuadra @jotpe thank you, it's perfect. But I couldn't find a way to calculate the difference between the dates. For example today is 2019-12-11 and my `expire_date` is 2019-12-15. So this is 4 days but how to get it?
# Dec 11th 2019, 14:15 info315 @challgren thanks
# Dec 11th 2019, 14:13 challgren Command
# Dec 11th 2019, 14:12 info315 Hi, quick question, what is the new `Shell` if `@deprecated 3.6.0 ShellDispatcher and Shell will be removed in 5.0` with CakePHP 4?
# Dec 11th 2019, 13:47 challgren Yeah it was back in the 2.x to 3.x days. But I was able to fix it by making my own repos. Probably not everything needs forked but its always good to have a copy
# Dec 11th 2019, 13:35 boydbuenodemesquita Ah, that does sound like headache material. I never though about forking everything, I'll certainly keep it in mind.
# Dec 11th 2019, 13:30 jotpe @scuadra What about this? https://book.cakephp.org/3/en/core-libraries/time.html#comparing-with-the-present
# Dec 11th 2019, 13:23 challgren I had a horrible issue where our cluster was spinning up new VMs and a package was deleted and the clusters were failing because they couldnt spin up. Major headache.
# Dec 11th 2019, 13:23 challgren Ahh no worries glad we could help you. Also if your in production and dont plan on doing much dev I would recommend forking all the packages you use and use your repos that way in the future you wont run into the issue.
# Dec 11th 2019, 13:19 boydbuenodemesquita It took me way longer than I had hoped. After adding the files to a remote repo, I also had to push a tag with version number. Otherwise composer didn't understand that the repo actually had versions (defining a version inside the composer.json would've probably also worked) Thanks again for the help.
# Dec 11th 2019, 13:13 scuadra Hello. I have a field `expire_date` of type `DATE` in a table. I want to select the `DATEDIFF` between this field and today. How can I do this in Cake 3.x? In Cake 2.x I used the following: 'DATEDIFF(Event.expire_date, CURDATE()) as days_remaining'
# Dec 11th 2019, 13:02 jh as for logging, did you configure to auto expire
# Dec 11th 2019, 13:02 jh Is anyone of you using redis with https://github.com/lorenzo/cakephp-redis to filter/search/index/display redis data?
# Dec 11th 2019, 13:01 jh Is anyone of you using redis for logging?
# Dec 11th 2019, 12:12 challgren https://getcomposer.org/doc/05-repositories.md#loading-a-package-from-a-vcs-repository
# Dec 11th 2019, 12:12 boydbuenodemesquita Yeah, we're planning to go live next week, so I was setting up production right now. Talking about bad timing.
# Dec 11th 2019, 12:12 narendravaghela or you can move to your app's plugin directoruy
# Dec 11th 2019, 12:11 challgren Yep
# Dec 11th 2019, 12:11 boydbuenodemesquita I'll take that route. I can just require packagest directly from git right? I don't need to publish them somewhere?
# Dec 11th 2019, 12:11 narendravaghela :)
# Dec 11th 2019, 12:10 challgren Thats the one thing I dont like about composer is the package can go missing and totally wreck your world
# Dec 11th 2019, 12:10 challgren Thats what I would do take the files in vendor and make my own repo.
# Dec 11th 2019, 12:09 narendravaghela both packages are different
# Dec 11th 2019, 12:08 narendravaghela @boydbuenodemesquita That package does not exists in their github account. So, you have to update the vendor files itself or as @challgren suggested create one from the files.
# Dec 11th 2019, 12:08 boydbuenodemesquita This one doesn't seem to use the same method of setting the response though. So it doesn't seem like it's just a drop in replacement. But I'll definitely try one of the other ones.
# Dec 11th 2019, 12:05 narendravaghela This is an improved version
# Dec 11th 2019, 12:05 boydbuenodemesquita Thanks for the help guys. :slightly_smiling_face:
# Dec 11th 2019, 12:04 narendravaghela check this one as well - https://github.com/sprintcube/cakephp-rest
# Dec 11th 2019, 12:04 boydbuenodemesquita Yeah, it seems to be gone since a week or so. I'll try a fork, one of the forks you sent seems promising.
# Dec 11th 2019, 12:04 narendravaghela the company has removed that repo from their account
# Dec 11th 2019, 12:03 challgren Yeah, so @boydbuenodemesquita maybe use a fork
# Dec 11th 2019, 12:03 narendravaghela if you see the readme, he hasn't change the installation line ```composer require multidots/cakephp-rest-api```