# Upgrade tool from cakephp2 to cakephp3 not working

**URL:** <https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566>\
**Category:** Uncategorized\
**Created:** [June 17, 2016, 1:46pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566 "2016-06-17T13:46:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://discourse.cakephp.org/u/jagguy)\
**Post date:** [June 17, 2016, 1:46pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/1 "2016-06-17T13:46:52Z")

</div>

I have installed the upgrade tool to convert cakephp2 to 3 via instruction in [http://book.cakephp.org/3.0/en/upgrade-tool.html](http://book.cakephp.org/3.0/en/upgrade-tool.html)  
I am using windows and i can get the upgrade tool to display with bin\cake upgrade --help

I ran the upgrade and checked the files to see little has been changed. The controllers look exactly the same and the views still have bootstrap2 (no change). THIS UPGRADE HASNT done much!

---

<div class="post-metadata">

**Author:** ![jeremyharris](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jeremyharris/32/66_2.png) [@jeremyharris](https://discourse.cakephp.org/u/jeremyharris)\
**Post date:** [June 17, 2016, 2:49pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/2 "2016-06-17T14:49:20Z")

</div>

What exactly did you run? Did you follow the instructions that follow in the order they appear? Are you using `git` to version control your files so you can rollback changes and see exactly what’s changed? Perhaps outputting what your terminal says followed by a diff would be helpful in helping you.

---

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://discourse.cakephp.org/u/jagguy)\
**Post date:** [June 18, 2016, 1:47am UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/3 "2016-06-18T01:47:08Z")

</div>

I downloaded from this site and tested the the thing was installed with composer

> **[cakephp/upgrade](https://github.com/cakephp/upgrade)**
>
> Upgrade tools for CakePHP meant to facilitate migrating from one version of the framework to another - cakephp/upgrade

I then run the below commands.

D:  
cd wamp64\www\upgrade-master  
bin\cake upgrade locations …\my-app\   
bin\cake upgrade namespaces …\my-app\ \<error here! as I get git is not recognizable output\>

---

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://discourse.cakephp.org/u/jagguy)\
**Post date:** [June 18, 2016, 7:44am UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/4 "2016-06-18T07:44:08Z")

</div>

I didnt use git version control but I can from the code I created that the file locations have changed , the models relationships have changed and the rest of the 99% of the code NOTHING is different.Bootstrap is still version 2. … I dont get what this upgrade is supposed to do as it doesnt seem to do anything. Can you tell I am frustrated with it!

---

<div class="post-metadata">

**Author:** ![jeremyharris](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jeremyharris/32/66_2.png) [@jeremyharris](https://discourse.cakephp.org/u/jeremyharris)\
**Post date:** [June 20, 2016, 7:08pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/5 "2016-06-20T19:08:36Z")

</div>

Well it should certainly be doing something, as it needs to move files and update namespaces which will move a lot of things around. Run the `locations` command with `--dry-run` to see a list of files that will be affected. If nothing is listed, then perhaps it can’t find your installation.

Also, this upgrade tool doesn’t have anything to do with Bootstrap. It is for CakePHP files only.

---

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://discourse.cakephp.org/u/jagguy)\
**Post date:** [June 20, 2016, 11:52pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/6 "2016-06-20T23:52:34Z")

</div>

Yes it moves things around but the code is the same. I think it a waste of time .

---

<div class="post-metadata">

**Author:** ![jeremyharris](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jeremyharris/32/66_2.png) [@jeremyharris](https://discourse.cakephp.org/u/jeremyharris)\
**Post date:** [June 21, 2016, 11:44am UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/7 "2016-06-21T11:44:12Z")

</div>

Okay, well we can agree to disagree 🙂 It’s helped many people cut out much of the upgrade process by doing it automatically. Sorry it didn’t work out for you!

A bit of additional reference for your manual upgrade:

- General migration: [http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html](http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html)
- About the new ORM: [http://book.cakephp.org/3.0/en/appendices/orm-migration.html](http://book.cakephp.org/3.0/en/appendices/orm-migration.html)
- Migrating bootstrap (since you mentioned that): [http://getbootstrap.com/migration/](http://getbootstrap.com/migration/)

---

<div class="post-metadata">

**Author:** ![dakota](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/dakota/32/1421_2.png) [@dakota](https://discourse.cakephp.org/u/dakota)\
**Post date:** [June 22, 2016, 5:20pm UTC](https://discourse.cakephp.org/t/upgrade-tool-from-cakephp2-to-cakephp3-not-working/566/8 "2016-06-22T17:20:27Z")

</div>

The upgrade tool is a tool to help automate most of the repetitive tasks involved in upgrading a CakePHP 2 application to CakePHP 3. This includes moving files into the new directory structure, applying namespaces and replacing `App::uses()` with a proper PHP 5.3 style `use` statement.

It will not alter your code since there is no way to safely automate that. It doesn’t touch model files (Because the model layers have changed so much).

> The controllers look exactly the same

This is because controllers have seen very little changes between CakePHP 2 and 3.

> the views still have bootstrap2 (no change).

And this is because CakePHP doesn’t know what bootstrap is, and it doesn’t care (Since it’s a PHP framework, not a CSS framework).
