# |
Jul 23rd 2018, 20:10 |
chris-andre |
Is this something for the beforeSave? |
# |
Jul 23rd 2018, 20:09 |
chris-andre |
I did something like this in beforeMarshal() earlier, by unsetting $data[$key]. But that doesn't seem like a good way of doing it. |
# |
Jul 23rd 2018, 20:07 |
slackebot |
way? |
# |
Jul 23rd 2018, 20:07 |
chris-andre |
Hi guys. I have an Organizations table that hasMany Addresses. In the add form for Organizations I have two rows of addresses, `<?= $this->Form->control('addresses.0.address1') ?>` `<?= $this->Form->control('addresses.1.address1') ?>`. Now, if field `addresses.1.address1` is empty, I don't want to return an error, I simply want to remove it from entity before saving instead. Could someone point me in a direction how to do this in a "good" |
# |
Jul 23rd 2018, 19:39 |
Igno_ |
Hi, I created complex rules Tables. Each time a rule invalidates the entity it auto_increments the primary_key of my table. Can i avoid that? |
# |
Jul 23rd 2018, 19:35 |
awitte |
I'd like to write a costum validator and need to work the data, easiest would be having a DateTime of \Cake\I18n\Time |
# |
Jul 23rd 2018, 19:33 |
awitte |
hi. I am wondering, how cake builds the array of datetime-data into a DatetimeObject... |
# |
Jul 23rd 2018, 19:29 |
I_hate_CakePHP |
Fuck your mothers! :D |
# |
Jul 23rd 2018, 19:25 |
I_hate_CakePHP |
I have an issue, can someone help? |
# |
Jul 23rd 2018, 19:25 |
I_hate_CakePHP |
Hey |
# |
Jul 23rd 2018, 18:34 |
phantomwatson |
As long as it doesn't trip up class autoloading. |
# |
Jul 23rd 2018, 18:33 |
chikore |
Hello Baker |
# |
Jul 23rd 2018, 18:31 |
mdotobie |
I just wanted to make sure that a `vendor` folder in the submodule was “okay” at this stage in the game or do I need to turn plugins into Composer packages as soon as possible |
# |
Jul 23rd 2018, 18:30 |
mdotobie |
I’m fine with them living in the submodules `vendor` folder until the time I turn the submodule into it’s on composer package |
# |
Jul 23rd 2018, 18:29 |
mdotobie |
well while it’s a submodule I don’t necessarily want to hoist the dependencies up to the root `vendor` folder |
# |
Jul 23rd 2018, 18:29 |
phantomwatson |
(Anybody else: Jump in if you can correct any of these points. I tend not to mess with Git submodules.) |
# |
Jul 23rd 2018, 18:28 |
phantomwatson |
You'd need to go into your plugin directory and run your composer commands from there for your plugin's `composer.json` file to be read. |
# |
Jul 23rd 2018, 18:27 |
phantomwatson |
Composer reads `composer.json` in your project's root and resolves everything from there. If you have a separate `composer.json` file in a plugin directory that's not referenced from your root file, then running `composer install` or `composer update` in your root directory won't update that plugin. |
# |
Jul 23rd 2018, 18:26 |
mdotobie |
so what about it’s current situation as a submodule, the dependencies can live in the plugins `vendor` folder and be accessed from there until the time I turn it into a real composer package? |
# |
Jul 23rd 2018, 18:25 |
mdotobie |
oh so composer will just read the required plugins from the plugins composer file and then load them into the parent applications `vendor` directory? |
# |
Jul 23rd 2018, 18:23 |
phantomwatson |
When you install a composer package, all of its dependencies also get installed to your `vendor` directory, assuming there aren't any conflicts. |
# |
Jul 23rd 2018, 18:20 |
slackebot |
the plugin project. But I’m unsure how these carry up to the main application in the submodule scenario and the composer package scenario. |
# |
Jul 23rd 2018, 18:20 |
mdotobie |
So I’m writing my first plugin for Cake3 and I’m confused on a workflow approach. My initial development is as a separate app that has a GitHub repo. I’ve included it in the main application as a submodule in the plugins folder. My plan is to later create a real Composer package and then require it in the main application. My confusion is around dependencies in the plugin. I know I can use Composer to require the necessary packages wit |
# |
Jul 23rd 2018, 18:18 |
dwms |
to relationships |
# |
Jul 23rd 2018, 18:17 |
dwms |
I did not exist anymore on return to included column |
# |
Jul 23rd 2018, 18:17 |
dwms |
crud-json-api |
# |
Jul 23rd 2018, 18:17 |
dwms |
help |
# |
Jul 23rd 2018, 17:46 |
sdevore |
Ok, I will. I thought that it was more focused on the display in the console rather then the ability to organize with file system layout. But I would certainly like something a little more structured in the console help output |
# |
Jul 23rd 2018, 17:43 |
admad |
@sdevore if you too want sub commands add your thoughts to that issue |
# |
Jul 23rd 2018, 16:59 |
D-rex |
ok thanks |
# |
Jul 23rd 2018, 16:59 |
phantomwatson |
D-rex, check out https://book.cakephp.org/3.0/en/orm/table-objects.html#customizing-the-entity-class-a-table-uses |
# |
Jul 23rd 2018, 16:58 |
D-rex |
I have a table ymm and ymms and ymms keeps using the entity for ymm |
# |
Jul 23rd 2018, 16:58 |
phantomwatson |
Changing whatever version constraints you have to "^3.0" should be fine. |
# |
Jul 23rd 2018, 16:58 |
D-rex |
is there a way to have a table name ending in 's' not inflect on the entity name |
# |
Jul 23rd 2018, 16:58 |
phantomwatson |
Just run `composer update`. If it doesn't update it to the version that you want, take a look at your `composer.json` file and the version constraints you have for the package `cakephp/cakephp`. |
# |
Jul 23rd 2018, 16:57 |
dwms |
yes |
# |
Jul 23rd 2018, 16:57 |
phantomwatson |
@dwms, are you using composer to manage your dependencies? |
# |
Jul 23rd 2018, 16:56 |
dwms |
? |
# |
Jul 23rd 2018, 16:56 |
dwms |
how to update version cakephp 3.15 to 3.16 |
# |
Jul 23rd 2018, 16:45 |
sdevore |
@admad will they have the subcommands organized at all like the shell has the Tasks? or are they going to have just a flat structure? I know there was an issue https://github.com/cakephp/cakephp/issues/12123 that talked about the display in the console. but what about the layout of commands and subcommands on the filesystem |
# |
Jul 23rd 2018, 16:39 |
admad |
Yes, commands are meant to replace shells in future |