Cakephp Upgrade

Hi, if I would like to upgrade my application from
“cakephp/cakephp”: “~3.2”,
“cakephp/cakephp”: “3.6.*”,

If I use composer, is there a check list what to change with my application?
First try ran in several errors.

I would suggest to migrate from 3.2 to 3.3 thand 3.3 to 3.4, etc.

Read this:

From 3.4 to 3.5, and from 3.5 to 3.6 you can use composer for the update.

However some files (like config/bootstrap.php or Application.php) can not be updated automatically. So what I normally do is to cretae a new cake project and see a diff of all files (I using Meld for this) and go file by file. It takes 5-10 minutes, but in the end you totally up to date.

1 Like

A while back I gave an answer here: Upgraded cake from 3.3 to 3.6 getting below warning

Point is you have to not only update vendor stuff, but app stuff as well when it’s a major change.

Hi, I have now managed the upgrade to cakephp “3.6.*” and the application is running fine, exept one feature. I have implemented Ajax Calls based on the sandbox examples von Dereuromark.
I tried to find a hint in the documentation, but there is nothing mentioned related to cake versions.
After checking the code, I see no error, so my more general question is:
Is there a difference using this feature in a newer cake version?

The ajax-call is working fine and the needed data are collected, but the response is ‘undefined’. The view in the ajax-folder is not starting.

$confSelect =$this->get('appConfig');

if ($costcenters->toArray()) {
	echo '<option value="">' . $confSelect['defaultBefore'] . __('KDWpleaseSelect') . $confSelect['defaultAfter'] . '</option>';
	foreach ($costcenters as $k => $v) {
		echo '<option value="' . $k . '">' . h($v) . '</option>';
} else {
	echo '<option value="0">' . $confSelect['naBefore'] . __('KDWnoOptionAvailable') . $confSelect['naAfter'] . '</option>';

    public function accountCostsAjax() {
        //$this->autorender -> false;
        $id = $this->request->query('id');
        $this->log("ID " . $id);
        $kontotype = $this->divTools->getAccountType($id);
        $this->set('kontotype', $kontotype);
        $this->log("Kontotyp " . $kontotype);
        if ($kontotype < 3) {
            if (!$id) {
                throw new NotFoundException();

            $this->viewClass = 'Ajax.Ajax';

            $costcenters = $this->Costcenters->getListByAccount($id);
            foreach ($costcenters as $key => $value) {
                $this->log('[value]'. $value);

            if (empty($costcenters)) {
                  $this->log("No Subaccounts");


**js-script starting ajax call:**

    $(function () {
        $('#passive').change(function () {
            var selectedValue = $(this).val();
            var targeturl = $(this).attr('rel') + '?id=' + selectedValue;
                type: 'get',
                url: targeturl,
                beforeSend: function (xhr) {
                    xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
                success: function (response) {
                    console.log('response '+response.content);
                    if (response.content) {
                        if(response.content == '<option value=\"0\"> -- noOptionAvailable -- </option>') {
                error: function (e) {
                    alert("Unterkonto nicht gefunden: " + e.responseText.message);



Upgrading should not have effect on your code. However I think your solution is a little bit overcomplicated.
Please open another thread for this question.