As we are starting the second part of my project. And we would like to first start completing the migration process before working on the second half of the project. I’ve a few concern about the migration process and would like to clear my doubts.
Currently, in my project we’ve used a lot of these function mentioned below
- Do we have to replace all the $this->Form->input['description'] to $this->Form->control['description']?
- When you mentioned Response::download() would become Response::withDownload(). Do you mean that I have to change $this->response->download($filename) to $this->response->WithDownload($filename)?
- We've this code line $this->primaryKey('id') in our Table.php and you mentioned that is part of the deprecated list and replaced with getX() and setX() methods. What you mean by that? I hope you can give me an example.
The below code is found in the controller and I noticed that you mention hydrate() (now enableHydration() / isHydrationEnabled()). What is the changes we need to make below?
$CustomersordersTable-> find() -> select(['order_id'=>'Customerorders.order_id']) -> where(['id IN' => $studentlist]) -> hydrate(false) -> toArray();
I also understand that $this->request->data['id'] is deprecated and we need to $this->request->getData('id'). However, when adding details, right now we can't assign a random id value to this $this->request->getData('id'). I used to assign a random id with the below before saving into the table.
$this->request->data['id'] = TableRegistry::get('Customers')->find('guid');
Do you have a tentative release date for CakePHP 4.0?