# |
Sep 2nd 2019, 08:50 |
mehov |
`created` is an actual field holding DATETIME according to conventions. Or did i misunderstand you? |
# |
Sep 2nd 2019, 08:49 |
challgren |
That would be a virtual field |
# |
Sep 2nd 2019, 08:49 |
mehov |
Is there some info on what code you can and cannot put into entities? The doc at https://book.cakephp.org/3.0/en/orm/entities.html simply says *Entities contain methods to manipulate and access the data they contain* Say `Entity\Article.php` has a field `created`, is it okay to add `Entity\Article::getAgeInDays()` that'd only use the field to return how many days ago it was created? |
# |
Sep 2nd 2019, 08:47 |
neon1024 |
Ah ok |
# |
Sep 2nd 2019, 08:46 |
conehead |
At least at the moment it is not important for me as there aren't too many changes happening |
# |
Sep 2nd 2019, 08:45 |
conehead |
Nope |
# |
Sep 2nd 2019, 08:45 |
neon1024 |
@conehead Did you implement Elasticsearch as a datastore? |
# |
Sep 2nd 2019, 08:45 |
neon1024 |
I need full audit trail too, so will probably implement the plugin |
# |
Sep 2nd 2019, 08:44 |
neon1024 |
Didn’t really think about audit/activity feed having a crossover, but you’re totally right |
# |
Sep 2nd 2019, 08:44 |
conehead |
There I got one table with the updated entities, the user that changed it and what action was performed |
# |
Sep 2nd 2019, 08:44 |
neon1024 |
Yeah, just reading it now :slightly_smiling_face: |
# |
Sep 2nd 2019, 08:43 |
conehead |
@neon1024 you recently asked for versioning. For my activity feed I use the audit log. Not sure if this would suite your case |
# |
Sep 2nd 2019, 08:42 |
neon1024 |
It gets deprecated in 4.0.0, so will still be around until 5.0, but probably won’t get many updates I’d reckon |
# |
Sep 2nd 2019, 08:41 |
neon1024 |
Yeah, whichever you feel happier with right now. If you’re up on 3.8 or so and are looking at Cake 4, then probably worth getting a ticket in to update your application |
# |
Sep 2nd 2019, 08:39 |
javier.villanueva |
in cakephp 4 |
# |
Sep 2nd 2019, 08:39 |
javier.villanueva |
https://book.cakephp.org/3.0/en/controllers/components/authentication.html |
# |
Sep 2nd 2019, 08:39 |
javier.villanueva |
not yet |
# |
Sep 2nd 2019, 08:39 |
mehov |
didn't know it was deprecated. thanks |
# |
Sep 2nd 2019, 08:38 |
javier.villanueva |
AuthComponent is deprecated, then I suppose that yes |
# |
Sep 2nd 2019, 08:37 |
javier.villanueva |
good question |
# |
Sep 2nd 2019, 08:36 |
mehov |
should i use Authentication Plugin instead of AuthComponent for new projects? |
# |
Sep 2nd 2019, 08:34 |
javier.villanueva |
sorry |
# |
Sep 2nd 2019, 08:34 |
javier.villanueva |
s |
# |
Sep 2nd 2019, 08:34 |
javier.villanueva |
omg I didnt see the last page |
# |
Sep 2nd 2019, 08:33 |
neon1024 |
At least, there are a lot of pages :P |
# |
Sep 2nd 2019, 08:32 |
neon1024 |
@javier.villanueva Are you sure? The docs looks pretty good from here https://book.cakephp.org/authentication/1.1/en/index.html |
# |
Sep 2nd 2019, 08:32 |
neon1024 |
Anyone done a social media style feed before? I can’t really think of a neat way to gather user activity across multiple Table classes. I can only really think of an activities table, which a behavior writes to whenever something happens |
# |
Sep 2nd 2019, 08:32 |
javier.villanueva |
I am migrating my AuthComponent system to the Authentication Plugin, anyone have a tutorial of Authentication Plugin? The documentation in Cookbook is limited, and I have a lot of errors.. |
# |
Sep 2nd 2019, 08:31 |
neon1024 |
Moin @alexdd55976 |
# |
Sep 2nd 2019, 07:31 |
alexdd55976 |
good morning |
# |
Sep 2nd 2019, 07:30 |
javier.villanueva |
in your entity "Table" |
# |
Sep 2nd 2019, 07:30 |
javier.villanueva |
dont forget $this->addBehavior('Timestamp'); behavior |
# |
Sep 2nd 2019, 07:29 |
javier.villanueva |
yes |
# |
Sep 2nd 2019, 07:27 |
val |
Hi, are 'created' and 'modified' columns supported in 3.x? |
# |
Sep 2nd 2019, 07:17 |
javier.villanueva |
morning all |
# |
Sep 2nd 2019, 04:48 |
conehead |
@cnizzardini Open your `app.php` and search for `errorLevel`. It should already be there under `Error => errorLevel`. Just change it to `E_ALL and ~E_USER_DEPRECATED` |
# |
Sep 2nd 2019, 04:45 |
conehead |
I had these errors showing for some files that were not in my plugins/src folders |
# |
Sep 2nd 2019, 04:19 |
admad |
@cnizzardini instead of trying to hide the warnings update your code to not use deprecated method which generates the warnings |
# |
Sep 2nd 2019, 01:50 |
cnizzardini |
Hmm, I'm switching a plugin I've mind to be a stand-alone project. My unit tests are failing now, one of them is because of `You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL and ~E_USER_DEPRECATED` in your config/app.php. ` I am not sure how to set app.php in this project. Tried using Configure::write but its not working. |
# |
Sep 2nd 2019, 00:37 |
cnizzardini |
n/m was missing bootstrap="./tests/bootstrap.php" in my phpunit xml file |
# |
Sep 1st 2019, 23:57 |
cnizzardini |
I've set this up outside of a standard cakephp3 install, not sure how to setup the tests/bootstrap.php file. at least i think that is what the issue is |