# |
Jan 24th 2019, 20:48 |
pc-world |
Why is there no option to ignore request data, should there be one? |
# |
Jan 24th 2019, 20:48 |
pc-world |
However I don't understand: Why does it prefer request data over the entity itself, shouldn't it be the other way round? |
# |
Jan 24th 2019, 20:47 |
pc-world |
I've pinned my problem down to https://github.com/cakephp/cakephp/blob/d2bd61dbe40ec9db28057bc7e5004703452568e6/src/View/Helper/FormHelper.php#L2962 and https://github.com/cakephp/cakephp/blob/d2bd61dbe40ec9db28057bc7e5004703452568e6/src/View/Form/EntityContext.php#L238 |
# |
Jan 24th 2019, 19:48 |
slackebot1 |
<flashios09> |
# |
Jan 24th 2019, 19:47 |
flashios09 |
i found it, it’s on packagist :slightly_smiling_face: |
# |
Jan 24th 2019, 19:47 |
admad |
`4.x` |
# |
Jan 24th 2019, 19:46 |
flashios09 |
last question @admad in the github repo there is no *4.x-dev* branch, from where *composer* get the source code ? |
# |
Jan 24th 2019, 19:44 |
admad |
better with it |
# |
Jan 24th 2019, 19:43 |
flashios09 |
without prefer-dist flag ? |
# |
Jan 24th 2019, 19:39 |
admad |
use 4.x branch of cakephp/app. `composer create-project cakephp/app:4.x-dev` |
# |
Jan 24th 2019, 19:32 |
flashios09 |
how can i create a new app using the 4.x github branch ? |
# |
Jan 24th 2019, 19:31 |
flashios09 |
i want to play a little bit with cake4(i know there isn’t a release yet) |
# |
Jan 24th 2019, 19:30 |
flashios09 |
hi |
# |
Jan 24th 2019, 18:31 |
pc-world |
To workaround that issue, I need to modify the request body directly with $this->setRequest(), and reindex the associated array with array_values(), which is quite cumbersome. |
# |
Jan 24th 2019, 18:31 |
pc-world |
Then I remove the associated entity whose delete button was pressed from the main entity's association array. Now I don't want to save to the database yet, but reload the form again. However when the view is displayed again and I create form controls with e.g. 'associated.3.id', CakePHP messes up the indices and displays the old request body data, and ignores my changes to the entity that I passed to Form->create(). |
# |
Jan 24th 2019, 18:31 |
pc-world |
Is it a feature or a bug that for populating form values, FormHelper seems to prefer request body data over the actual entities? E.g. I have a form that displays hasMany relations with a delete button (and <input>s) on each. When the delete button is pressed, I use patchEntity with the request body (as you normally do in an edit() action). |
# |
Jan 24th 2019, 17:49 |
aro |
haha |
# |
Jan 24th 2019, 17:49 |
jeremyharris |
welcome back :) |
# |
Jan 24th 2019, 17:48 |
aro |
i havent done any php coding in like 7 weeks |
# |
Jan 24th 2019, 17:48 |
aro |
cool |
# |
Jan 24th 2019, 17:47 |
jeremyharris |
https://github.com/cakephp/cakephp/wiki |
# |
Jan 24th 2019, 17:47 |
aro |
where do i find that |
# |
Jan 24th 2019, 17:47 |
jeremyharris |
there is a roadmap though which might give you an inclination |
# |
Jan 24th 2019, 17:47 |
aro |
arrrrr ok |
# |
Jan 24th 2019, 17:47 |
jeremyharris |
releases don’t generally have a release date since all work is voluntary, it’d be almost impossible to set one :slightly_smiling_face: |
# |
Jan 24th 2019, 17:46 |
aro |
on that note, is there an estimated release date? |
# |
Jan 24th 2019, 17:45 |
adsc |
yeah, thx, i upgraded the vagrant box to xenial64 and now it works with php7 |
# |
Jan 24th 2019, 17:45 |
aro |
see, that would require going to github, logging in, clicking on cake, switching to tags, finding the appropriate branch/tag, go to it, and then seeing if there was any recent activity on said branch/tag. I was right here in slack, so it was much easier, and less effort - to simply type 'is there going to be a cake4'. So that was the approach i opted for! |
# |
Jan 24th 2019, 17:43 |
dereuromark |
if you kept track of the 4.x branch you would even have found the answer yourself. |
# |
Jan 24th 2019, 17:43 |
dereuromark |
aro: what kind of question is this? the answer would logically always be yes. |
# |
Jan 24th 2019, 17:42 |
dereuromark |
or at least latest 2.x, never use an outdated minor here |
# |
Jan 24th 2019, 17:42 |
dereuromark |
adsc: travis will tell you that it works with 5.6 or any 7.x |
# |
Jan 24th 2019, 17:40 |
aro |
is there going to be a cake 4 |
# |
Jan 24th 2019, 17:03 |
adsc |
because i installed it with php5 and now I get some php errors in the app code that make me think it's php7 app code |
# |
Jan 24th 2019, 17:02 |
adsc |
does cakephp 2.7 generally work with php7? |
# |
Jan 24th 2019, 16:54 |
adsc |
never mind, i got a table definition that works |
# |
Jan 24th 2019, 16:31 |
adsc |
but maybe with an empty db I could at least verify that the project doesn't throw any obvious errors anymore |
# |
Jan 24th 2019, 16:31 |
adsc |
i have to ask the previous owner of the project for a db dump, because I can't really get this thing to work, it seems it's missing stuff in this .sql file |
# |
Jan 24th 2019, 16:30 |
adsc |
is it possible to let the db be created by cakephp? |
# |
Jan 24th 2019, 16:27 |
adsc |
seems to be more of a notes file with some statements in it that are supposed to be run manually, maybe along with importing some data or something |
# |
Jan 24th 2019, 16:26 |
adsc |
i guess it's not really a ddl dump |