How to update slim 3 to 3.5

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?

Can you show us your composer.json file?

1 Like

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.

“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.*”
},

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

(change only the slim/slim line)

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

1 Like

And how I do the update?

Simply run

composer update

from your command line interface.

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