Log message #4202684

# At Username Text
# Sep 11th 2019, 13:40 neon1024 Probably the latter I would imagine, but an extra http call feels odd
# Sep 11th 2019, 13:40 neon1024 If I have an api controller which I now need elsewhere, is it easier to instanciate and call the controller method, or just use Client to hit the url
# Sep 11th 2019, 13:14 spriz we're only 5 on the team atm, so it could be years in the future :,)
# Sep 11th 2019, 13:14 spriz for now it's no problem, I just know for sure that sometime in the future some other dev will be fucked by this
# Sep 11th 2019, 13:13 ricksaccous lol okay
# Sep 11th 2019, 13:13 spriz I'll go for the least magic and only do it on the primary table :)
# Sep 11th 2019, 13:13 ricksaccous @spriz let me know what you end up doing because i'm going to have to do something similar
# Sep 11th 2019, 13:08 lubos ``` addSubcommand('exp', [ 'help' => '...', 'parser' => [ 'arguments' => [ 'file' => [ 'help' => '....' ] ] ] ])
# Sep 11th 2019, 13:07 ricksaccous oh well
# Sep 11th 2019, 13:07 ricksaccous or that you could specify
# Sep 11th 2019, 13:07 ricksaccous i kind of wish it did aftersaves as well
# Sep 11th 2019, 13:06 spriz it explicitly states `delete` in the api for that
# Sep 11th 2019, 13:06 spriz Yeah I would not expect that as well :P
# Sep 11th 2019, 13:03 ricksaccous i doubt it will though
# Sep 11th 2019, 13:03 ricksaccous just try cascadeCallbacks and see if it works, lol
# Sep 11th 2019, 13:02 spriz @ricksaccous yeah but that also requires us to manually keep track of whatever parent that might add this model as a assoc in all future :S
# Sep 11th 2019, 13:02 ricksaccous but as far as i know cascadeCallbacks only handles deletions
# Sep 11th 2019, 13:01 ricksaccous kind of not the nicest way
# Sep 11th 2019, 13:01 ricksaccous @spriz you can probably fire the event from the parent model in the parent model's event
# Sep 11th 2019, 12:41 slackebot => 'I don't require argument at all' ]) ; return $parser; } ```
# Sep 11th 2019, 12:41 ondrej.nedvidek ``` public function getOptionParser() { $parser = parent::getOptionParser(); $parser ->addSubcommand('expiration', [ 'help' => 'I require argument theargument' ]) ->addArgument('theargument', [ 'required' => true, 'help' => 'I am argument' ]) ->addSubcommand('noargumentrequired', [ 'help'
# Sep 11th 2019, 12:37 ondrej.nedvidek Hi there. Shell - How to `addArgument` to shell which is required just for certain `addSubcommand` ?
# Sep 11th 2019, 11:16 neon1024 What does an empty Collection return when you call `max()`
# Sep 11th 2019, 11:08 spriz moving it to `afterSaveCommit` fixes that, but when we do save this (Tags) entity as `$this->Articles->save(['text' => 'foo', 'tags' => [ ['value' => 'bar'], [ 'value' => 'foobar']]);` the `afterSaveCommit` is not triggered for the `TagsTable` - only for the `ArticlesTable`
# Sep 11th 2019, 11:06 spriz we have a msg queue listening to a msg that is sent in an `afterSave`, but we have a race condition where the consumer picks up the msg that contains the `id`. Consumer does `$this->Table->get($id)` and gets `RecordNotFoundException` because it is not yet comitted :)
# Sep 11th 2019, 11:05 spriz Is there any way to have the `afterSaveCommit` called for a table even if it is a save happening from associations?
# Sep 11th 2019, 10:59 barlas When running composer install, I am getting "No Security.salt placeholder to replace."
# Sep 11th 2019, 10:50 spriz I think you've chipped in enough fornow
# Sep 11th 2019, 10:50 spriz Yeah, take some time off rather :raised_hands:
# Sep 11th 2019, 10:49 spriz ;P
# Sep 11th 2019, 10:49 dereuromark time.. this thing called time..
# Sep 11th 2019, 10:49 spriz way to ruin a dream there
# Sep 11th 2019, 10:49 spriz Aww
# Sep 11th 2019, 10:49 spriz Sweet! I'll sit back and wait for that ^^
# Sep 11th 2019, 10:49 dereuromark not any time soon^^
# Sep 11th 2019, 10:49 neon1024 @dereuromark Is doing that ;)
# Sep 11th 2019, 10:46 spriz one should build a new tool that configure, run and compile results from ALL OF THE THINGS
# Sep 11th 2019, 10:46 spriz phpmd, phpcpd, phpcs, phpstan, psalm - oh the choices!
# Sep 11th 2019, 10:45 spriz These reports are actually quite nice: http://maven.apache.org/plugins/maven-checkstyle-plugin/project-reports.html Most of those can be built with PHP tools as well including at least pmd, checkstyle, cpd, javadoc, and sonar
# Sep 11th 2019, 10:44 neon1024 One of those where they say it’s a bug because they expect it work differently to how they originally asked for it work
# Sep 11th 2019, 10:44 spriz Aww! Good luck though!