Log message #4150706

# At Username Text
# Jun 12th 2018, 20:27 lorenzo that should make stuff more clear
# Jun 12th 2018, 20:27 lorenzo @itmpls actually, I’m going to merge this pr https://github.com/lorenzo/audit-stash/pull/21
# Jun 12th 2018, 20:26 lorenzo @itmpls the fields it saves https://github.com/lorenzo/audit-stash/blob/master/src/Persister/DatabasePersister.php#L40-L48
# Jun 12th 2018, 20:23 itmpls and.. is the audit stash schema anywhere?
# Jun 12th 2018, 20:23 itmpls hey @lorenzo - starting to implement that.. I grabbed the package, setup the DB persister class and confirmed it's pulling in the class. so will it not attempt to write to the audit stash table unless the db config is specified? and i just replace the ES stuff with mysql for example? persistent can be false?
# Jun 12th 2018, 19:43 mdotobie disregard
# Jun 12th 2018, 18:35 mdotobie I’m having a little trouble using the uploadedFile validation. I have the settings to only accept a file of the `application/pdf` type and the upload form has the correct enctype. But when I include a valid PDF, I’m getting an error.
# Jun 12th 2018, 18:24 lorenzo @itmpls you can use the plugin and use your own persistent class, but there is a database persistent as well included
# Jun 12th 2018, 18:12 admad @pedroseco you are supposed to write integration tests for controllers. Read up about it on manual
# Jun 12th 2018, 17:47 pedroseco should I just $this->post() data into it?
# Jun 12th 2018, 17:47 pedroseco how can I write a Unit test to the edit() method on my controller?
# Jun 12th 2018, 17:46 pedroseco hi huys,
# Jun 12th 2018, 17:30 itmpls interesting - i haven't used ES that much. if i'm just tracking literally one bitfield column, would you still recommend?
# Jun 12th 2018, 17:29 lorenzo I use that plugin to keep track of changes
# Jun 12th 2018, 17:29 lorenzo @itmpls https://github.com/lorenzo/audit-stash
# Jun 12th 2018, 17:14 itmpls anyone have a suggestion for if i have to keep a history of a flag? gonna create a _history table and create records for each status change so i can track for example if a user was active in a certain quarter of the year or not.
# Jun 12th 2018, 15:59 neon1024 Ah you can pass an instance, just as admad said
# Jun 12th 2018, 15:58 neon1024 Perhaps with 2 minutes to go till the end of the day, I should bail and return when my brain is at full operating temperature!
# Jun 12th 2018, 15:58 neon1024 `PHP Deprecated: Non-static method Muffin\Webservice\Model\EndpointLocator::get() should not be called statically in /Users/david/Sites/MuffinWebservice/vendor/cakephp/cakephp/src/Datasource/FactoryLocator.php on line 36`
# Jun 12th 2018, 15:58 neon1024 `\Cake\Datasource\FactoryLocator::add('Endpoint', [Muffin\Webservice\Model\EndpointLocator::class, 'get']);`
# Jun 12th 2018, 15:58 neon1024 But if I change it
# Jun 12th 2018, 15:56 jeremyharris you could implement it as a anonymous function if you really wanted to, but it’s a lot of code just for that
# Jun 12th 2018, 15:56 jeremyharris x)
# Jun 12th 2018, 15:55 neon1024 yeah, phpstan will hate that
# Jun 12th 2018, 15:55 josbeir #type_hinting_ftw
# Jun 12th 2018, 15:55 neon1024 I should send a pr to update that then too
# Jun 12th 2018, 15:55 jeremyharris could be a string, actual anon func, or array
# Jun 12th 2018, 15:55 jeremyharris #php
# Jun 12th 2018, 15:54 neon1024 Argh, stupid magic!
# Jun 12th 2018, 15:54 jeremyharris call_user_func
# Jun 12th 2018, 15:54 jeremyharris yeah so the array is a callable in this case
# Jun 12th 2018, 15:54 neon1024 As modelFactory takes `callable`
# Jun 12th 2018, 15:54 jeremyharris see L127 @neon1024
# Jun 12th 2018, 15:53 josbeir tnx @jeremyharris
# Jun 12th 2018, 15:53 neon1024 Guess i’ll need to knock up a quick example app and pop in the plugin
# Jun 12th 2018, 15:53 jeremyharris model factory is what is used by loadModel
# Jun 12th 2018, 15:53 neon1024 But I’m unsure, I can’t see a way for that to work in the code
# Jun 12th 2018, 15:53 jeremyharris @josbeir perhaps https://github.com/cakephp/cakephp/issues/12219 and https://github.com/cakephp/cakephp/issues/7532
# Jun 12th 2018, 15:53 neon1024 Also admad suggested using `$this->modelFactory('Endpoint', [new EndpointLocator(), 'get']);`
# Jun 12th 2018, 15:53 josbeir i'll check the ES form context
# Jun 12th 2018, 15:52 neon1024 @jeremyharris I ask because of this line -> https://github.com/UseMuffin/Webservice/blob/dev/config/bootstrap.php which uses the deprecated endpoint registry.