# How to update slim 3 to 3.5

**URL:** <https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563>\
**Category:** Questions\
**Created:** [July 31, 2016, 6:59am UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563 "2016-07-31T06:59:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![haizone](https://avatars.discourse-cdn.com/v4/letter/h/ad7895/32.png) [@haizone](https://discourse.slimframework.com/u/haizone)\
**Post date:** [July 31, 2016, 6:59am UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/1 "2016-07-31T06:59:18Z")

</div>

hi  
i have site woth slim 3.0

how i update to 3.5  
and if when i update i can to get a problem with my code now?

---

<div class="post-metadata">

**Author:** ![napolux](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/napolux/32/157_2.png) [@napolux](https://discourse.slimframework.com/u/napolux)\
**Post date:** [July 31, 2016, 10:14am UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/2 "2016-07-31T10:14:07Z")

</div>

Can you show us your `composer.json` file?

---

<div class="post-metadata">

**Author:** ![TheLobos](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TheLobos](https://discourse.slimframework.com/u/TheLobos)\
**Post date:** [July 31, 2016, 10:29am UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/3 "2016-07-31T10:29:27Z")

</div>

I just did a ‘composer update’ and everything still works. I’d say make a backup (just to be sure) and give it a try.

---

<div class="post-metadata">

**Author:** ![haizone](https://avatars.discourse-cdn.com/v4/letter/h/ad7895/32.png) [@haizone](https://discourse.slimframework.com/u/haizone)\
**Post date:** [July 31, 2016, 11:03am UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/4 "2016-07-31T11:03:56Z")

</div>

“require”: {  
“vlucas/phpdotenv”: “^2.0”,  
“slim/slim”: “^3.0@RC”,  
“slim/twig-view”: “^2.0”,  
“slim/csrf”: “^0.4.0”,  
“cartalyst/sentinel”: “2.0._",  
“illuminate/database”: “^5.1”,  
“illuminate/events”: “^5.1”,  
“symfony/http-foundation”: “^2.7”,  
“slim/flash”: “^0.1.0”,  
“twig/extensions”: “^1.3”,  
“facebook/php-sdk-v4”: “^5.0”,  
“codeguy/upload”: “dev-master”,  
“abraham/twitteroauth”: “^0.6.1”,  
“google/apiclient”: "1.0._@beta”,  
“ezyang/htmlpurifier”: “^4.7”,  
“cocur/slugify”: “^1.4”,  
“cartalyst/tags”: “2.0._",  
“baum/baum”: “~1.1”,  
“paragonie/random\_compat”: “^1.1”,  
“codeguy/arachnid”: "1._”,  
“nicolaslopezj/searchable”: “1.\*”  
},

---

<div class="post-metadata">

**Author:** ![napolux](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/napolux/32/157_2.png) [@napolux](https://discourse.slimframework.com/u/napolux)\
**Post date:** [July 31, 2016, 1:19pm UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/5 "2016-07-31T13:19:30Z")

</div>

**Ok, first of all do a backup of everything.**  
Change your `composer.json` in order to update slim to the latest version like this:

> <https://github.com/napolux/helloslim3/blob/master/composer.json#L22>

(change only the `slim/slim` line)

run a `composer update` and test the website. Everything should be ok. If not, restart from the backup 🙂

---

<div class="post-metadata">

**Author:** ![haizone](https://avatars.discourse-cdn.com/v4/letter/h/ad7895/32.png) [@haizone](https://discourse.slimframework.com/u/haizone)\
**Post date:** [July 31, 2016, 1:46pm UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/6 "2016-07-31T13:46:13Z")

</div>

And how I do the update?

---

<div class="post-metadata">

**Author:** ![TheLobos](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TheLobos](https://discourse.slimframework.com/u/TheLobos)\
**Post date:** [July 31, 2016, 7:29pm UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/7 "2016-07-31T19:29:18Z")

</div>

Simply run

```
composer update

```

from your command line interface.

---

<div class="post-metadata">

**Author:** ![agapex](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@agapex](https://discourse.slimframework.com/u/agapex)\
**Post date:** [September 2, 2016, 12:58pm UTC](https://discourse.slimframework.com/t/how-to-update-slim-3-to-3-5/563/8 "2016-09-02T12:58:35Z")

</div>

i Agree with @napolux,  
You just have to go straight to your composer.json file then update the line with “slim/slim”: “^3.0” TO “slim/slim”: “^3.5” Then up your Terminal or command prompt to Update Composer Using “composer update” Command

I tried it and it worked both on windows 8.1 and Ubuntu 16.04LTS
